Module: Command
- Defined in:
- lib/command.rb
Overview
Handles all direct interaction with Bash
Class Method Summary collapse
-
.run(command, output = true) ⇒ Object
Runs a command and passes output to standard out, and returns the result.
Class Method Details
.run(command, output = true) ⇒ Object
Runs a command and passes output to standard out, and returns the result
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/command.rb', line 9 def self.run(command, output = true) IO.popen "#{command}" do |fd| if output until fd.eof? puts fd.readline end end end return $?.success? end |