Class: UI::ItemMediaComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::ItemMediaComponent
- Includes:
- ItemMediaBehavior
- Defined in:
- app/view_components/ui/item_media_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(variant: "default", classes: "", **attributes) ⇒ ItemMediaComponent
constructor
A new instance of ItemMediaComponent.
Methods included from ItemMediaBehavior
#item_media_classes, #item_media_html_attributes
Constructor Details
#initialize(variant: "default", classes: "", **attributes) ⇒ ItemMediaComponent
Returns a new instance of ItemMediaComponent.
6 7 8 9 10 |
# File 'app/view_components/ui/item_media_component.rb', line 6 def initialize(variant: "default", classes: "", **attributes) @variant = variant @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
12 13 14 |
# File 'app/view_components/ui/item_media_component.rb', line 12 def call content_tag :div, content, **item_media_html_attributes end |