Method: #result_matches
- Defined in:
- lib/shell_commands.rb
#result_matches(regex) ⇒ Object
8 9 10 11 |
# 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 |