Class: Artisan::Projects::StoryPointSummer
- Inherits:
-
Object
- Object
- Artisan::Projects::StoryPointSummer
- Defined in:
- lib/artisan/projects/story_point_summer.rb
Instance Method Summary collapse
-
#initialize(stories) ⇒ StoryPointSummer
constructor
A new instance of StoryPointSummer.
- #sum ⇒ Object
Constructor Details
permalink #initialize(stories) ⇒ StoryPointSummer
Returns a new instance of StoryPointSummer.
6 7 8 |
# File 'lib/artisan/projects/story_point_summer.rb', line 6 def initialize(stories) @stories = stories end |
Instance Method Details
permalink #sum ⇒ Object
[View source]
10 11 12 13 |
# File 'lib/artisan/projects/story_point_summer.rb', line 10 def sum total = @stories.inject(0){ |total, story| total + story.estimate } return total.round(2) end |