Class: Moonshot::App::JobsToBeDone::ItemComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/moonshot/app/jobs_to_be_done.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#completedObject (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

#subtitleObject (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

#titleObject (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

#callObject



27
28
29
# File 'app/components/moonshot/app/jobs_to_be_done.rb', line 27

def call
  content
end