Class: Primer::BoxComponent
- Defined in:
- app/components/primer/box_component.rb
Constant Summary
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**kwargs) ⇒ BoxComponent
constructor
A new instance of BoxComponent.
Methods included from FetchOrFallbackHelper
Methods included from ClassNameHelper
Constructor Details
#initialize(**kwargs) ⇒ BoxComponent
Returns a new instance of BoxComponent.
5 6 7 8 |
# File 'app/components/primer/box_component.rb', line 5 def initialize(**kwargs) @kwargs = kwargs @kwargs[:tag] = :div end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'app/components/primer/box_component.rb', line 10 def call render(Primer::BaseComponent.new(**@kwargs)) { content } end |