Class: RubyExpect::AnyMatch
Overview
Expect any one of the specified patterns and call the matching pattern’s block
Instance Method Summary collapse
-
#run ⇒ Object
Procedure input data for the set of expected patterns.
Methods inherited from Match
Constructor Details
This class inherits a constructor from RubyExpect::Match
Instance Method Details
#run ⇒ Object
Procedure input data for the set of expected patterns
80 81 82 83 84 85 86 |
# File 'lib/ruby_expect/procedure.rb', line 80 def run retval = @exp.expect(*@patterns.collect {|p| p.pattern}) unless (retval.nil?) @exp.instance_eval(&@patterns[retval].block) unless (@patterns[retval].block.nil?) end return retval end |