Commit f46d97ee authored by Nicolas Biri's avatar Nicolas Biri

Refactor: reintroduce this thanks to arrow functions

parent 0f999865
Pipeline #701 passed with stage
in 1 minute and 10 seconds
......@@ -38,13 +38,12 @@ const _ = require('lodash')
*/
function Class(name, superClasses, attributes, references) {
function jsmfElement(attr) {
const o = this
Object.defineProperties(o,
Object.defineProperties(this,
{ __jsmf__: {value: elementMeta(jsmfElement)}
})
createAttributes(o, jsmfElement)
createReferences(o, jsmfElement)
_.forEach(attr, (v,k) => o[k] = v)
createAttributes(this, jsmfElement)
createReferences(this, jsmfElement)
_.forEach(attr, (v,k) => this[k] = v)
}
jsmfElement.prototype.conformsTo = function () { return conformsTo(this) }
jsmfElement.prototype.getAssociated = getAssociated
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment