Class: JSONAPI::Renderer::ResourcesProcessor
- Inherits:
-
Object
- Object
- JSONAPI::Renderer::ResourcesProcessor
- Defined in:
- lib/jsonapi/renderer/resources_processor.rb
Instance Method Summary collapse
-
#initialize(resources, include, fields) ⇒ ResourcesProcessor
constructor
A new instance of ResourcesProcessor.
- #process ⇒ Object
Constructor Details
#initialize(resources, include, fields) ⇒ ResourcesProcessor
Returns a new instance of ResourcesProcessor.
6 7 8 9 10 |
# File 'lib/jsonapi/renderer/resources_processor.rb', line 6 def initialize(resources, include, fields) @resources = resources @include = include @fields = fields end |
Instance Method Details
#process ⇒ Object
12 13 14 15 16 17 |
# File 'lib/jsonapi/renderer/resources_processor.rb', line 12 def process traverse_resources process_resources [@primary, @included] end |