From d1ba3aadbbf0ba2502dcc8d64bfcf0f5abe7572c Mon Sep 17 00:00:00 2001 From: Alexandr Kalinka Date: Tue, 9 Apr 2024 10:34:39 +0300 Subject: [PATCH] #37 - memoize body_line_numbers method --- lib/extract_test_metadata.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/extract_test_metadata.rb b/lib/extract_test_metadata.rb index 66c666a..74413d2 100644 --- a/lib/extract_test_metadata.rb +++ b/lib/extract_test_metadata.rb @@ -93,6 +93,7 @@ def code_for_line(one_indexed_idx) filelines[one_indexed_idx - 1] end + memoize def body_line_numbers # Get the lines excluding the first (def) and last (end) ((test_node.first_line + 1)..(test_node.last_line - 1))