Sha256: 17e8ed99fb5620563243c3e8541b940c5d455f5e89adfef6bf445b2981dff447
Contents?: true
Size: 453 Bytes
Versions: 14
Compression:
Stored size: 453 Bytes
Contents
# encoding: utf-8 require 'faraday' module Nimbu class Response::Mashify < Response dependency 'hashie/mash' define_parser do |body| ::Hashie::Mash.new body end def parse(body) case body when Hash self.class.parser.call body when Array body.map { |item| item.is_a?(Hash) ? self.class.parser.call(item) : item } else body end end end # Response::Mashify end # Nimbu
Version data entries
14 entries across 14 versions & 1 rubygems