Sha256: 494807788ff97c02c217250d75a515f01ed091c8b403a45d40423d067bf8788e

Contents?: true

Size: 637 Bytes

Versions: 13

Compression:

Stored size: 637 Bytes

Contents

module CapistranoMulticonfigParallel
  class OutputStream
    def self.hook(stringio)
      $stdout = new($stdout, stringio)
    end

    def self.unhook
      $stdout.finish if $stdout.is_a? CapistranoMulticonfigParallel::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.print(*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

13 entries across 13 versions & 1 rubygems

Version Path
capistrano_multiconfig_parallel-0.12.2 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.12.1 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.12.0 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.11.6 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.11.5 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.11.4 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.11.3 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.11.2 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.11.1 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.11.0 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.10.0 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.9.2 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb
capistrano_multiconfig_parallel-0.9.1 lib/capistrano_multiconfig_parallel/extensions/output_stream.rb