Class: Trajectory::Iteration
- Inherits:
-
Object
- Object
- Trajectory::Iteration
- Includes:
- Virtus
- Defined in:
- lib/trajectory/domain/iteration.rb
Instance Attribute Summary collapse
-
#project ⇒ Project
Fetch the project the iteration belongs to.
Instance Method Summary collapse
-
#==(other) ⇒ true, false
Returns true if two iterations are the sames i.e they share the same id attribute.
-
#accepted_points ⇒ Integer
Sum of points accepted stories in the iteration.
-
#accepted_stories_count ⇒ Integer
Bumber of accepted stories.
-
#comments_count ⇒ Integer
Number of comments of the story.
-
#complete? ⇒ true, false
(also: #past?)
Return true if the iteration has been completed, false otherwise.
-
#created_at ⇒ DateTime
Creation date of the iteration.
-
#current? ⇒ true, false
True if iteration is the current iteration, false otherwise.
-
#delivered_stories_count ⇒ Integer
Number of delivered stories in the iteration.
-
#estimated_points ⇒ Integer
Sum of all points of all stories of the iteration.
-
#estimated_velocity ⇒ Integer
Estimated velocity of the project.
-
#future? ⇒ Boolean
Returns true if the iteration is a future one i.e not started and not completed.
-
#id ⇒ Integer
The unique identifier of the iteration.
-
#percent_complete ⇒ Float
The completion percentage of the iteration.
-
#project_id ⇒ Integer
D of the project the iteration belongs to.
-
#started_stories_count ⇒ Integer
Number of started stories in the iteration.
-
#starts_on ⇒ DateTime
Start date of the iteration.
-
#stories ⇒ Stories
Fetch the stories that belongs to the iteration.
-
#stories_count ⇒ Integer
Number of stories in the iteration.
-
#unstarted_stories_count ⇒ Integer
Number of unstarted stories.
-
#updated_at ⇒ DateTime
Last modification date of the iteration.
Instance Attribute Details
#project ⇒ Project
Fetch the project the iteration belongs to
74 75 76 |
# File 'lib/trajectory/domain/iteration.rb', line 74 def project @project ||= DataStore.find_project_by_id(project_id) end |
Instance Method Details
#==(other) ⇒ true, false
Returns true if two iterations are the sames i.e they share the same id attribute
67 68 69 |
# File 'lib/trajectory/domain/iteration.rb', line 67 def ==(other) id == other.id end |
#accepted_points ⇒ Integer
Sum of points accepted stories in the iteration
37 |
# File 'lib/trajectory/domain/iteration.rb', line 37 attribute :accepted_points, Integer |
#accepted_stories_count ⇒ Integer
Returns bumber of accepted stories.
45 |
# File 'lib/trajectory/domain/iteration.rb', line 45 attribute :accepted_stories_count, Integer |
#comments_count ⇒ Integer
Returns number of comments of the story.
43 |
# File 'lib/trajectory/domain/iteration.rb', line 43 attribute :comments_count, Integer |
#complete? ⇒ true, false Also known as: past?
Return true if the iteration has been completed, false otherwise
33 |
# File 'lib/trajectory/domain/iteration.rb', line 33 attribute :complete, Boolean |
#created_at ⇒ DateTime
Returns creation date of the iteration.
15 |
# File 'lib/trajectory/domain/iteration.rb', line 15 attribute :created_at, DateTime |
#current? ⇒ true, false
Returns true if iteration is the current iteration, false otherwise.
28 |
# File 'lib/trajectory/domain/iteration.rb', line 28 attribute :current, Boolean |
#delivered_stories_count ⇒ Integer
Returns number of delivered stories in the iteration.
19 |
# File 'lib/trajectory/domain/iteration.rb', line 19 attribute :delivered_stories_count, Integer |
#estimated_points ⇒ Integer
Sum of all points of all stories of the iteration
41 |
# File 'lib/trajectory/domain/iteration.rb', line 41 attribute :estimated_points, Integer |
#estimated_velocity ⇒ Integer
Returns estimated velocity of the project.
17 |
# File 'lib/trajectory/domain/iteration.rb', line 17 attribute :estimated_velocity, Integer |
#future? ⇒ Boolean
Returns true if the iteration is a future one i.e not started and not completed
58 59 60 |
# File 'lib/trajectory/domain/iteration.rb', line 58 def future? !current? && !complete? end |
#id ⇒ Integer
Returns the unique identifier of the iteration.
9 |
# File 'lib/trajectory/domain/iteration.rb', line 9 attribute :id, Integer, default: lambda { |project, attribute| raise MissingAttributeError.new(project, :id) } |
#percent_complete ⇒ Float
Returns the completion percentage of the iteration.
11 |
# File 'lib/trajectory/domain/iteration.rb', line 11 attribute :percent_complete, Float |
#project_id ⇒ Integer
Returns d of the project the iteration belongs to.
48 |
# File 'lib/trajectory/domain/iteration.rb', line 48 attribute :project_id, Integer |
#started_stories_count ⇒ Integer
Returns number of started stories in the iteration.
13 |
# File 'lib/trajectory/domain/iteration.rb', line 13 attribute :started_stories_count, Integer |
#starts_on ⇒ DateTime
Returns start date of the iteration.
25 |
# File 'lib/trajectory/domain/iteration.rb', line 25 attribute :starts_on, DateTime |
#stories ⇒ Stories
Fetch the stories that belongs to the iteration
81 82 83 |
# File 'lib/trajectory/domain/iteration.rb', line 81 def stories project.stories_in_iteration(self) end |
#stories_count ⇒ Integer
Returns number of stories in the iteration.
30 |
# File 'lib/trajectory/domain/iteration.rb', line 30 attribute :stories_count, Integer |
#unstarted_stories_count ⇒ Integer
Returns number of unstarted stories.
23 |
# File 'lib/trajectory/domain/iteration.rb', line 23 attribute :unstarted_stories_count, Integer |
#updated_at ⇒ DateTime
Returns last modification date of the iteration.
21 |
# File 'lib/trajectory/domain/iteration.rb', line 21 attribute :updated_at, DateTime |