class Risu::Templates::MSPatchSummary

Public Class Methods

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

Public Instance Methods

render(output) click to toggle source
# File lib/risu/templates/ms_patch_summary.rb, line 38
def render output
        text Report.classification.upcase, :align => :center
        text "\n"

        report_title Report.title
        report_subtitle "Missing Microsoft Patch Summary"
        report_author "This report was prepared by\n#{Report.author}"

        text "\n\n\n"

        Item.ms_patches.each do |item|
                host = Host.find_by_id(item.host_id)

                next if host == nil

                if host.name != nil
                        text "Host:", :style => :bold
                        text host.name
                end

                if host.os != nil
                        text "OS:", :style => :bold
                        text host.os
                end

                if host.mac != nil
                        text "Mac:", :style => :bold
                        text host.mac
                end
                text "\n"
                text item.plugin_output
                text "\n"
        end
end