   Instance repository
   ###
   @records  = {}
+  @fields   = {}
+  @names    = []
 
   ###
   Observer reference

  @method all
  @return {array}     Array of all repository instances.
  ###
  @all: ->
    records = []
    records.push record for uid, record of @records
    records

  ###
  Destroy all instances of the Class

  constructor: (attributes = {}, handler, events = DEFAULT_EVENTS) ->
    @constructor.className = @constructor.name
    @constructor.records[@uid = _guid()] = @
    for field, define of @constructor.fields when attributes[field] or define.default?
      if typeof @[field] is 'function'
        @[field] attributes[field] or define.default
      else
        @[field] = attributes[field] or define.default
    @observe handler, events if handler?
    @

