Sha256: a052b25d295a71e1942782ce5d2a0ef8c0e83271456db81d7f4e143ca8d732d4

Contents?: true

Size: 409 Bytes

Versions: 4

Compression:

Stored size: 409 Bytes

Contents

module PatternPark

  class ProcessRunner
    attr_reader :path,
                :r,
                :w,
                :e
    
    def initialize(*command)
      require 'open3'
      @command = command
      @w, @r, @e = Open3.popen3(*@command)
    end
    
    def puts(msg)
      @w.puts(msg)
    end

    def read
      return r.read
    end
    
    def read_err
      return e.read
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sprout-0.5.11 lib/process_runner.rb
sprout-0.5.10 lib/process_runner.rb
sprout-0.5.13 lib/process_runner.rb
sprout-0.5.9 lib/process_runner.rb