Sha256: ad0efe3afdd217c6e3a52ce371d41c2b43c12d58cc82f6ac1c31a0117fb1f554

Contents?: true

Size: 266 Bytes

Versions: 7

Compression:

Stored size: 266 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pico_api-0.1.0 lib/pico_api/json_api_renderer.rb
pico_api-0.0.6 lib/pico_api/json_api_renderer.rb
pico_api-0.0.5 lib/pico_api/json_api_renderer.rb
pico_api-0.0.4 lib/pico_api/json_api_renderer.rb
pico_api-0.0.3 lib/pico_api/json_api_renderer.rb
pico_api-0.0.2 lib/pico_api/json_api_renderer.rb
pico_api-0.0.1 lib/pico_api/json_api_renderer.rb