Sha256: c5b076ecf06cef88ed8f36c7be2600e051070e51ddf47778bccc4736992bcc3b

Contents?: true

Size: 252 Bytes

Versions: 6

Compression:

Stored size: 252 Bytes

Contents

module Faraday
  class Response::Rubyize < Response::Middleware
    def parse(body)
      case body
      when Hash
        body.to_snake_keys
      when Array
        body.map { |item| parse(item) }
      else
        body
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
fullcontact-api-ruby-0.1.0 lib/faraday/response/rubyize.rb
fullcontact-0.18.0 lib/faraday/response/rubyize.rb
fullcontact-0.17.0 lib/faraday/response/rubyize.rb
fullcontact-0.16.0 lib/faraday/response/rubyize.rb
fullcontact-0.15.0 lib/faraday/response/rubyize.rb
fullcontact-0.14.0 lib/faraday/response/rubyize.rb