module Runter::Shell
Public Class Methods
execute(command)
click to toggle source
# File lib/runter/shell.rb, line 4 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
Private Instance Methods
execute(command)
click to toggle source
# File lib/runter/shell.rb, line 4 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