Class: UI::EmptyComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::EmptyComponent
- Includes:
- EmptyBehavior
- Defined in:
- app/view_components/ui/empty_component.rb
Overview
EmptyComponent - ViewComponent implementation
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ EmptyComponent
constructor
A new instance of EmptyComponent.
Methods included from EmptyBehavior
#empty_classes, #empty_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ EmptyComponent
Returns a new instance of EmptyComponent.
7 8 9 10 |
# File 'app/view_components/ui/empty_component.rb', line 7 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 |
# File 'app/view_components/ui/empty_component.rb', line 12 def call tag.div(**empty_html_attributes.merge(@attributes)) do content end end |