Skip to content
Create a gist now

Instantly share code, notes, and snippets.

YUI().use('base', 'substitute', function(Y) {
function Example(config) {
Example.superclass.constructor.apply(this, arguments);
Example.NAME = 'Example';
Example.ATTRS = {
foo: {
value: 'bar'
Y.extend(Example, Y.Base);
var test = new Example();
console.log(test.get('foo')); // 'bar'
console.log(Y.substitute('{foo}', { foo: 'bar' })); // 'bar'
console.log(Y.substitute('{foo}', test)); // '{foo}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.