Sha256: 136184bae04f147a1e258f1c075924e04838807457dd97c43c80acbeb1a72e67
Contents?: true
Size: 554 Bytes
Versions: 7
Compression:
Stored size: 554 Bytes
Contents
# -*- coding: binary -*- require 'rex/ui' module Rex module Ui module Text ### # # This class implements output against a file # ### class Output::File < Rex::Ui::Text::Output attr_accessor :fd def initialize(path) self.fd = ::File.open(path, "wb") end def supports_color? false end # # Prints the supplied message to file output. # def print_raw(msg = '') return if not self.fd self.fd.write(msg) self.fd.flush msg end def close self.fd.close if self.fd self.fd = nil end end end end end
Version data entries
7 entries across 7 versions & 3 rubygems