Class: Project
- Inherits:
-
Object
- Object
- Project
- Defined in:
- lib/omnifocus/attask.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#tasks ⇒ Object
Returns the value of attribute tasks.
Instance Method Summary collapse
- #add_task(task) ⇒ Object
-
#initialize(name, id) ⇒ Project
constructor
A new instance of Project.
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
#id ⇒ Object
Returns the value of attribute id.
22 23 24 |
# File 'lib/omnifocus/attask.rb', line 22 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
22 23 24 |
# File 'lib/omnifocus/attask.rb', line 22 def name @name end |
#tasks ⇒ Object
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 |