Class: CollectionDelegator
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- CollectionDelegator
- Defined in:
- lib/r_kit/struct/collection_delegator.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from SimpleDelegator
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/r_kit/struct/collection_delegator.rb', line 6 def method_missing method_name, *args, &block closure = super case closure when collection.class self.collection = closure self else closure end end |