Sha256: e714dc6ddcd5f7de25ab0384e96234d045c8e4e4b4b9d70246a30023ea97611f
Contents?: true
Size: 1.19 KB
Versions: 3
Compression:
Stored size: 1.19 KB
Contents
= RunIt - A wrapper class around Open3#popen3 Author:: Tamara Temple <tamouse@gmail.com> Copyright:: Copyright (c) 2013 Tamara Temple Web Development License:: mit, see LICENSE.txt == SYNOPSIS runner = RunIt.new(command, [input,] [output,] [error]) result = runner.run puts runner.output if result puts runner.error unless result == DESCRIPTION RunIt is a very simple class that wraps up the Open3#popen3 call. When you create the object, you specify the command to run as a string, optionally the input to the command (no input is given if nil), a type of receiver for the output of the command, but default this will be a string, and a type of receiver for the error output of the command, by default, also a string. The #run method will execute the command, returning a Boolean denoting success or failure. The process status, standard output and standard error will be available from the runner object itself. == Links * {Source on Github}[https://github.com/tamouse/RunIt] * RDoc[LINK TO RDOC.INFO] == Install gem install RunIt == Examples runner = RunIt.new("/bin/ls") if runner.run # process runner.output else STDERR.puts runner.error end == Contributing
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
RunIt-1.0.1 | README.rdoc |
RunIt-1.0.0 | README.rdoc |
RunIt-0.1.0 | README.rdoc |