Class: Satis::Dialog::Component
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Satis::Dialog::Component
- Defined in:
- app/components/satis/dialog/component.rb
Instance Attribute Summary collapse
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Attributes inherited from ApplicationComponent
Instance Method Summary collapse
- #icon? ⇒ Boolean
-
#initialize(title:, icon: nil) ⇒ Component
constructor
A new instance of Component.
Methods inherited from ApplicationComponent
Constructor Details
#initialize(title:, icon: nil) ⇒ Component
Returns a new instance of Component.
12 13 14 15 |
# File 'app/components/satis/dialog/component.rb', line 12 def initialize(title:, icon: nil) @title = title @icon = icon end |
Instance Attribute Details
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
11 12 13 |
# File 'app/components/satis/dialog/component.rb', line 11 def icon @icon end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'app/components/satis/dialog/component.rb', line 11 def title @title end |
Instance Method Details
#icon? ⇒ Boolean
17 18 19 |
# File 'app/components/satis/dialog/component.rb', line 17 def icon? icon.present? end |