Sha256: b50f07f294aec9c6551b268e91018afa46aa16d952bb1b331b982456d712ae85

Contents?: true

Size: 401 Bytes

Versions: 1

Compression:

Stored size: 401 Bytes

Contents

module ApiPack
  module Serializer
    module Adapter
      module FastJsonApi
        module_function

        def serializer_hash(resource, klass, opt: {})
          name_klass = klass.to_s.split('_').collect(&:capitalize).join

          serializer = "#{name_klass}Serializer"
          FastJsonapi.const_get(serializer).new(resource, opt).serializable_hash
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
api_pack-1.0.0 lib/api_pack/serializer/adapter/fast_json_api.rb