Class: Kpop::Modal::TitleComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Kpop::Modal::TitleComponent
- Includes:
- Katalyst::HtmlAttributes
- Defined in:
- app/components/kpop/modal/title_component.rb
Instance Method Summary collapse
- #captive? ⇒ Boolean
-
#initialize(title: nil, captive: false) ⇒ TitleComponent
constructor
A new instance of TitleComponent.
- #inspect ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize(title: nil, captive: false) ⇒ TitleComponent
Returns a new instance of TitleComponent.
8 9 10 11 12 13 |
# File 'app/components/kpop/modal/title_component.rb', line 8 def initialize(title: nil, captive: false, **) super @title = title @captive = captive end |
Instance Method Details
#captive? ⇒ Boolean
19 20 21 |
# File 'app/components/kpop/modal/title_component.rb', line 19 def captive? @captive end |
#inspect ⇒ Object
23 24 25 |
# File 'app/components/kpop/modal/title_component.rb', line 23 def inspect "#<#{self.class.name} title: #{title.inspect}>" end |
#title ⇒ Object
15 16 17 |
# File 'app/components/kpop/modal/title_component.rb', line 15 def title content? ? content : @title end |