class Risu::Templates::TechnicalFindingsTemplate

Public Class Methods

new() click to toggle source
# File lib/risu/templates/technical_findings.rb, line 27
def initialize
        @template_info =
        {
                :name => "technical_findings",
                :author => "hammackj",
                :version => "0.0.9",
                :renderer => "PDF",
                :description => "Generates a Technical Findings Report"
        }
end

Public Instance Methods

print_technical_findings(risks, text, color, last=false) click to toggle source
render(output) click to toggle source
# File lib/risu/templates/technical_findings.rb, line 86
def render output
        text Report.classification.upcase, :align => :center
        text "\n"

        report_title Report.title
        report_subtitle "Technical Findings"
        report_author "This report was prepared by\n#{Report.author}"
        text "\n\n\n"

        # If you uncomment the med/low change the true in high to false for a new page after it

        print_technical_findings(Item.critical_risks_unique, "Critical Findings", Risu::GRAPH_COLORS[0]) if Item.critical_risks_unique.to_a.size != 0
        print_technical_findings(Item.high_risks_unique, "High Findings", Risu::GRAPH_COLORS[1], true) if Item.high_risks_unique.to_a.size != 0
        #print_technical_findings(Item.medium_risks_unique, "Medium Findings", Risu::GRAPH_COLORS[2]) if Item.medium_risks_unique.to_a.size != 0
        #print_technical_findings(Item.low_risks_unique, "Low Findings", Risu::GRAPH_COLORS[3], true) if Item.low_risks_unique.to_a.size != 0

        output.number_pages "<page> of <total>", :at => [output.bounds.right - 75, 0], :width => 150, :page_filter => :all
end