We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e6d912 commit 375576aCopy full SHA for 375576a
lib/restforce/middleware/mashify.rb
@@ -1,18 +1,17 @@
1
module Restforce
2
# Middleware the converts sobject records from JSON into Restforce::SObject objects
3
# and collections of records into Restforce::Collection objects.
4
- class Middleware::Mashify < Restforce::Middleware
+ class Middleware::Mashify < Faraday::Response::Mashify
5
6
- def call(env)
7
- @env = env
8
- response = @app.call(env)
9
- env[:body] = Restforce::Mash.build(body, client)
10
- response
+ def parse(body)
+ Restforce::Mash.build(body, @client)
11
end
12
13
- def body
14
- @env[:body]
+ def initialize(app = nil, client = nil, options = {})
+ super(app)
+ @client = client
+ @options = options
15
16
-
+
17
18
0 commit comments