Sha256: c02b71d01ab8097dfc2b0227d44d1b064a58f7c8d6040b555ae7135348b7fb00
Contents?: true
Size: 627 Bytes
Versions: 8
Compression:
Stored size: 627 Bytes
Contents
module ApiPack module Errors class ApiErrorsSerializer def initialize(body) @body = body end def serializer serializable end private attr_accessor :body def serializable return serializable_array if body[:details].is_a?(Array) serializable_object end def serializable_object { errors: [ body ] } end def serializable_array { title: body[:title], status: body[:status], errors: body[:details] } end end end end
Version data entries
8 entries across 8 versions & 1 rubygems