This commit is contained in:
TJ Holowaychuk 2013-08-18 11:15:22 -07:00
parent 8ccfc14e88
commit 607f2fda8f

View file

@ -77,19 +77,21 @@ app.use = function(fn){
}; };
/** /**
* Mixin an app's context with your own object. * Mixin `obj` to this app's context.
* *
* app.context({ * app.context({
* get something(){ * get something(){
* return 'hi'; * return 'hi';
* }, * },
* set something(val){ *
* this._something = val; * set something(val){
* }, * this._something = val;
* render: function(){ * },
* this.body = '<html></html>'; *
* } * render: function(){
* }) * this.body = '<html></html>';
* }
* });
* *
* @param {Object} obj * @param {Object} obj
* @return {Application} self * @return {Application} self