Module: Pragma::Decorator::Collection
- Defined in:
- lib/pragma/decorator/collection.rb
Overview
This module is used to represent collections of objects.
It will wrap the collection in a data
property so that you can include meta-data about the collection at the root level.
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/pragma/decorator/collection.rb', line 33 def self.included(klass) klass.include InstanceMethods klass.extend ClassMethods klass.class_eval do collection :represented, as: :data, exec_context: :decorator end end |