Class: Project

Inherits:
Object
  • Object
show all
Defined in:
lib/omnifocus/attask.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, id) ⇒ Project

Returns a new instance of Project.



24
25
26
27
28
# File 'lib/omnifocus/attask.rb', line 24

def initialize(name, id)
  @name = name
  @id = id
  @tasks = []
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



22
23
24
# File 'lib/omnifocus/attask.rb', line 22

def id
  @id
end

#nameObject

Returns the value of attribute name.



22
23
24
# File 'lib/omnifocus/attask.rb', line 22

def name
  @name
end

#tasksObject

Returns the value of attribute tasks.



22
23
24
# File 'lib/omnifocus/attask.rb', line 22

def tasks
  @tasks
end

Instance Method Details

#add_task(task) ⇒ Object



30
31
32
# File 'lib/omnifocus/attask.rb', line 30

def add_task task
  tasks.push task
end