From 891b008ca937a7626e97f65d5e027a84345592ea Mon Sep 17 00:00:00 2001 From: jasl Date: Wed, 9 Nov 2016 03:43:22 +0800 Subject: [PATCH] refactor Result --- lib/wx_pay/result.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/wx_pay/result.rb b/lib/wx_pay/result.rb index 92622fe..ca5c5c0 100644 --- a/lib/wx_pay/result.rb +++ b/lib/wx_pay/result.rb @@ -3,8 +3,10 @@ module WxPay SUCCESS_FLAG = 'SUCCESS'.freeze def initialize(result) - super + super nil # Or it will call `super result` + self[:raw] = result + if result['xml'].class == Hash result['xml'].each_pair do |k, v| self[k] = v -- libgit2 0.21.0