Class: TaskWarrior::Task

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, Validations
Defined in:
lib/taskwarrior/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#annotationsObject

Returns the value of attribute annotations.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def annotations
  @annotations
end

#childrenObject

Returns the value of attribute children.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def children
  @children
end

#dependenciesObject

Returns the value of attribute dependencies.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def dependencies
  @dependencies
end

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def description
  @description
end

#due_atObject

Returns the value of attribute due_at.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def due_at
  @due_at
end

#end_atObject

Returns the value of attribute end_at.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def end_at
  @end_at
end

#entryObject

Returns the value of attribute entry.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def entry
  @entry
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def id
  @id
end

#parentObject

Returns the value of attribute parent.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def parent
  @parent
end

#priorityObject

Returns the value of attribute priority.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def priority
  @priority
end

#projectObject

Returns the value of attribute project.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def project
  @project
end

#start_atObject

Returns the value of attribute start_at.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def start_at
  @start_at
end

#statusObject

Returns the value of attribute status.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def status
  @status
end

#tagsObject

Returns the value of attribute tags.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def tags
  @tags
end

#uuidObject

Returns the value of attribute uuid.



5
6
7
# File 'lib/taskwarrior/task.rb', line 5

def uuid
  @uuid
end

#wait_atObject

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_sObject



40
41
42
# File 'lib/taskwarrior/task.rb', line 40

def to_s
  "Task '#{description}'".tap{|result| result << " <#{uuid}>" if uuid}
end