Module: PicoApi::JsonApiRenderer

Defined in:
lib/pico_api/json_api_renderer.rb

Instance Method Summary collapse

Instance Method Details

#serialize(resource, **opts) ⇒ Object



5
6
7
8
9
# File 'lib/pico_api/json_api_renderer.rb', line 5

def serialize(resource, **opts)
  serializer_klass = opts.delete(:serializer)
  serializer = serializer_klass.new(resource, opts)
  serializer.serializable_hash
end