class Aio::Module::OutputStyle::CompareReport

Public Class Methods

new() click to toggle source
Calls superclass method Aio::Module::OutputStyle::new
# File lib/modules/output/style/compare_report.rb, line 10
def initialize
        super({
                :author                      => "Elin",
                :description => "这个模块用来输出比较信息报告",
                :file_suffix         => "txt",
        })
end

Public Instance Methods

generate() click to toggle source
# File lib/modules/output/style/compare_report.rb, line 18
def generate
        file = File.new(output_file, "w+")

        $stdout = file
        device_manager.each_devices do |device_name, klass|
                pp device_name
                pp klass.warning_klass
                puts
        end

        $stdout = STDOUT
end