Class: Mocha::DefaultName

Inherits:
Object show all
Defined in:
lib/mocha/names.rb

Instance Method Summary collapse

Constructor Details

#initialize(mock) ⇒ DefaultName

Returns a new instance of DefaultName


41
42
43
# File 'lib/mocha/names.rb', line 41

def initialize(mock)
  @mock = mock
end

Instance Method Details

#mocha_inspectObject


45
46
47
48
49
# File 'lib/mocha/names.rb', line 45

def mocha_inspect
  address = @mock.__id__ * 2
  address += 0x100000000 if address < 0
  "#<Mock:0x#{'%x' % address}>"
end