Sha256: 548e466b906a87390b197cd35ce75a98e3c741c7822a8e6ec72b67f4102ad876

Contents?: true

Size: 308 Bytes

Versions: 2

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

require 'oj'

module ApiResponse
  class Parser
    extend Dry::Initializer

    param :response, type: Types.Interface(:body)
    option :config, default: -> { ApiResponse.config }

    def call
      Oj.load(response.body, mode: :compat, symbol_keys: true)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
api-response-presenter-0.0.2 lib/api_response/parser.rb
api-response-presenter-0.0.1 lib/api_response/parser.rb