Class: Mocha::DefaultName
Instance Method Summary collapse
-
#initialize(mock) ⇒ DefaultName
constructor
A new instance of DefaultName.
- #mocha_inspect ⇒ Object
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_inspect ⇒ Object
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 |