Module: Magpie::Mouse
- Included in:
- AlipayModel, ChinabankModel, TenpayModel
- Defined in:
- lib/magpie/mouse.rb
Overview
获取一些持久化信息,主要是商户账号
Defined Under Namespace
Modules: ClassMethods Classes: MouseError
Class Method Summary (collapse)
Instance Method Summary (collapse)
Class Method Details
+ (Object) included(m)
10 11 12 |
# File 'lib/magpie/mouse.rb', line 10 def self.included(m) m.extend ClassMethods end |
Instance Method Details
- (Object) account
29 30 31 32 |
# File 'lib/magpie/mouse.rb', line 29 def account @account ||= self.class.accounts.assoc self.partner @account ||= [] end |
- (Object) key
34 35 36 |
# File 'lib/magpie/mouse.rb', line 34 def key @key ||= self.account[1].to_s end |
- (Boolean) missing_partner?
38 39 40 |
# File 'lib/magpie/mouse.rb', line 38 def missing_partner? self.account == [] ? true : false end |