Class Index [+]

Quicksearch

Mocha::ParameterMatchers::AnyOf

Parameter matcher which combines a number of other matchers using a logical OR.

Public Class Methods

new(*matchers) click to toggle source

@private

    # File lib/mocha/parameter_matchers/any_of.rb, line 39
39:       def initialize(*matchers)
40:         @matchers = matchers
41:       end

Public Instance Methods

matches?(available_parameters) click to toggle source

@private

    # File lib/mocha/parameter_matchers/any_of.rb, line 44
44:       def matches?(available_parameters)
45:         parameter = available_parameters.shift
46:         @matchers.any? { |matcher| matcher.to_matcher.matches?([parameter]) }
47:       end
mocha_inspect() click to toggle source

@private

    # File lib/mocha/parameter_matchers/any_of.rb, line 50
50:       def mocha_inspect
51:         "any_of(#{@matchers.map { |matcher| matcher.mocha_inspect }.join(", ") })"
52:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.