Class: Spy::Collection::Entry
- Inherits:
-
Struct
- Object
- Struct
- Spy::Collection::Entry
- Defined in:
- lib/spy/collection/entry.rb
Overview
Abstraction to isolate domain logic
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
4 5 6 |
# File 'lib/spy/collection/entry.rb', line 4 def method @method end |
#spied ⇒ Object
Returns the value of attribute spied
4 5 6 |
# File 'lib/spy/collection/entry.rb', line 4 def spied @spied end |
#spy ⇒ Object
Returns the value of attribute spy
4 5 6 |
# File 'lib/spy/collection/entry.rb', line 4 def spy @spy end |
Instance Method Details
#==(other) ⇒ Object
10 11 12 |
# File 'lib/spy/collection/entry.rb', line 10 def ==(other) key == other.key end |
#key ⇒ Object
5 6 7 8 |
# File 'lib/spy/collection/entry.rb', line 5 def key receiver = method.is_a?(Method) ? method.receiver : nil "#{receiver.object_id}|#{method.name}|#{method.class}" end |