Class: DecentPresenter::CollectionProxy
- Inherits:
-
Object
- Object
- DecentPresenter::CollectionProxy
- Defined in:
- lib/decent_presenter/collection_proxy.rb
Instance Method Summary collapse
-
#initialize(original_collection, presented_collection) ⇒ CollectionProxy
constructor
A new instance of CollectionProxy.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(original_collection, presented_collection) ⇒ CollectionProxy
Returns a new instance of CollectionProxy.
13 14 15 16 |
# File 'lib/decent_presenter/collection_proxy.rb', line 13 def initialize(original_collection, presented_collection) @original_collection = original_collection @presented_collection = presented_collection end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
18 19 20 |
# File 'lib/decent_presenter/collection_proxy.rb', line 18 def method_missing(method, *args, &block) presented_collection.send(method, *args, &block) end |