Class: PhlexUI::Select::Item
- Defined in:
- lib/phlex_ui/select/item.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(value: nil, **attrs) ⇒ Item
constructor
A new instance of Item.
- #view_template(&block) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(value: nil, **attrs) ⇒ Item
Returns a new instance of Item.
5 6 7 8 |
# File 'lib/phlex_ui/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/phlex_ui/select/item.rb', line 10 def view_template(&block) div(**attrs) do block&.call selected_icon end end |