Class: Spec::Mocks::RegexpArgConstraint

Class | Spec::Mocks::RegexpArgConstraint
In: | lib/spec/mocks/argument_expectation.rb
Parent: | Object

### Methods

matches? new

### Public Class methods

new(regexp)

[Source]

        # File lib/spec/mocks/argument_expectation.rb, line 25
    25:       def initialize(regexp)
    26:         @regexp = regexp
    27:       end

### Public Instance methods

matches?(value)

[Source]

        # File lib/spec/mocks/argument_expectation.rb, line 29
    29:       def matches?(value)
    30:         return value =~ @regexp unless value.is_a?(Regexp)
    31:         value == @regexp
    32:       end

[Validate]