Class: UI::List
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::List
- Defined in:
- app/components/ui/list.rb
Instance Method Summary collapse
-
#initialize(classes: nil, **attributes) ⇒ List
constructor
A new instance of List.
- #view_template(&block) ⇒ Object
Constructor Details
#initialize(classes: nil, **attributes) ⇒ List
Returns a new instance of List.
5 6 7 8 |
# File 'app/components/ui/list.rb', line 5 def initialize(classes: nil, **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
10 11 12 13 14 |
# File 'app/components/ui/list.rb', line 10 def view_template(&block) extend UI::ListBehavior ul(**list_html_attributes.merge(@attributes), &block) end |