Class: Kpop::ModalComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Kpop::ModalComponent
- Defined in:
- app/components/kpop/modal_component.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title:, modal_class:) ⇒ ModalComponent
constructor
A new instance of ModalComponent.
- #inspect ⇒ Object
- #label ⇒ Object
- #modal_class ⇒ Object
Constructor Details
#initialize(title:, modal_class:) ⇒ ModalComponent
7 8 9 10 11 12 |
# File 'app/components/kpop/modal_component.rb', line 7 def initialize(title:, modal_class:) super() @title = title @modal_class = modal_class end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
5 6 7 |
# File 'app/components/kpop/modal_component.rb', line 5 def title @title end |
Instance Method Details
#inspect ⇒ Object
22 23 24 |
# File 'app/components/kpop/modal_component.rb', line 22 def inspect "#<#{self.class.name} title: #{title.inspect}>" end |
#label ⇒ Object
14 15 16 |
# File 'app/components/kpop/modal_component.rb', line 14 def label sanitize(title) end |
#modal_class ⇒ Object
18 19 20 |
# File 'app/components/kpop/modal_component.rb', line 18 def modal_class @modal_class.to_s.dasherize end |