20 lines
290 B
Ruby
20 lines
290 B
Ruby
|
require_relative "impl"
|
||
|
|
||
|
def print(result)
|
||
|
if result.is_a? Array
|
||
|
result.map! {|l| "#{l}\n" }
|
||
|
end
|
||
|
|
||
|
puts result
|
||
|
end
|
||
|
|
||
|
def run
|
||
|
puts "running your implementation"
|
||
|
input = File.new("%day_name%/data").read
|
||
|
data = parse(input)
|
||
|
result = calculate(data)
|
||
|
print(result)
|
||
|
end
|
||
|
|
||
|
run
|