class Mocha::ParameterMatchers::AnyOf
Parameter matcher which combines a number of other matchers using a logical OR.
Public Class Methods
Source
# File lib/mocha/parameter_matchers/any_of.rb, line 36 def initialize(*matchers) @matchers = matchers end
@private
Public Instance Methods
Source
# File lib/mocha/parameter_matchers/any_of.rb, line 41 def matches?(available_parameters) parameter = available_parameters.shift @matchers.any? { |matcher| matcher.to_matcher.matches?([parameter]) } end
@private
Source
# File lib/mocha/parameter_matchers/any_of.rb, line 47 def mocha_inspect "any_of(#{@matchers.map(&:mocha_inspect).join(', ')})" end
@private