Sha256: 1a082736ab4abe06b2d281e33e1448b0c9943350e04926d7c53b8f2b6ebb4137
Contents?: true
Size: 710 Bytes
Versions: 13
Compression:
Stored size: 710 Bytes
Contents
module CapistranoMulticonfigParallel class InputStream def self.hook(actor, stringio) $stdin = new($stdin, actor, stringio) end def self.unhook $stdin.finish if $stdin.is_a? CapistranoMulticonfigParallel::InputStream $stdin = STDIN end attr_accessor :real, :actor, :stringio def initialize(real_stdin, actor, stringio) self.real = real_stdin self.actor = actor self.stringio = stringio end def gets(*args) @stringio.rewind data = @stringio.read @actor.user_prompt_needed?(data) 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