Sha256: 8cc9cb9ce42b31be722085cf392192a9b23d6cce2fc7b01678ca42b97ebbf1da

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

__OVERVIEW__


| Project         | shell\_command 
|:----------------|:--------------------------------------------------
| Homepage        | https://github.com/robgleeson/shell_command
| Wiki            | https://github.com/robgleeson/shell_command/wiki
| Documentation   | http://rubydoc.info/gems/shell_command/frames 
| Author          | Rob Gleeson   

__DESCRIPTION__

A library for spawning shell commands in Ruby. The library can be useful when 
you'd like to run a command and find out if it was successul(e.g: exited with a 
status code of 0) or if you'd like to access the standard output and standard 
error streams linked to a shell command.


__EXAMPLES__

The first example lets you handle a failure yourself, but the second example
assumes you want a exception raised on failure.  

__1.__

    ShellCommand.run "ls" do |command|
      if command.success?
        puts command.stdout
      else
        puts "Looks like I couldn't execute `ls`, sorry!"
      end
    end

__2.__

    begin
      ShellCommand.run! "ls"
    rescue ShellCommand::Exception => e 
      p e.message
    end

__SUPPORTED PLATFORMS__

  - Rubinius (1.9 mode)
  - CRuby 1.9+

__LICENSE__

See LICENSE.txt

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shell_command-0.2.3 README.md