Class: RubyExpect::EachMatch

Inherits:
Match
  • Object
show all
Defined in:
lib/ruby_expect/procedure.rb

Overview

Expect each of a set of patterns

Instance Method Summary collapse

Methods inherited from Match

#expect, #initialize

Constructor Details

This class inherits a constructor from RubyExpect::Match

Instance Method Details

#runObject

Procedure input data for the set of expected patterns


96
97
98
99
100
101
102
# File 'lib/ruby_expect/procedure.rb', line 96

def run
  @patterns.each_index do |i|
    retval = @exp.expect(@patterns[i].pattern, &@patterns[i].block)
    return nil if (retval.nil?)
  end
  return nil
end