Skip to content

Instantly share code, notes, and snippets.

@erichocean
Created August 19, 2008 18:05
Show Gist options
  • Save erichocean/6211 to your computer and use it in GitHub Desktop.
Save erichocean/6211 to your computer and use it in GitHub Desktop.
readAttribute: function(key) {
if (!this._cachedAttributes) this._cachedAttributes = {} ;
var ret = this._cachedAttributes[key] ;
if (ret === undefined) {
var attr = this._attributes ;
ret = (attr) ? attr[key] : undefined ;
if (ret !== undefined) {
var recordType = this._getRecordType(key+'Type') ;
ret = this._propertyFromAttribute(ret, recordType) ;
}
this._cachedAttributes[key] = ret ;
}
return (ret === undefined) ? null : ret;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment