Method: Mixin::Shell#execute
- Defined in:
- lib/fox/interface/thor/mixin/shell.rb
#execute(command) ⇒ String
Returns result of command
70 71 72 73 74 75 76 77 |
# File 'lib/fox/interface/thor/mixin/shell.rb', line 70 def execute command exists = which( command ) raise ArgumentError, "Command not found" unless( exists ) result = `#{command}` return result end |