Sha256: 0a2b4a0574ae628c305fc90fd84549c836b045cb92561453afea16160d7c0b88
Contents?: true
Size: 474 Bytes
Versions: 7
Compression:
Stored size: 474 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" require "./app/serializers/fast_jsonapi/#{klass}_serializer" FastJsonapi.const_get(serializer).new(resource, opt).serializable_hash end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems