Sha256: 320878b02f2a9189b6ae5a005fad947cc6eb9c3749fff2f9566020d11ab48fe1
Contents?: true
Size: 513 Bytes
Versions: 14
Compression:
Stored size: 513 Bytes
Contents
require 'faraday_middleware/response/mashify' module FaradayMiddleware # Public: Converts parsed response bodies to a Hashie::Rash if they were of # Hash or Array type. class Deashify < Mashify dependency do require 'desk/deash' self.mash_class = ::Hashie::Deash end def parse(body) case body when Hash raw = mash_class.new({:raw => body}) when Array raw = body.map { |item| parse(item) } else raw = body end end end end
Version data entries
14 entries across 14 versions & 1 rubygems