Class: Spy::RegistryEntry
- Inherits:
-
Struct
- Object
- Struct
- Spy::RegistryEntry
- Defined in:
- lib/spy/registry_entry.rb
Overview
Isolates the format we serialize spies in when we track them
Instance Attribute Summary collapse
-
#method ⇒ Object
Returns the value of attribute method.
-
#spied ⇒ Object
Returns the value of attribute spied.
-
#spy ⇒ Object
Returns the value of attribute spy.
Instance Method Summary collapse
Instance Attribute Details
#method ⇒ Object
Returns the value of attribute method
3 4 5 |
# File 'lib/spy/registry_entry.rb', line 3 def method @method end |
#spied ⇒ Object
Returns the value of attribute spied
3 4 5 |
# File 'lib/spy/registry_entry.rb', line 3 def spied @spied end |
#spy ⇒ Object
Returns the value of attribute spy
3 4 5 |
# File 'lib/spy/registry_entry.rb', line 3 def spy @spy end |
Instance Method Details
#==(other) ⇒ Object
9 10 11 |
# File 'lib/spy/registry_entry.rb', line 9 def ==(other) key == other.key end |
#key ⇒ Object
4 5 6 7 |
# File 'lib/spy/registry_entry.rb', line 4 def key receiver = method.is_a?(Method) ? method.receiver : nil "#{receiver.object_id}|#{method.name}|#{method.class}" end |