Module: Pragma::Decorator::Collection::ClassMethods
- Defined in:
- lib/pragma/decorator/collection.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#decorate_with(decorator) ⇒ Object
Defines the decorator to use for each resource in the collection.
Instance Method Details
#decorate_with(decorator) ⇒ Object
TODO:
Accept a callable/block or document how to decorate polymorphic collections
Defines the decorator to use for each resource in the collection.
57 58 59 |
# File 'lib/pragma/decorator/collection.rb', line 57 def decorate_with(decorator) collection :represented, as: :data, exec_context: :decorator, decorator: decorator end |