Class: Artisan::Projects::CompletedStoriesPresenter

Inherits:
Object
  • Object
show all
Defined in:
lib/artisan/projects/completed_stories_presenter.rb

Instance Method Summary collapse

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

#dataObject



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