Class Index [+]

Quicksearch

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 33
33:       def initialize(*matchers)
34:         @matchers = matchers
35:       end

Public Instance Methods

matches?(available_parameters) click to toggle source

@private

    # File lib/mocha/parameter_matchers/all_of.rb, line 38
38:       def matches?(available_parameters)
39:         parameter = available_parameters.shift
40:         @matchers.all? { |matcher| matcher.to_matcher.matches?([parameter]) }
41:       end
mocha_inspect() click to toggle source

@private

    # File lib/mocha/parameter_matchers/all_of.rb, line 44
44:       def mocha_inspect
45:         "all_of(#{@matchers.map { |matcher| matcher.mocha_inspect }.join(", ") })"
46:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.