Class: Beatport::Support::Middleware

Inherits:
Faraday::Response::Middleware
  • Object
show all
Defined in:
lib/beatport/support/middleware.rb

Instance Method Summary collapse

Instance Method Details

#jsonify(body) ⇒ Object



8
9
10
11
# File 'lib/beatport/support/middleware.rb', line 8

def jsonify(body)
  body = ::JSON.parse(body)
  body = Support::Inflector.process_keys(body) { |k| Support::Inflector.underscore(k) }
end

#parse(body) ⇒ Object



4
5
6
# File 'lib/beatport/support/middleware.rb', line 4

def parse(body)
  body = jsonify(body)
end