Class: JSONAPI::Renderer::ResourcesProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/jsonapi/renderer/resources_processor.rb

Instance Method Summary collapse

Instance Method Details

#process(resources, include, fields) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/jsonapi/renderer/resources_processor.rb', line 7

def process(resources, include, fields)
  @resources = resources
  @include   = include
  @fields    = fields

  traverse_resources
  process_resources

  [@primary, @included]
end