Class: HierarchyTable
- Defined in:
- lib/jirametrics/hierarchy_table.rb
Instance Attribute Summary
Attributes inherited from ChartBase
#aggregated_project, #all_boards, #board_id, #canvas_height, #canvas_width, #data_quality, #date_range, #holiday_dates, #issues, #settings, #time_range, #timezone_offset
Instance Method Summary collapse
-
#initialize(block = nil) ⇒ HierarchyTable
constructor
A new instance of HierarchyTable.
- #run ⇒ Object
Methods inherited from ChartBase
#aggregated_project?, #canvas, #canvas_responsive?, #chart_format, #collapsible_issues_panel, #color_for, #completed_issues_in_range, #current_board, #daily_chart_dataset, #description_text, #filter_issues, #format_integer, #format_status, #header_text, #holidays, #label_days, #label_issues, #link_to_issue, #next_id, #random_color, #render, #sprints_in_time_range, #status_category_color, #wrap_and_render
Constructor Details
#initialize(block = nil) ⇒ HierarchyTable
Returns a new instance of HierarchyTable.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/jirametrics/hierarchy_table.rb', line 6 def initialize block = nil super() header_text 'Hierarchy Table' description_text <<-HTML <p>content goes here</p> HTML instance_eval(&block) if block end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/jirametrics/hierarchy_table.rb', line 17 def run tree_organizer = TreeOrganizer.new issues: @issues unless tree_organizer.cyclical_links.empty? = String.new << '<p>Found cyclical links in the parent hierarchy. This is an error and should be ' << 'fixed.</p><ul>' tree_organizer.cyclical_links.each do |link| << '<li>' << link.join(' > ') << '</ul>' end << '</ul>' @description_text += end wrap_and_render(binding, __FILE__) end |