Class: Signoff::Report
- Inherits:
-
Object
- Object
- Signoff::Report
- Extended by:
- Forwardable
- Defined in:
- lib/artisan/reports/signoff/report.rb
Instance Attribute Summary collapse
-
#project_name ⇒ Object
readonly
Returns the value of attribute project_name.
-
#table_data ⇒ Object
readonly
Returns the value of attribute table_data.
Instance Method Summary collapse
- #column_titles ⇒ Object
- #column_widths ⇒ Object
- #completed ⇒ Object
- #features ⇒ Object
-
#initialize(iteration, project_name, options = {}) ⇒ Report
constructor
A new instance of Report.
- #iteration_name ⇒ Object
- #tables ⇒ Object
- #tag(attr) ⇒ Object
- #tasks ⇒ Object
- #team_member_names ⇒ Object
- #total_billed_points ⇒ Object
- #untagged ⇒ Object
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, = {}) @iteration = iteration @project_name = project_name @options = @table_data = {} generate_reporting_variables end |
Instance Attribute Details
#project_name ⇒ Object (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_data ⇒ Object (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_titles ⇒ Object
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_widths ⇒ Object
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 |
#completed ⇒ Object
43 44 45 |
# File 'lib/artisan/reports/signoff/report.rb', line 43 def completed report_on(@iteration.stories.select { |story| story.complete? }) end |
#features ⇒ Object
47 48 49 |
# File 'lib/artisan/reports/signoff/report.rb', line 47 def features report_on(@iteration.stories.select { |story| !story.nonbillable? }) end |
#iteration_name ⇒ Object
23 24 25 |
# File 'lib/artisan/reports/signoff/report.rb', line 23 def iteration_name return "Iteration #{@iteration.number}" end |
#tables ⇒ Object
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 |
#tasks ⇒ Object
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_names ⇒ Object
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_points ⇒ Object
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 |
#untagged ⇒ Object
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 |