Method: ShellCommand.do_command

Defined in:
lib/shell_commands/shell_command.rb

.do_command(command) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/shell_commands/shell_command.rb', line 31

def self.do_command(command)
  if !raw_do_command(command)
    if @@error_proc.nil?
      raise ShellCommandFailure.new(@@last_result)
    else
      @@error_proc.call(@@last_result)
    end
    return false
  end
  return true
end