Sha256: 6829e5aaef6300acad87424acb3ae2de5c99782a3f7123d491bd320f4fa29417
Contents?: true
Size: 665 Bytes
Versions: 21
Compression:
Stored size: 665 Bytes
Contents
module CapistranoSentinel # class used to hook into the output stream class OutputStream def self.hook(stringio) $stdout = new($stdout, stringio) end def self.unhook $stdout.finish if $stdout.is_a? CapistranoSentinel::OutputStream $stdout = STDOUT end attr_accessor :real, :stringio def initialize(real_stdout, stringio) self.real = real_stdout self.stringio = stringio end def write(*args) @stringio.write(*args) @real.write(*args) @real.flush end def finish end def method_missing(name, *args, &block) @real.send name, *args, &block end end end
Version data entries
21 entries across 21 versions & 1 rubygems