lib/reapal/client.rb in reapal-0.2.1 vs lib/reapal/client.rb in reapal-0.2.2
- old
+ new
@@ -17,9 +17,15 @@
public_key: OpenSSL::X509::Certificate.new(options[:public_key]).public_key,
}
# 自动 include api 下的模块
recursive_include_api('Reapal::Api')
+ # 自动 include form 下的模块
+ recursive_include_api('Reapal::Form')
+ end
+
+ def decode_data(encryptkey, data)
+ ::Reapal::Http::decode_data(encryptkey, data, @config)
end
private
def recursive_include_api(module_chain)
modules = eval("#{module_chain}.constants").each{ |constant| eval("#{module_chain}::#{constant}").class.kind_of?(Module) }