Class: LightningUiKit::RadioGroup::OptionComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- LightningUiKit::RadioGroup::OptionComponent
- Defined in:
- app/components/lightning_ui_kit/radio_group/option_component.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #disabled? ⇒ Boolean
-
#initialize(value:, label:, description: nil, disabled: false) ⇒ OptionComponent
constructor
A new instance of OptionComponent.
Constructor Details
#initialize(value:, label:, description: nil, disabled: false) ⇒ OptionComponent
Returns a new instance of OptionComponent.
4 5 6 7 8 9 |
# File 'app/components/lightning_ui_kit/radio_group/option_component.rb', line 4 def initialize(value:, label:, description: nil, disabled: false) @value = value @label = label @description = description @disabled = disabled end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
2 3 4 |
# File 'app/components/lightning_ui_kit/radio_group/option_component.rb', line 2 def description @description end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
2 3 4 |
# File 'app/components/lightning_ui_kit/radio_group/option_component.rb', line 2 def label @label end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
2 3 4 |
# File 'app/components/lightning_ui_kit/radio_group/option_component.rb', line 2 def value @value end |
Instance Method Details
#disabled? ⇒ Boolean
11 12 13 |
# File 'app/components/lightning_ui_kit/radio_group/option_component.rb', line 11 def disabled? @disabled end |