Sha256: 357e1c42632ad6215763273b1d0734748529b48d6c865e0b239c169237ae0c52

Contents?: true

Size: 542 Bytes

Versions: 2

Compression:

Stored size: 542 Bytes

Contents

Backbone.Ultimate ||= {}

class Backbone.Ultimate.App
  @App: null

  name: null

  Models: {}
  Collections: {}
  Routers: {}
  Views: {}

  scopes: ["Models", "Collections", "Routers", "Views"]

  constructor: (name = null) ->
    if @constructor.App
      throw new Error("Can't create new Backbone.Ultimate.App because the single instance has already been created");
    else
      @constructor.App = @
      @name = name
      _.extend @[scope], Backbone.Events  for scope in @scopes



_.extend Backbone.Ultimate.App::, Backbone.Events

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ultimate-base-0.2.1 app/assets/javascripts/backbone/ultimate/app.js.coffee
ultimate-base-0.2.0 app/assets/javascripts/backbone/ultimate/app.js.coffee