Exception: AocCli::Errors::PartInv

Inherits:
StandardError
  • Object
show all
Defined in:
lib/aoc_cli/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#partObject (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

#messageObject



97
98
99
100
101
102
# File 'lib/aoc_cli/errors.rb', line 97

def message
	<<~error
	#{ERROR}: Invalid part: #{part.red}
	Part refers to the part of the puzzle and can either be 1 or 2.
	error
end