Class: UI::MenubarShortcutComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::MenubarShortcutComponent
- Includes:
- MenubarShortcutBehavior
- Defined in:
- app/view_components/ui/menubar_shortcut_component.rb
Overview
ShortcutComponent - ViewComponent implementation
Keyboard shortcut display.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ MenubarShortcutComponent
constructor
A new instance of MenubarShortcutComponent.
Methods included from MenubarShortcutBehavior
#menubar_shortcut_classes, #menubar_shortcut_data_attributes, #menubar_shortcut_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ MenubarShortcutComponent
Returns a new instance of MenubarShortcutComponent.
12 13 14 15 |
# File 'app/view_components/ui/menubar_shortcut_component.rb', line 12 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 |
# File 'app/view_components/ui/menubar_shortcut_component.rb', line 17 def call content_tag :span, **.deep_merge(@attributes) do content end end |