Class: Artisan::Iterations::IterationPresenter

Inherits:
Object
  • Object
show all
Defined in:
lib/artisan/iterations/iteration_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(iteration) ⇒ IterationPresenter

Returns a new instance of IterationPresenter.



5
6
7
# File 'lib/artisan/iterations/iteration_presenter.rb', line 5

def initialize(iteration)
  @iteration = iteration
end

Instance Method Details

#team_namesObject



9
10
11
# File 'lib/artisan/iterations/iteration_presenter.rb', line 9

def team_names
  @iteration.users.collect { |user| user.full_name }.join(", ")
end

#total_billed_pointsObject



13
14
15
16
17
# File 'lib/artisan/iterations/iteration_presenter.rb', line 13

def total_billed_points
  total = 0
  @iteration.stories.completed.each { |story| total += story.estimate if !story.nonbillable?}
  return total
end