Class: ROM::HTTP::Handlers::JSONResponse
- Inherits:
-
Object
- Object
- ROM::HTTP::Handlers::JSONResponse
- Defined in:
- lib/rom/http/handlers/json.rb
Overview
Default handler for JSON responses
Class Method Summary collapse
-
.call(response, dataset) ⇒ Array<Hash>
Handle JSON responses.
Class Method Details
.call(response, dataset) ⇒ Array<Hash>
Handle JSON responses
59 60 61 |
# File 'lib/rom/http/handlers/json.rb', line 59 def self.call(response, dataset) Array([JSON.parse(response.body)]).flatten(1) end |