Class: HakumiComponents::ColorPicker::PresetGroup

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
app/components/hakumi_components/color_picker/preset_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label:, colors:) ⇒ PresetGroup

Returns a new instance of PresetGroup.



10
11
12
13
# File 'app/components/hakumi_components/color_picker/preset_group.rb', line 10

def initialize(label:, colors:)
  @label = label
  @colors = colors
end

Instance Attribute Details

#colorsObject (readonly)

Returns the value of attribute colors.



19
20
21
# File 'app/components/hakumi_components/color_picker/preset_group.rb', line 19

def colors
  @colors
end

#labelObject (readonly)

Returns the value of attribute label.



16
17
18
# File 'app/components/hakumi_components/color_picker/preset_group.rb', line 16

def label
  @label
end

Instance Method Details

#any_colors?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'app/components/hakumi_components/color_picker/preset_group.rb', line 22

def any_colors?
  @colors.any?
end