Class: UI::Command
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::Command
- Includes:
- CommandBehavior
- Defined in:
- app/components/ui/command.rb
Instance Method Summary collapse
-
#initialize(loop: true, autofocus: false, classes: "", **attributes) ⇒ Command
constructor
A new instance of Command.
- #view_template ⇒ Object
Methods included from CommandBehavior
#command_classes, #command_data_attributes, #command_html_attributes
Constructor Details
#initialize(loop: true, autofocus: false, classes: "", **attributes) ⇒ Command
Returns a new instance of Command.
6 7 8 9 10 11 |
# File 'app/components/ui/command.rb', line 6 def initialize(loop: true, autofocus: false, classes: "", **attributes) @loop = loop @autofocus = autofocus @classes = classes @attributes = attributes end |
Instance Method Details
#view_template ⇒ Object
13 14 15 |
# File 'app/components/ui/command.rb', line 13 def view_template(&) div(**command_html_attributes.deep_merge(@attributes), &) end |