Top Level Namespace

Defined Under Namespace

Classes: Diter

Instance Method Summary collapse

Instance Method Details

#execute(program, *args) ⇒ Object



82
83
84
85
86
87
88
89
90
91
# File 'bin/diter', line 82

def execute(program, *args)
  Process.waitpid(spawn(program, *args))
  $?.success?
rescue Errno::EACCES, Errno::ENOEXEC
  $stderr.puts "diter: not executable: #{program}"
  false
rescue Errno::ENOENT
  $stderr.puts "diter: command not found: #{program}"
  false
end