Class: RSpec::Mocks::ArgumentMatchers::RegexpMatcher
- Inherits:
- 
      Object
        - Object
- RSpec::Mocks::ArgumentMatchers::RegexpMatcher
 
- Defined in:
- lib/rspec/mocks/argument_matchers.rb
Instance Method Summary (collapse)
- - (Object) ==(value)
- 
  
      - (RegexpMatcher) initialize(regexp) 
  
    constructor
    A new instance of RegexpMatcher. 
Constructor Details
- (RegexpMatcher) initialize(regexp)
A new instance of RegexpMatcher
| 36 37 38 | # File 'lib/rspec/mocks/argument_matchers.rb', line 36 def initialize(regexp) @regexp = regexp end | 
Instance Method Details
- (Object) ==(value)
| 40 41 42 | # File 'lib/rspec/mocks/argument_matchers.rb', line 40 def ==(value) Regexp === value ? value == @regexp : value =~ @regexp end |