Class: UI::CommandShortcutComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::CommandShortcutComponent
- Includes:
- CommandShortcutBehavior
- Defined in:
- app/view_components/ui/command_shortcut_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ CommandShortcutComponent
constructor
A new instance of CommandShortcutComponent.
Methods included from CommandShortcutBehavior
#command_shortcut_classes, #command_shortcut_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ CommandShortcutComponent
Returns a new instance of CommandShortcutComponent.
6 7 8 9 |
# File 'app/view_components/ui/command_shortcut_component.rb', line 6 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
11 12 13 |
# File 'app/view_components/ui/command_shortcut_component.rb', line 11 def call content_tag(:span, content, **command_shortcut_html_attributes.deep_merge(@attributes)) end |