Skip to content

Commit d1ba3aa

Browse files
committed
exercism#37 - memoize body_line_numbers method
1 parent ba9455f commit d1ba3aa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: lib/extract_test_metadata.rb

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def code_for_line(one_indexed_idx)
9393
filelines[one_indexed_idx - 1]
9494
end
9595

96+
memoize
9697
def body_line_numbers
9798
# Get the lines excluding the first (def) and last (end)
9899
((test_node.first_line + 1)..(test_node.last_line - 1))

0 commit comments

Comments
 (0)