Class: Primer::DetailsComponent::Summary
- Defined in:
- app/components/primer/details_component.rb
Constant Summary
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
- #component ⇒ Object
-
#initialize(button: true, **system_arguments) ⇒ Summary
constructor
A new instance of Summary.
Methods included from FetchOrFallbackHelper
Methods included from ClassNameHelper
Constructor Details
#initialize(button: true, **system_arguments) ⇒ Summary
Returns a new instance of Summary.
37 38 39 40 41 42 43 |
# File 'app/components/primer/details_component.rb', line 37 def initialize(button: true, **system_arguments) = @system_arguments = system_arguments @system_arguments[:tag] = :summary @system_arguments[:role] = "button" end |
Instance Method Details
#component ⇒ Object
45 46 47 48 49 |
# File 'app/components/primer/details_component.rb', line 45 def component return Primer::BaseComponent.new(**@system_arguments) unless Primer::ButtonComponent.new(**@system_arguments) end |