Class: Artisan::Projects::CompletedStoriesPresenter
- Inherits:
-
Object
- Object
- Artisan::Projects::CompletedStoriesPresenter
- Defined in:
- lib/artisan/projects/completed_stories_presenter.rb
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(completed_stories) ⇒ CompletedStoriesPresenter
constructor
A new instance of CompletedStoriesPresenter.
Constructor Details
#initialize(completed_stories) ⇒ CompletedStoriesPresenter
Returns a new instance of CompletedStoriesPresenter.
7 8 9 |
# File 'lib/artisan/projects/completed_stories_presenter.rb', line 7 def initialize(completed_stories) @completed_stories = completed_stories end |
Instance Method Details
#data ⇒ Object
11 12 13 14 15 16 |
# File 'lib/artisan/projects/completed_stories_presenter.rb', line 11 def data data = {} data[:total_points] = StoryPointSummer.new(@completed_stories).sum data[:completed_stories] = @completed_stories return data end |