Exception: AocCli::Errors::YearInv
- Inherits:
-
StandardError
- Object
- StandardError
- AocCli::Errors::YearInv
- Defined in:
- lib/aoc_cli/errors.rb
Instance Attribute Summary collapse
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(year) ⇒ YearInv
constructor
A new instance of YearInv.
- #message ⇒ Object
Constructor Details
#initialize(year) ⇒ YearInv
Returns a new instance of YearInv.
45 46 47 |
# File 'lib/aoc_cli/errors.rb', line 45 def initialize(year) @year = year end |
Instance Attribute Details
#year ⇒ Object (readonly)
Returns the value of attribute year.
44 45 46 |
# File 'lib/aoc_cli/errors.rb', line 44 def year @year end |
Instance Method Details
#message ⇒ Object
48 49 50 51 52 53 |
# File 'lib/aoc_cli/errors.rb', line 48 def " \#{ERROR}: Invalid year: \#{year.to_s.red}\n Advent of Code currently spans 2015 - 2020.\n error\nend\n" |