Sha256: 60452abef699c38def51713742f42db23b80cc786248d859ae4d42c2c73ac465
Contents?: true
Size: 374 Bytes
Versions: 1
Compression:
Stored size: 374 Bytes
Contents
require 'pty' module Runter module Shell def execute(command) begin PTY.spawn(command) do |stdin, stdout, pid| begin stdin.each { |line| print line } rescue Errno::EIO end end rescue PTY::ChildExited puts "The child process exited!" end end module_function :execute end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
runter-0.1.0 | lib/runter/shell.rb |