Module: Mocha::ObjectMethods

Included in:
Object
Defined in:
lib/mocha/inspect.rb,
lib/mocha/metaclass.rb,
lib/mocha/parameter_matchers/object.rb

Instance Method Summary collapse

Instance Method Details

#__metaclass__Object



4
5
6
# File 'lib/mocha/metaclass.rb', line 4

def __metaclass__
  class << self; self; end
end

#mocha_inspectObject



6
7
8
9
10
# File 'lib/mocha/inspect.rb', line 6

def mocha_inspect
  address = self.__id__ * 2
  address += 0x100000000 if address < 0
  inspect =~ /#</ ? "#<#{self.class}:0x#{'%x' % address}>" : inspect
end

#to_matcherObject

:nodoc:



6
7
8
# File 'lib/mocha/parameter_matchers/object.rb', line 6

def to_matcher # :nodoc:
  Mocha::ParameterMatchers::Equals.new(self)
end