Module: Bean::User::InstanceMethods
- Defined in:
- lib/bean/user.rb
Instance Method Summary collapse
Instance Method Details
#balance(account = 'asset', currency = 'USD') ⇒ Object
15 16 17 18 19 |
# File 'lib/bean/user.rb', line 15 def balance(account='asset',currency='USD') debits = transfers.debiting(account).in_currency(currency).sum(:amount) credits = transfers.crediting(account).in_currency(currency).sum(:amount) Money.new(debits - credits, currency.to_s) end |
#credit_card ⇒ Object
21 22 |
# File 'lib/bean/user.rb', line 21 def credit_card end |