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
58 59 60 |
# File 'lib/rom/http/handlers/json.rb', line 58 def self.call(response, _dataset) Array([JSON.parse(response.body)]).flatten(1) end |