Module: Lanmao

Defined in:
lib/lanmao/utils.rb,
lib/lanmao.rb,
lib/lanmao.rb,
lib/lanmao/client.rb,
lib/lanmao/railtie.rb,
lib/lanmao/version.rb,
lib/lanmao/sign/rsa.rb,
lib/lanmao/http/request.rb,
lib/lanmao/http/response.rb,
lib/lanmao/api/api_helper.rb,
lib/lanmao/api/trade/freeze.rb,
lib/lanmao/form/form_helper.rb,
lib/lanmao/api/trade/unfreeze.rb,
lib/lanmao/http/error_code/money.rb,
lib/lanmao/http/error_code/query.rb,
lib/lanmao/http/error_code/trade.rb,
lib/lanmao/http/error_code/account.rb,
lib/lanmao/api/trade/debenture_sale.rb,
lib/lanmao/api/trade/modify_project.rb,
lib/lanmao/form/money/recharge_form.rb,
lib/lanmao/form/money/withdraw_form.rb,
lib/lanmao/api/money/cancel_withdraw.rb,
lib/lanmao/api/money/confirm_withdraw.rb,
lib/lanmao/api/account/audit_bind_card.rb,
lib/lanmao/api/query/query_transaction.rb,
lib/lanmao/api/trade/async_transaction.rb,
lib/lanmao/api/trade/confirm_checkfile.rb,
lib/lanmao/api/trade/establish_project.rb,
lib/lanmao/api/money/intercept_withdraw.rb,
lib/lanmao/api/trade/download_checkfile.rb,
lib/lanmao/form/trade/verify_deduct_form.rb,
lib/lanmao/api/trade/cancel_debenture_sale.rb,
lib/lanmao/api/query/qurey_user_information.rb,
lib/lanmao/api/trade/cancel_pre_transaction.rb,
lib/lanmao/api/trade/freeze_pre_transaction.rb,
lib/lanmao/form/account/check_password_form.rb,
lib/lanmao/form/account/reset_password_form.rb,
lib/lanmao/api/trade/unfreeze_trade_password.rb,
lib/lanmao/form/account/unbind_bankcard_form.rb,
lib/lanmao/form/trade/user_authorization_form.rb,
lib/lanmao/api/query/query_project_information.rb,
lib/lanmao/api/trade/authorization_entrust_pay.rb,
lib/lanmao/api/trade/cancel_user_authorization.rb,
lib/lanmao/api/trade/user_auto_pre_transaction.rb,
lib/lanmao/form/trade/user_pre_transaction_form.rb,
lib/lanmao/form/account/enterprise_bind_bankcard.rb,
lib/lanmao/form/account/enterprise_register_form.rb,
lib/lanmao/form/account/modify_mobile_expand_form.rb,
lib/lanmao/form/account/activate_stocked_user_form.rb,
lib/lanmao/form/account/personal_register_expand_form.rb,
lib/lanmao/form/account/enterprise_information_update_form.rb,
lib/lanmao/form/account/personal_bind_bankcard_expand_form.rb

Overview

客户端

Defined Under Namespace

Modules: Api, Form, Http, Sign, Utils Classes: Client, Railtie

Constant Summary collapse

VERSION =
"0.16.0"

Class Method Summary collapse

Class Method Details

.default_loggerObject



43
44
45
46
47
# File 'lib/lanmao.rb', line 43

def default_logger
  _logger = Logger.new(STDOUT)
  _logger.level = Logger::INFO
  _logger
end

.loggerObject



39
40
41
# File 'lib/lanmao.rb', line 39

def logger
  @logger ||= default_logger
end

.logger=(log) ⇒ Object



49
50
51
# File 'lib/lanmao.rb', line 49

def logger=(log)
  @logger = (log ? log : Logger.new('/dev/null'))
end