Sha256: 2e55fba8139c463519f4a968a860e437c267d4ed2bab2b28db578008c855765d

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 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 successful(e.g: exited with a 
status code of 0) or if you'd like to access the standard output and standard 
error streams for a given shell command.

__EXAMPLES__

The first example lets you handle a failure of a command 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 `ls` had problems executing."
      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.5 README.md