Class: GeoPattern::ColorPreset
- Inherits:
-
Object
- Object
- GeoPattern::ColorPreset
- Defined in:
- lib/geo_pattern/color_preset.rb
Instance Attribute Summary collapse
-
#base_color ⇒ Object
Returns the value of attribute base_color.
-
#color ⇒ Object
Returns the value of attribute color.
-
#mode ⇒ Symbol
Return mode.
Instance Method Summary collapse
-
#initialize(color: nil, base_color: nil) ⇒ ColorPreset
constructor
A new instance of ColorPreset.
- #mode?(m) ⇒ Boolean
Constructor Details
#initialize(color: nil, base_color: nil) ⇒ ColorPreset
Returns a new instance of ColorPreset.
5 6 7 8 |
# File 'lib/geo_pattern/color_preset.rb', line 5 def initialize(color: nil, base_color: nil) @color = color @base_color = base_color end |
Instance Attribute Details
#base_color ⇒ Object
Returns the value of attribute base_color.
3 4 5 |
# File 'lib/geo_pattern/color_preset.rb', line 3 def base_color @base_color end |
#color ⇒ Object
Returns the value of attribute color.
3 4 5 |
# File 'lib/geo_pattern/color_preset.rb', line 3 def color @color end |
#mode ⇒ Symbol
Return mode
14 15 16 |
# File 'lib/geo_pattern/color_preset.rb', line 14 def mode @mode end |
Instance Method Details
#mode?(m) ⇒ Boolean
22 23 24 |
# File 'lib/geo_pattern/color_preset.rb', line 22 def mode?(m) mode == m end |