Class: AocCli::Presenters::PuzzlePresenter
- Inherits:
-
Object
- Object
- AocCli::Presenters::PuzzlePresenter
- Defined in:
- lib/aoc_cli/presenters/puzzle_presenter.rb
Instance Attribute Summary collapse
-
#puzzle ⇒ Object
readonly
Returns the value of attribute puzzle.
Instance Method Summary collapse
- #date ⇒ Object
-
#initialize(puzzle) ⇒ PuzzlePresenter
constructor
A new instance of PuzzlePresenter.
- #input_filename ⇒ Object
- #puzzle_filename ⇒ Object
Constructor Details
#initialize(puzzle) ⇒ PuzzlePresenter
Returns a new instance of PuzzlePresenter.
6 7 8 |
# File 'lib/aoc_cli/presenters/puzzle_presenter.rb', line 6 def initialize(puzzle) @puzzle = puzzle end |
Instance Attribute Details
#puzzle ⇒ Object (readonly)
Returns the value of attribute puzzle.
4 5 6 |
# File 'lib/aoc_cli/presenters/puzzle_presenter.rb', line 4 def puzzle @puzzle end |
Instance Method Details
#date ⇒ Object
10 11 12 |
# File 'lib/aoc_cli/presenters/puzzle_presenter.rb', line 10 def date "#{puzzle.event.year}-12-#{formatted_day}" end |
#input_filename ⇒ Object
18 19 20 |
# File 'lib/aoc_cli/presenters/puzzle_presenter.rb', line 18 def input_filename "input" end |
#puzzle_filename ⇒ Object
14 15 16 |
# File 'lib/aoc_cli/presenters/puzzle_presenter.rb', line 14 def puzzle_filename "day_#{formatted_day}.md" end |