Class: ColorConversion::Color
- Inherits:
-
Object
- Object
- ColorConversion::Color
- Extended by:
- Forwardable
- Defined in:
- lib/color_conversion/color.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(color) ⇒ Color
constructor
A new instance of Color.
Constructor Details
#initialize(color) ⇒ Color
Returns a new instance of Color.
6 7 8 |
# File 'lib/color_conversion/color.rb', line 6 def initialize(color) @converter = ColorConverter.factory(color) end |
Instance Method Details
#==(other) ⇒ Object
10 11 12 13 14 |
# File 'lib/color_conversion/color.rb', line 10 def ==(other) return false unless other.is_a?(Color) rgb == other.rgb && alpha == other.alpha end |