Class: RubyUI::SelectItem
- Defined in:
- lib/ruby_ui/select/select_item.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(value: nil, **attrs) ⇒ SelectItem
constructor
A new instance of SelectItem.
- #view_template(&block) ⇒ Object
Constructor Details
#initialize(value: nil, **attrs) ⇒ SelectItem
Returns a new instance of SelectItem.
5 6 7 8 |
# File 'lib/ruby_ui/select/select_item.rb', line 5 def initialize(value: nil, **attrs) @value = value super(**attrs) end |
Instance Method Details
#view_template(&block) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/ruby_ui/select/select_item.rb', line 10 def view_template(&block) div(**attrs) do selected_icon block&.call end end |