Class: RBUI::ComboboxValue
- Defined in:
- lib/rbui/combobox/combobox_value.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(placeholder: nil, **attrs) ⇒ ComboboxValue
constructor
A new instance of ComboboxValue.
- #view_template(&block) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(placeholder: nil, **attrs) ⇒ ComboboxValue
Returns a new instance of ComboboxValue.
5 6 7 8 |
# File 'lib/rbui/combobox/combobox_value.rb', line 5 def initialize(placeholder: nil, **attrs) @placeholder = placeholder super(**attrs) end |
Instance Method Details
#view_template(&block) ⇒ Object
10 11 12 13 14 |
# File 'lib/rbui/combobox/combobox_value.rb', line 10 def view_template(&block) span(**attrs) do block ? block.call : @placeholder end end |