Class: Bs5::Modal::HeaderComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Bs5::Modal::HeaderComponent
- Defined in:
- app/components/bs5/modal/header_component.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(title: nil, label_id: nil) ⇒ HeaderComponent
constructor
A new instance of HeaderComponent.
Constructor Details
#initialize(title: nil, label_id: nil) ⇒ HeaderComponent
Returns a new instance of HeaderComponent.
8 9 10 11 |
# File 'app/components/bs5/modal/header_component.rb', line 8 def initialize(title: nil, label_id: nil) @title = title @label_id = label_id end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'app/components/bs5/modal/header_component.rb', line 6 def title @title end |
Instance Method Details
#content ⇒ Object
13 14 15 |
# File 'app/components/bs5/modal/header_component.rb', line 13 def content title || @content end |