Class: Ace::Task::Models::Task
- Inherits:
-
Struct
- Object
- Struct
- Ace::Task::Models::Task
- Defined in:
- lib/ace/task/models/task.rb
Overview
Value object representing a task.
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#estimate ⇒ Object
Returns the value of attribute estimate.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#id ⇒ Object
Returns the value of attribute id.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#path ⇒ Object
Returns the value of attribute path.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#special_folder ⇒ Object
Returns the value of attribute special_folder.
-
#status ⇒ Object
Returns the value of attribute status.
-
#subtasks ⇒ Object
Returns the value of attribute subtasks.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#has_subtasks? ⇒ Boolean
Whether this task has subtasks.
-
#shortcut ⇒ Object
Last 3 characters of the ID (shortcut for resolution).
-
#subtask? ⇒ Boolean
Whether this task is a subtask (has a parent).
- #to_s ⇒ Object
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def content @content end |
#created_at ⇒ Object
Returns the value of attribute created_at
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def created_at @created_at end |
#dependencies ⇒ Object
Returns the value of attribute dependencies
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def dependencies @dependencies end |
#estimate ⇒ Object
Returns the value of attribute estimate
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def estimate @estimate end |
#file_path ⇒ Object
Returns the value of attribute file_path
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def file_path @file_path end |
#id ⇒ Object
Returns the value of attribute id
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def id @id end |
#metadata ⇒ Object
Returns the value of attribute metadata
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def @metadata end |
#parent_id ⇒ Object
Returns the value of attribute parent_id
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def parent_id @parent_id end |
#path ⇒ Object
Returns the value of attribute path
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def path @path end |
#priority ⇒ Object
Returns the value of attribute priority
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def priority @priority end |
#special_folder ⇒ Object
Returns the value of attribute special_folder
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def special_folder @special_folder end |
#status ⇒ Object
Returns the value of attribute status
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def status @status end |
#subtasks ⇒ Object
Returns the value of attribute subtasks
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def subtasks @subtasks end |
#tags ⇒ Object
Returns the value of attribute tags
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def @tags end |
#title ⇒ Object
Returns the value of attribute title
7 8 9 |
# File 'lib/ace/task/models/task.rb', line 7 def title @title end |
Instance Method Details
#has_subtasks? ⇒ Boolean
Whether this task has subtasks
36 37 38 |
# File 'lib/ace/task/models/task.rb', line 36 def has_subtasks? subtasks && !subtasks.empty? end |
#shortcut ⇒ Object
Last 3 characters of the ID (shortcut for resolution)
26 27 28 |
# File 'lib/ace/task/models/task.rb', line 26 def shortcut id[-3..] if id end |
#subtask? ⇒ Boolean
Whether this task is a subtask (has a parent)
31 32 33 |
# File 'lib/ace/task/models/task.rb', line 31 def subtask? !parent_id.nil? end |
#to_s ⇒ Object
40 41 42 |
# File 'lib/ace/task/models/task.rb', line 40 def to_s "Task(#{id}: #{title})" end |