Skip to content

Instantly share code, notes, and snippets.

@djmetzle
Last active December 4, 2025 05:40
Show Gist options
  • Select an option

  • Save djmetzle/c6a09df4a69e8daf129a18b60bde5581 to your computer and use it in GitHub Desktop.

Select an option

Save djmetzle/c6a09df4a69e8daf129a18b60bde5581 to your computer and use it in GitHub Desktop.
Advent of Code solution template - Ruby
EXAMPLE = File.new('example.txt', 'r').readlines
INPUT = File.new('input.txt', 'r').readlines
def parse(input)
input.map do |line|
line
end
end
def solve(input)
problem = parse(input)
return 1
end
example = solve(EXAMPLE)
raise "Incorrect #{example}" unless example == 1
pp [:solution, solve(INPUT)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment