Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skalnik/advent-of-code
🎄
https://github.com/skalnik/advent-of-code
Last synced: about 1 month ago
JSON representation
🎄
- Host: GitHub
- URL: https://github.com/skalnik/advent-of-code
- Owner: skalnik
- Created: 2017-12-01T19:16:13.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-03-12T23:28:37.000Z (10 months ago)
- Last Synced: 2024-10-18T15:24:57.245Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 1.51 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🎄 Advent of Code 🎄
====================My solutions for Advent of Code.
Ruby Template
------------------```ruby
#!/usr/bin/env rubyclass DayN
def self.run(input_file)
runner = DayN.new(input_file)
puts "Part 1: #{runner.part_one}"
puts "Part 2: #{runner.part_two}"
enddef initialize(filename)
@input = File.readlines(filename, chomp: true)
enddef part_one
@input
enddef part_two
end
endif __FILE__ == $0
if ARGV.empty?
DayN.run 'input/dayN.txt'
else
DayN.run ARGV.first
end
end
```