Class: FlexMock::EqualMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/flexmock-0.8.3/lib/flexmock/argument_matchers.rb

Overview

Match only things that are equal.

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ EqualMatcher

Returns a new instance of EqualMatcher.



29
30
31
# File 'lib/gems/flexmock-0.8.3/lib/flexmock/argument_matchers.rb', line 29

def initialize(obj)
  @obj = obj
end

Instance Method Details

#===(target) ⇒ Object



32
33
34
# File 'lib/gems/flexmock-0.8.3/lib/flexmock/argument_matchers.rb', line 32

def ===(target)
  @obj == target
end

#inspectObject



35
36
37
# File 'lib/gems/flexmock-0.8.3/lib/flexmock/argument_matchers.rb', line 35

def inspect
  "==(#{@obj.inspect})"
end