Class: TaskWarrior::Task
- Inherits:
-
Object
- Object
- TaskWarrior::Task
- Includes:
- ActiveModel::Validations, Validations
- Defined in:
- lib/taskwarrior/task.rb
Instance Attribute Summary collapse
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#children ⇒ Object
Returns the value of attribute children.
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#description ⇒ Object
Returns the value of attribute description.
-
#due_at ⇒ Object
Returns the value of attribute due_at.
-
#end_at ⇒ Object
Returns the value of attribute end_at.
-
#entry ⇒ Object
Returns the value of attribute entry.
-
#id ⇒ Object
Returns the value of attribute id.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#project ⇒ Object
Returns the value of attribute project.
-
#start_at ⇒ Object
Returns the value of attribute start_at.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
-
#wait_at ⇒ Object
Returns the value of attribute wait_at.
Instance Method Summary collapse
-
#initialize(description) ⇒ Task
constructor
A new instance of Task.
- #to_s ⇒ Object
Methods included from Validations
#entry_cannot_be_in_the_future, #must_be_date_or_nil
Constructor Details
#initialize(description) ⇒ Task
Returns a new instance of Task.
32 33 34 35 36 37 38 |
# File 'lib/taskwarrior/task.rb', line 32 def initialize(description) @description = description @dependencies = [] @children = [] @tags = [] @annotations = [] end |
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def annotations @annotations end |
#children ⇒ Object
Returns the value of attribute children.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def children @children end |
#dependencies ⇒ Object
Returns the value of attribute dependencies.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def dependencies @dependencies end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def description @description end |
#due_at ⇒ Object
Returns the value of attribute due_at.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def due_at @due_at end |
#end_at ⇒ Object
Returns the value of attribute end_at.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def end_at @end_at end |
#entry ⇒ Object
Returns the value of attribute entry.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def entry @entry end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def id @id end |
#parent ⇒ Object
Returns the value of attribute parent.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def parent @parent end |
#priority ⇒ Object
Returns the value of attribute priority.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def priority @priority end |
#project ⇒ Object
Returns the value of attribute project.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def project @project end |
#start_at ⇒ Object
Returns the value of attribute start_at.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def start_at @start_at end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def status @status end |
#tags ⇒ Object
Returns the value of attribute tags.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def @tags end |
#uuid ⇒ Object
Returns the value of attribute uuid.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def uuid @uuid end |
#wait_at ⇒ Object
Returns the value of attribute wait_at.
5 6 7 |
# File 'lib/taskwarrior/task.rb', line 5 def wait_at @wait_at end |
Instance Method Details
#to_s ⇒ Object
40 41 42 |
# File 'lib/taskwarrior/task.rb', line 40 def to_s "Task '#{description}'".tap{|result| result << " <#{uuid}>" if uuid} end |