Class: JSONAPI::Renderer::SimpleResourcesProcessor Private
- Inherits:
-
ResourcesProcessor
- Object
- ResourcesProcessor
- JSONAPI::Renderer::SimpleResourcesProcessor
- Defined in:
- lib/jsonapi/renderer/simple_resources_processor.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #process_resources ⇒ Object private
Methods inherited from ResourcesProcessor
Instance Method Details
#process_resources ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/jsonapi/renderer/simple_resources_processor.rb', line 7 def process_resources [@primary, @included].each do |resources| resources.map! do |res| ri = [res.jsonapi_type, res.jsonapi_id] include_dir = @include_rels[ri] fields = @fields[res.jsonapi_type.to_sym] res.as_jsonapi(include: include_dir, fields: fields) end end end |