Class: ForestLiana::SchemaSerializer
- Inherits:
-
Object
- Object
- ForestLiana::SchemaSerializer
- Defined in:
- app/serializers/forest_liana/schema_serializer.rb
Instance Method Summary collapse
-
#initialize(collections, meta) ⇒ SchemaSerializer
constructor
A new instance of SchemaSerializer.
- #serialize ⇒ Object
Constructor Details
#initialize(collections, meta) ⇒ SchemaSerializer
Returns a new instance of SchemaSerializer.
2 3 4 5 6 7 |
# File 'app/serializers/forest_liana/schema_serializer.rb', line 2 def initialize collections, @collections = collections @meta = @data = [] @included = [] end |
Instance Method Details
#serialize ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/serializers/forest_liana/schema_serializer.rb', line 9 def serialize populate_data_and_included { data: @data, included: @included, meta: @meta } end |