Class: GeoPattern::ColorPreset

Inherits:
Object
  • Object
show all
Defined in:
lib/geo_pattern/color_preset.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(color: nil, base_color: nil) ⇒ 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_colorObject

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

#colorObject

Returns the value of attribute color


3
4
5
# File 'lib/geo_pattern/color_preset.rb', line 3

def color
  @color
end

#modeSymbol

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