Sha256: 0c66188591444f6ca06dccd0b14a567c4cbca188fdb1f8db7af64863c10aeb80

Contents?: true

Size: 272 Bytes

Versions: 5

Compression:

Stored size: 272 Bytes

Contents

require 'plissken'

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

5 entries across 5 versions & 1 rubygems

Version Path
fullcontact-0.13.0 lib/faraday/response/rubyize.rb
fullcontact-0.12.0 lib/faraday/response/rubyize.rb
fullcontact-0.11.0 lib/faraday/response/rubyize.rb
fullcontact-0.10.0 lib/faraday/response/rubyize.rb
fullcontact-0.9.0 lib/faraday/response/rubyize.rb