Exception: AocCli::Errors::PartInv
- Inherits:
-
StandardError
- Object
- StandardError
- AocCli::Errors::PartInv
- Defined in:
- lib/aoc_cli/errors.rb
Instance Attribute Summary collapse
-
#part ⇒ Object
readonly
Returns the value of attribute part.
Instance Method Summary collapse
-
#initialize(part) ⇒ PartInv
constructor
A new instance of PartInv.
- #message ⇒ Object
Constructor Details
#initialize(part) ⇒ PartInv
Returns a new instance of PartInv.
94 95 96 |
# File 'lib/aoc_cli/errors.rb', line 94 def initialize(part) @part = part end |
Instance Attribute Details
#part ⇒ Object (readonly)
Returns the value of attribute part.
93 94 95 |
# File 'lib/aoc_cli/errors.rb', line 93 def part @part end |
Instance Method Details
#message ⇒ Object
97 98 99 100 101 102 |
# File 'lib/aoc_cli/errors.rb', line 97 def <<~error #{ERROR}: Invalid part: #{part.red} Part refers to the part of the puzzle and can either be 1 or 2. error end |