Skip to content

Commit cbb2b2b

Browse files
author
Robb Kidd
committed
tests that the example solutions work
1 parent 026d174 commit cbb2b2b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

2021/ruby/day05.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def initialize(data=nil)
99
@data = data || input
1010
end
1111

12+
# @example
13+
# new(EXAMPLE_INPUT).part1 #=> 5
14+
#
1215
def part1
1316
parse
1417
.map{ |line| to_vent_line(line) }
@@ -18,6 +21,9 @@ def part1
1821
.length
1922
end
2023

24+
# @example
25+
# new(EXAMPLE_INPUT).part2 #=> 12
26+
#
2127
def part2
2228
parse
2329
.map{ |line| to_vent_line(line, skip_diagonals: false) }

0 commit comments

Comments
 (0)