Class: Primer::Box
- Inherits:
-
Component
- Object
- Component
- Primer::Box
- Defined in:
- app/components/primer/box.rb
Overview
Box is a basic wrapper component for most layout related needs.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**system_arguments) ⇒ Box
constructor
A new instance of Box.
Constructor Details
#initialize(**system_arguments) ⇒ Box
Returns a new instance of Box.
9 10 11 12 13 |
# File 'app/components/primer/box.rb', line 9 def initialize(**system_arguments) @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :div end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'app/components/primer/box.rb', line 15 def call render(Primer::BaseComponent.new(**@system_arguments)) { content } end |