Class: Spec::Mocks::ArgumentConstraints::MatcherConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/rspec-1.1.12/lib/spec/mocks/argument_constraints.rb

Instance Method Summary collapse

Constructor Details

#initialize(matcher) ⇒ MatcherConstraint

Returns a new instance of MatcherConstraint.



106
107
108
# File 'lib/gems/rspec-1.1.12/lib/spec/mocks/argument_constraints.rb', line 106

def initialize(matcher)
  @matcher = matcher
end

Instance Method Details

#==(value) ⇒ Object



110
111
112
# File 'lib/gems/rspec-1.1.12/lib/spec/mocks/argument_constraints.rb', line 110

def ==(value)
  @matcher.matches?(value)
end