Module: Spy::Collection::SpyHelper
- Included in:
- Spy::Collection
- Defined in:
- lib/spy/collection.rb
Overview
Add a slicker interface that abstracts away Collection::Entry
Instance Method Summary collapse
Instance Method Details
#<<(spy) ⇒ Object
33 34 35 36 37 |
# File 'lib/spy/collection.rb', line 33 def <<(spy) entry = Collection::Entry.new(spy.receiver, spy.msg, spy.method_type) entry.value = spy insert entry end |
#pop(receiver, msg, method_type) ⇒ Object
39 40 41 |
# File 'lib/spy/collection.rb', line 39 def pop(receiver, msg, method_type) remove Collection::Entry.new(receiver, msg, method_type) end |