Exception: HexCodeError
- Inherits:
-
StandardError
- Object
- StandardError
- HexCodeError
- Defined in:
- lib/color/error/hex_code_error.rb
Overview
Error class to capture illegal hex codes being passed to the class.
Instance Attribute Summary collapse
-
#wrong_color ⇒ Object
readonly
Returns the value of attribute wrong_color.
Instance Method Summary collapse
-
#initialize(wrong_color) ⇒ HexCodeError
constructor
A new instance of HexCodeError.
Constructor Details
#initialize(wrong_color) ⇒ HexCodeError
Returns a new instance of HexCodeError.
7 8 9 10 |
# File 'lib/color/error/hex_code_error.rb', line 7 def initialize(wrong_color) super @wrong_color = wrong_color end |
Instance Attribute Details
#wrong_color ⇒ Object (readonly)
Returns the value of attribute wrong_color.
5 6 7 |
# File 'lib/color/error/hex_code_error.rb', line 5 def wrong_color @wrong_color end |