Sha256: d530e2d6ed7a55b87258e7765b1d52b49affe5b6be39bc0f9ce337ff522d843b
Contents?: true
Size: 455 Bytes
Versions: 73
Compression:
Stored size: 455 Bytes
Contents
# encoding: utf-8 require 'faraday' module Github 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 # Github
Version data entries
73 entries across 73 versions & 1 rubygems