Class: DwollaV2::DeepParseIso8601ResponseBody

Inherits:
Object
  • Object
show all
Defined in:
lib/dwolla_v2/middleware/deep_parse_iso8601_response_body.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ DeepParseIso8601ResponseBody

Returns a new instance of DeepParseIso8601ResponseBody.



3
4
5
# File 'lib/dwolla_v2/middleware/deep_parse_iso8601_response_body.rb', line 3

def initialize app
  @app = app
end

Instance Method Details

#call(request_env) ⇒ Object



7
8
9
10
11
# File 'lib/dwolla_v2/middleware/deep_parse_iso8601_response_body.rb', line 7

def call request_env
  @app.call(request_env).on_complete do |response_env|
    response_env.body = Util.deep_parse_iso8601_values(response_env.body)
  end
end