Created
May 10, 2017 18:41
-
-
Save brian-lim-42/91d52772267b9abee4246c48687a9117 to your computer and use it in GitHub Desktop.
Mustache Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class {{clazz}} { | |
constructor( | |
{{#params}} | |
{{> param}} | |
{{/params}} | |
) { | |
{{#attribs}} | |
{{> attrib}} | |
{{/attribs}} | |
} | |
init(obj) { | |
var that = this; | |
Object.keys(obj).forEach(function (key) { | |
that.set(key, obj[key]); | |
}); | |
} | |
get(value) { | |
return this[value]; | |
} | |
set(key, value) { | |
this[key] = value; | |
} | |
} | |
module.exports = {{clazz}}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment