Class: HakumiComponents::Checkbox::Group::Option
- Inherits:
-
Object
- Object
- HakumiComponents::Checkbox::Group::Option
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/checkbox/group/option.rb
Instance Attribute Summary collapse
-
#disabled ⇒ Object
readonly
Returns the value of attribute disabled.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(label:, value:, disabled: false) ⇒ Option
constructor
A new instance of Option.
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
#disabled ⇒ Object (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 |
#label ⇒ Object (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 |
#value ⇒ Object (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 |