Class: UI::MenubarSub
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::MenubarSub
- Includes:
- MenubarSubBehavior
- Defined in:
- app/components/ui/menubar_sub.rb
Overview
Sub - Phlex implementation
Container for submenu within the menubar menu.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ MenubarSub
constructor
A new instance of MenubarSub.
- #view_template(&block) ⇒ Object
Methods included from MenubarSubBehavior
#menubar_sub_classes, #menubar_sub_data_attributes, #menubar_sub_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ MenubarSub
Returns a new instance of MenubarSub.
20 21 22 23 |
# File 'app/components/ui/menubar_sub.rb', line 20 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
25 26 27 28 29 |
# File 'app/components/ui/menubar_sub.rb', line 25 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |