Sha256: 7d8d22e7a3aa736326304c3c3dcc0dce10140d6998ce3ff5653743de98891174
Contents?: true
Size: 591 Bytes
Versions: 7
Compression:
Stored size: 591 Bytes
Contents
Luca.concerns.ModelPresenter = classMethods: getPresenter: (format)-> @presenters?[format] registerPresenter: (format, config)-> @presenters ||= {} @presenters[ format ] = config presentAs: (format)-> try attributeList = @componentMetaData().componentDefinition().getPresenter(format) return @toJSON() unless attributeList? _( attributeList ).reduce (memo, attribute)=> memo[ attribute ] = @read(attribute) memo , {} catch e console.log "Error presentAs", e.stack, e.message return @toJSON()
Version data entries
7 entries across 7 versions & 1 rubygems