Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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.