Class: CriticalChainPage
- Inherits:
-
BaseDocument
- Object
- BaseDocument
- CriticalChainPage
- Includes:
- DecisionGrouping, HtmlSafe, PlanningDates
- Defined in:
- lib/almirah/doc_types/critical_chain_page.rb
Overview
The dedicated Critical Chain & Project Buffer page (ENH-202): one block per decision group, each showing the ordered critical chain rows, the project buffer, and the projected duration; a group with no estimates is marked unestimated. The chain and buffer are ADR-195's CriticalChain, reused unchanged -- this page only relocates the rendering off the overview.
Constant Summary collapse
- FEVER_TRAIL_WEEKS =
Recent Fridays sampled for the fever-chart trail (ADR-196), matching the velocity chart's window.
6
Constants included from HtmlSafe
Instance Attribute Summary collapse
-
#project ⇒ Object
Returns the value of attribute project.
Attributes inherited from BaseDocument
#dom, #headings, #id, #output_rel_path, #title
Instance Method Summary collapse
-
#initialize(project) ⇒ CriticalChainPage
constructor
A new instance of CriticalChainPage.
- #needs_chartjs? ⇒ Boolean
- #to_console ⇒ Object
- #to_html(output_file_path) ⇒ Object
Methods included from PlanningDates
Methods included from DecisionGrouping
Methods included from HtmlSafe
#escape_attr, #escape_text, #safe_url
Methods inherited from BaseDocument
#critical_chain_link, #decisions_link, #home_link, #index_link, #rel_to, #save_html_to_file
Constructor Details
#initialize(project) ⇒ CriticalChainPage
Returns a new instance of CriticalChainPage.
29 30 31 32 33 34 |
# File 'lib/almirah/doc_types/critical_chain_page.rb', line 29 def initialize(project) super() @project = project @title = 'Critical Chain & Project Buffer' @id = 'critical-chain' end |
Instance Attribute Details
#project ⇒ Object
Returns the value of attribute project.
27 28 29 |
# File 'lib/almirah/doc_types/critical_chain_page.rb', line 27 def project @project end |
Instance Method Details
#needs_chartjs? ⇒ Boolean
40 41 42 |
# File 'lib/almirah/doc_types/critical_chain_page.rb', line 40 def needs_chartjs? true end |
#to_console ⇒ Object
36 37 38 |
# File 'lib/almirah/doc_types/critical_chain_page.rb', line 36 def to_console puts "\e[36mCritical Chain: #{@id}\e[0m" end |
#to_html(output_file_path) ⇒ Object
44 45 46 47 |
# File 'lib/almirah/doc_types/critical_chain_page.rb', line 44 def to_html(output_file_path) html_rows = ['', "<h1>#{@title}</h1>\n", render_critical_chain] save_html_to_file(html_rows, nil, output_file_path) end |