Class: UI::ContextMenuShortcutComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::ContextMenuShortcutComponent
- Includes:
- ContextMenuShortcutBehavior
- Defined in:
- app/view_components/ui/context_menu_shortcut_component.rb
Overview
ShortcutComponent - ViewComponent implementation
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ ContextMenuShortcutComponent
constructor
A new instance of ContextMenuShortcutComponent.
Methods included from ContextMenuShortcutBehavior
#context_menu_shortcut_classes, #context_menu_shortcut_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ ContextMenuShortcutComponent
Returns a new instance of ContextMenuShortcutComponent.
7 8 9 10 |
# File 'app/view_components/ui/context_menu_shortcut_component.rb', line 7 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/view_components/ui/context_menu_shortcut_component.rb', line 12 def call attrs = content_tag :span, **attrs.merge(@attributes) do content end end |