Class: HakumiComponents::SelectionControl::OptionGroup

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Entry
Defined in:
app/components/hakumi_components/selection_control/option_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label:, options:) ⇒ OptionGroup

Returns a new instance of OptionGroup.



12
13
14
15
# File 'app/components/hakumi_components/selection_control/option_group.rb', line 12

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

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



28
29
30
# File 'app/components/hakumi_components/selection_control/option_group.rb', line 28

def label
  @label
end

#optionsObject (readonly)

Returns the value of attribute options.



31
32
33
# File 'app/components/hakumi_components/selection_control/option_group.rb', line 31

def options
  @options
end

Instance Method Details

#group?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'app/components/hakumi_components/selection_control/option_group.rb', line 23

def group?
  true
end

#option?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/components/hakumi_components/selection_control/option_group.rb', line 18

def option?
  false
end