Class: Signoff::Report

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/artisan/reports/signoff/report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(iteration, project_name, options = {}) ⇒ Report

Returns a new instance of Report.



13
14
15
16
17
18
19
# File 'lib/artisan/reports/signoff/report.rb', line 13

def initialize(iteration, project_name, options = {})
  @iteration = iteration
  @project_name = project_name
  @options = options
  @table_data = {}
  generate_reporting_variables
end

Instance Attribute Details

#project_nameObject (readonly)

Returns the value of attribute project_name.



10
11
12
# File 'lib/artisan/reports/signoff/report.rb', line 10

def project_name
  @project_name
end

#table_dataObject (readonly)

Returns the value of attribute table_data.



11
12
13
# File 'lib/artisan/reports/signoff/report.rb', line 11

def table_data
  @table_data
end

Instance Method Details

#column_titlesObject



69
70
71
72
73
# File 'lib/artisan/reports/signoff/report.rb', line 69

def column_titles
  titles = ["Points", "Description"]
  titles << "Owner" if show_owner?
  return titles
end

#column_widthsObject



63
64
65
66
67
# File 'lib/artisan/reports/signoff/report.rb', line 63

def column_widths
  widths = [60, 280]
  widths << 100 if show_owner?
  return widths
end

#completedObject



43
44
45
# File 'lib/artisan/reports/signoff/report.rb', line 43

def completed
  report_on(@iteration.stories.select { |story| story.complete? })
end

#featuresObject



47
48
49
# File 'lib/artisan/reports/signoff/report.rb', line 47

def features
  report_on(@iteration.stories.select { |story| !story.nonbillable? })
end

#iteration_nameObject



23
24
25
# File 'lib/artisan/reports/signoff/report.rb', line 23

def iteration_name
  return "Iteration #{@iteration.number}"
end

#tablesObject



27
28
29
30
31
32
33
# File 'lib/artisan/reports/signoff/report.rb', line 27

def tables
  tables = []
  @options["sections"].each do |key, value|
    tables << key if value == "1"
  end
  return tables
end

#tag(attr) ⇒ Object



55
56
57
# File 'lib/artisan/reports/signoff/report.rb', line 55

def tag attr
  report_on(@iteration.stories.select { |story| story.tag_list.include?(attr) })
end

#tasksObject



51
52
53
# File 'lib/artisan/reports/signoff/report.rb', line 51

def tasks
  report_on(@iteration.stories.select { |story| story.nonbillable? })
end

#team_member_namesObject



39
40
41
# File 'lib/artisan/reports/signoff/report.rb', line 39

def team_member_names
  Artisan::Iterations::IterationPresenter.new(@iteration).team_names
end

#total_billed_pointsObject



35
36
37
# File 'lib/artisan/reports/signoff/report.rb', line 35

def total_billed_points
  Artisan::Iterations::IterationPresenter.new(@iteration).total_billed_points
end

#untaggedObject



59
60
61
# File 'lib/artisan/reports/signoff/report.rb', line 59

def untagged
  report_on(@iteration.stories.select { |story| story.tag_list.empty? })
end