Class/Module Index [+]

Quicksearch

Rex::Ui::Text::Output::Tee

This class implements output against a file and stdout

Attributes

fd[RW]

Public Class Methods

new(path) click to toggle source
# File lib/rex/ui/text/output/tee.rb, line 16
def initialize(path)
        self.fd = ::File.open(path, "ab")
        super()
end

Public Instance Methods

close() click to toggle source
# File lib/rex/ui/text/output/tee.rb, line 46
def close
        self.fd.close if self.fd
        self.fd = nil
end
supports_color?() click to toggle source
# File lib/rex/ui/text/output/tee.rb, line 21
def supports_color?
        case config[:color]
        when true
                return true
        when false
                return false
        else # auto
                term = Rex::Compat.getenv('TERM')
                return (term and term.match(/(?:vt10[03]|xterm(?:-color)?|linux|screen|rxvt)/) != nil)
        end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.