Class: Maglev::Uikit::Form::Combobox::OptionComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Maglev::Uikit::Form::Combobox::OptionComponent
- Defined in:
- app/components/maglev/uikit/form/combobox/option_component.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(id:, label:) ⇒ OptionComponent
constructor
A new instance of OptionComponent.
- #to_args ⇒ Object
Constructor Details
#initialize(id:, label:) ⇒ OptionComponent
Returns a new instance of OptionComponent.
10 11 12 13 |
# File 'app/components/maglev/uikit/form/combobox/option_component.rb', line 10 def initialize(id:, label:) @id = id @label = label end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'app/components/maglev/uikit/form/combobox/option_component.rb', line 8 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
8 9 10 |
# File 'app/components/maglev/uikit/form/combobox/option_component.rb', line 8 def label @label end |
Instance Method Details
#to_args ⇒ Object
15 16 17 |
# File 'app/components/maglev/uikit/form/combobox/option_component.rb', line 15 def to_args { id: id, label: label } end |