Class: AdventOfCode::Commands::Command

Inherits:
Object
  • Object
show all
Includes:
Thor::Base
Defined in:
lib/advent_of_code_cli/commands/command.rb

Direct Known Subclasses

Download, Example::New, Example::Solve, Scaffold, Solve

Instance Method Summary collapse

Constructor Details

#initialize(day:) ⇒ Command

Returns a new instance of Command.

Raises:



8
9
10
11
12
# File 'lib/advent_of_code_cli/commands/command.rb', line 8

def initialize(day:)
  raise InvalidDayError unless day.is_a?(Integer) && day.positive? && day <= 25

  @day = day
end