class Object

Public Instance Methods

do_command(command) click to toggle source
# File lib/shell_commands.rb, line 4
def do_command(command)
        ShellCommand.do_command(command)
end
regex_result(regex) click to toggle source
# File lib/shell_commands.rb, line 13
def regex_result(regex)
  return regex.match(ShellCommand.last_result["result"]) if regex.class == "Regexp"
  return Regexp.new(regex).match(ShellCommand.last_result["result"])
end
result_matches(regex) click to toggle source
# File lib/shell_commands.rb, line 8
def result_matches(regex)
        return !regex.match(ShellCommand.last_result["result"]).nil? if regex.class == "Regexp"
        return !Regexp.new(regex).match(ShellCommand.last_result["result"]).nil?
end