Class Index [+]

Quicksearch

Mocha::ParameterMatchers::RegexpMatches

Parameter matcher which matches if specified regular expression matches actual paramter.

Public Class Methods

new(regexp) click to toggle source

@private

    # File lib/mocha/parameter_matchers/regexp_matches.rb, line 34
34:       def initialize(regexp)
35:         @regexp = regexp
36:       end

Public Instance Methods

matches?(available_parameters) click to toggle source

@private

    # File lib/mocha/parameter_matchers/regexp_matches.rb, line 39
39:       def matches?(available_parameters)
40:         parameter = available_parameters.shift
41:         return false unless parameter.respond_to?(:=~)
42:         parameter =~ @regexp
43:       end
mocha_inspect() click to toggle source

@private

    # File lib/mocha/parameter_matchers/regexp_matches.rb, line 46
46:       def mocha_inspect
47:         "regexp_matches(#{@regexp.mocha_inspect})"
48:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.