PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/public/js/collections/BankAccounts.js

https://github.com/bozz/cashflow
JavaScript | 17 lines | 13 code | 2 blank | 2 comment | 0 complexity | 2b8b9c0f26ae748c46744fba3a192073 MD5 | raw file
  1. // BankAccounts (Collection) Singleton
  2. define(function(require) {
  3. // var Backbone = require('backbone'),
  4. var BankAccount = require('models/BankAccount'),
  5. instance = null;
  6. var BankAccounts = Backbone.Collection.extend({
  7. model: BankAccount,
  8. url: '/api/banks/'
  9. });
  10. return {
  11. getInstance: function() {
  12. return instance = (instance || new BankAccounts());
  13. }
  14. }
  15. });