Class: HakumiComponents::Checkbox::Group::Option

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
app/components/hakumi_components/checkbox/group/option.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label:, value:, disabled: false) ⇒ Option

Returns a new instance of Option.



17
18
19
20
21
# File 'app/components/hakumi_components/checkbox/group/option.rb', line 17

def initialize(label:, value:, disabled: false)
  @label = label
  @value = value
  @disabled = disabled
end

Instance Attribute Details

#disabledObject (readonly)

Returns the value of attribute disabled.



30
31
32
# File 'app/components/hakumi_components/checkbox/group/option.rb', line 30

def disabled
  @disabled
end

#labelObject (readonly)

Returns the value of attribute label.



24
25
26
# File 'app/components/hakumi_components/checkbox/group/option.rb', line 24

def label
  @label
end

#valueObject (readonly)

Returns the value of attribute value.



27
28
29
# File 'app/components/hakumi_components/checkbox/group/option.rb', line 27

def value
  @value
end