Class Spec::Mocks::ArgumentMatchers::RegexpMatcher

  1. lib/spec/mocks/argument_matchers.rb
Parent: Object

Methods

public class

  1. new

public instance

  1. ==

Public class methods

new (regexp)
[show source]
# File lib/spec/mocks/argument_matchers.rb, line 34
        def initialize(regexp)
          @regexp = regexp
        end

Public instance methods

== (value)
[show source]
# File lib/spec/mocks/argument_matchers.rb, line 38
        def ==(value)
          return value =~ @regexp unless value.is_a?(Regexp)
          value == @regexp
        end