class Prenus::Output::Baseout

Public Class Methods

new(events, hosts, options) click to toggle source

This is the super-class that all output classes should inherent

@see Htmlout#initialize
# File lib/output/output.rb, line 15
def initialize(events, hosts, options)
        @events = events
        @hosts = hosts
        @options = options

        if @options[:type] == "html" #Therefore, the output should be a folder name, not a file

                @options[:output] = "." if @options[:output].nil?

                #Check if the output dir exists
                Dir.mkdir(@options[:output]) unless File.exists?(@options[:output])
        else
                @oFile = File.new(@options[:output],'w') unless @options[:output].nil?
                @oFile = STDOUT if @oFile.nil?
        end

end

Public Instance Methods

run() click to toggle source

All inherented classes should implement a run method

@see Htmlout#run
# File lib/output/output.rb, line 37
def run

end