fullcontact/fullcontact-api-ruby

View on GitHub
lib/faraday/response/rubyize.rb

Summary

Maintainability
A
0 mins
Test Coverage
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