Class: Trackington::Sprint
- Inherits:
-
Object
- Object
- Trackington::Sprint
- Defined in:
- lib/trackington/app/sprints.rb
Instance Attribute Summary collapse
-
#end_time ⇒ Object
readonly
Returns the value of attribute end_time.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_active ⇒ Object
readonly
Returns the value of attribute is_active.
-
#is_backlog ⇒ Object
readonly
Returns the value of attribute is_backlog.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#tasks ⇒ Object
readonly
Returns the value of attribute tasks.
Instance Method Summary collapse
- #add_task(user_id, data) ⇒ Object
- #all ⇒ Object
- #end ⇒ Object
-
#initialize(sprint) ⇒ Sprint
constructor
A new instance of Sprint.
- #start ⇒ Object
Constructor Details
#initialize(sprint) ⇒ Sprint
Returns a new instance of Sprint.
61 62 63 64 65 66 67 68 69 |
# File 'lib/trackington/app/sprints.rb', line 61 def initialize(sprint) @id = sprint.id @start_time = sprint.start_time @end_time = sprint.end_time @is_active = sprint.is_active @is_backlog = sprint.is_backlog @project_id = sprint.project_id @tasks = TaskRepository.new(@id) end |
Instance Attribute Details
#end_time ⇒ Object (readonly)
Returns the value of attribute end_time.
59 60 61 |
# File 'lib/trackington/app/sprints.rb', line 59 def end_time @end_time end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
59 60 61 |
# File 'lib/trackington/app/sprints.rb', line 59 def id @id end |
#is_active ⇒ Object (readonly)
Returns the value of attribute is_active.
59 60 61 |
# File 'lib/trackington/app/sprints.rb', line 59 def is_active @is_active end |
#is_backlog ⇒ Object (readonly)
Returns the value of attribute is_backlog.
59 60 61 |
# File 'lib/trackington/app/sprints.rb', line 59 def is_backlog @is_backlog end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
59 60 61 |
# File 'lib/trackington/app/sprints.rb', line 59 def start_time @start_time end |
#tasks ⇒ Object (readonly)
Returns the value of attribute tasks.
59 60 61 |
# File 'lib/trackington/app/sprints.rb', line 59 def tasks @tasks end |
Instance Method Details
#add_task(user_id, data) ⇒ Object
83 84 85 86 87 |
# File 'lib/trackington/app/sprints.rb', line 83 def add_task(user_id, data) check_user_role user_id data[:created_by] = user_id @tasks.add(data) end |
#all ⇒ Object
89 90 91 |
# File 'lib/trackington/app/sprints.rb', line 89 def all @tasks.all end |