Class: Moonshot::App::JobsToBeDone

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

Defined Under Namespace

Classes: ItemComponent

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:) ⇒ JobsToBeDone

Returns a new instance of JobsToBeDone.



8
9
10
# File 'app/components/moonshot/app/jobs_to_be_done.rb', line 8

def initialize title:
  @title = title
end

Instance Attribute Details

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'app/components/moonshot/app/jobs_to_be_done.rb', line 6

def title
  @title
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/components/moonshot/app/jobs_to_be_done.rb', line 12

def render?
  !items.all?(&:completed?)
end