 isString        = require 'util-ex/lib/is/type/string'
 defineProperty  = require 'util-ex/lib/defineProperty'
 inheritsObject  = require 'inherits-ex/lib/inheritsObject'
-createObject    = require("inherits-ex/lib/createObject")
+createObject    = require 'inherits-ex/lib/createObject'
 ObjectValue     = require './value/object'
 attributes      = createObject require './attributes/object'
 module.exports  = Type = require './attribute'

      type: ...
  ###
  defineAttribute: (aName, aOptions)->
    throw TypeError('defineAttribute has no attribute name') unless aName and aName.length
    throw TypeError('the attribute "' + aName + '" has already defined.') if @attributes[aName]?
    if isString aOptions
      vType = Type(aOptions)
      throw TypeError("no such type registered:"+aOptions) unless vType

        continue if not k? or not v?
        @defineAttribute k, v
    return
  _toObject:(aOptions, aNameRequired)->
    result = super
    result.attributes = vAttrs = {}
    for k,v of @attributes
      vAttrs[k] = t = v.toObject(aOptions, false)
      #delete t[NAME]
      vAttrs[k] = t[TYPE] if getObjectKeys(t).length is 1
    result
  _decodeValue: (aValue)->
