Class: Moonshot::App::JobsToBeDone::ItemComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Moonshot::App::JobsToBeDone::ItemComponent
- Defined in:
- app/components/moonshot/app/jobs_to_be_done.rb
Instance Attribute Summary collapse
-
#completed ⇒ Object
(also: #completed?)
readonly
Returns the value of attribute completed.
-
#subtitle ⇒ Object
readonly
Returns the value of attribute subtitle.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(title:, subtitle: nil, completed: false) ⇒ ItemComponent
constructor
A new instance of ItemComponent.
Constructor Details
#initialize(title:, subtitle: nil, completed: false) ⇒ ItemComponent
Returns a new instance of ItemComponent.
21 22 23 24 25 |
# File 'app/components/moonshot/app/jobs_to_be_done.rb', line 21 def initialize title:, subtitle: nil, completed: false @title = title @subtitle = subtitle @completed = completed end |
Instance Attribute Details
#completed ⇒ Object (readonly) Also known as: completed?
Returns the value of attribute completed.
17 18 19 |
# File 'app/components/moonshot/app/jobs_to_be_done.rb', line 17 def completed @completed end |
#subtitle ⇒ Object (readonly)
Returns the value of attribute subtitle.
17 18 19 |
# File 'app/components/moonshot/app/jobs_to_be_done.rb', line 17 def subtitle @subtitle end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
17 18 19 |
# File 'app/components/moonshot/app/jobs_to_be_done.rb', line 17 def title @title end |
Instance Method Details
#call ⇒ Object
27 28 29 |
# File 'app/components/moonshot/app/jobs_to_be_done.rb', line 27 def call content end |