Class: AdventOfCode::Commands::Command
- Inherits:
-
Object
- Object
- AdventOfCode::Commands::Command
- Includes:
- Thor::Base
- Defined in:
- lib/advent_of_code_cli/commands/command.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(day:) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(day:) ⇒ Command
Returns a new instance of Command.
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 |