Class: UI::ContextMenuRadioGroupComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
ContextMenuRadioGroupBehavior
Defined in:
app/view_components/ui/context_menu_radio_group_component.rb

Overview

RadioGroupComponent - ViewComponent implementation

Instance Method Summary collapse

Methods included from ContextMenuRadioGroupBehavior

#context_menu_radio_group_classes, #context_menu_radio_group_html_attributes

Constructor Details

#initialize(classes: "", **attributes) ⇒ ContextMenuRadioGroupComponent

Returns a new instance of ContextMenuRadioGroupComponent.



7
8
9
10
# File 'app/view_components/ui/context_menu_radio_group_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_radio_group_component.rb', line 12

def call
  attrs = context_menu_radio_group_html_attributes

   :div, **attrs.merge(@attributes) do
    content
  end
end