Sha256: ff5de7f9a9ff059adf332f067795aa050ca80b88db849612adb58f98451b70f8
Contents?: true
Size: 666 Bytes
Versions: 1
Compression:
Stored size: 666 Bytes
Contents
require 'background_process' module Aruba class Process def initialize(cmd) @cmd = cmd end def run!(&block) @process = BackgroundProcess.run(@cmd) yield self if block_given? end def stdin @process.stdin end def output stdout + stderr end def stdout if @process @stdout ||= @process.stdout.read else '' end end def stderr if @process @stderr ||= @process.stderr.read else '' end end def stop if @process status = @process.wait(1) status && status.exitstatus end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aruba-0.2.5 | lib/aruba/process.rb |