Exception: HexCodeError

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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_colorObject (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