Permalink
Browse files

only mashify hashes

  • Loading branch information...
1 parent 3c82bde commit fa63fb9a27bf0d3e9df9fff2f1306d1124e3ea25 @mislav committed Apr 2, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 instagram.rb
View
6 instagram.rb
@@ -12,7 +12,11 @@ def configure
class Mashify < Faraday::Response::Middleware
def on_complete(env)
- env[:body] = Hashie::Mash.new(env[:body]) if Hash === env[:body] or Array === env[:body]
+ super if Hash === env[:body]
+ end
+
+ def parse(body)
+ Hashie::Mash.new(body)
end
end

0 comments on commit fa63fb9

Please sign in to comment.