Sha256: fbb420d3fd24518f17a24bb6f6fa16615e4427a6f28f529c119e2bd05e254caa
Contents?: true
Size: 326 Bytes
Versions: 15
Compression:
Stored size: 326 Bytes
Contents
require 'json' require 'hashie/dash' module Lurker class Response < Hashie::Dash property :status, required: true property :body, default: {} def self.build_from_action_dispatch(response) new( status: response.status, body: (JSON.parse(response.body) rescue {}) ) end end end
Version data entries
15 entries across 15 versions & 1 rubygems