This repository has been archived by the owner. It is now read-only.
Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 327 Bytes

Ropen

A process execution library which doesn't suck.

  cmd = Ropen::Command.new("/bin/cat", "/home/coda/my-recipes.txt")
  cmd.on_stdout do |cat, line|
    if line =~ /sugar/
      puts line
    end
    cat.stdin.puts "cat doesn't take input, but imagine if it did..."
  end
  cmd.run