class Mocha::ParameterMatchers::AllOf
Parameter matcher which combines a number of other matchers using a logical AND.
Public Class Methods
new(*matchers)
click to toggle source
@private
# File lib/mocha/parameter_matchers/all_of.rb, line 30 def initialize(*matchers) @matchers = matchers end
Public Instance Methods
matches?(available_parameters)
click to toggle source
@private
# File lib/mocha/parameter_matchers/all_of.rb, line 35 def matches?(available_parameters) parameter = available_parameters.shift @matchers.all? { |matcher| matcher.to_matcher.matches?([parameter]) } end
mocha_inspect()
click to toggle source
@private
# File lib/mocha/parameter_matchers/all_of.rb, line 41 def mocha_inspect "all_of(#{@matchers.map(&:mocha_inspect).join(', ')})" end