Class: Faraday::Response::Mashify
- Inherits:
-
Middleware
- Object
- Middleware
- Faraday::Response::Mashify
- Defined in:
- lib/faraday/response/mashify.rb
Overview
Parse response bodies as Hashie::Mash.
Instance Method Summary collapse
-
#initialize(app = nil, mash_class: Hashie::Mash, symbolize: true) ⇒ Mashify
constructor
A new instance of Mashify.
- #on_complete(env) ⇒ Object
Constructor Details
#initialize(app = nil, mash_class: Hashie::Mash, symbolize: true) ⇒ Mashify
Returns a new instance of Mashify.
7 8 9 10 11 12 |
# File 'lib/faraday/response/mashify.rb', line 7 def initialize(app = nil, mash_class: Hashie::Mash, symbolize: true) super(app) @mash_class = mash_class @symbolize = symbolize end |
Instance Method Details
#on_complete(env) ⇒ Object
14 15 16 |
# File 'lib/faraday/response/mashify.rb', line 14 def on_complete(env) process_response(env) end |