Class: DecentPresenter::CollectionProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/decent_presenter/collection_proxy.rb

Instance Method Summary collapse

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