master
TJ Holowaychuk 2013-08-18 11:15:22 -07:00
parent 8ccfc14e88
commit 607f2fda8f
1 changed files with 14 additions and 12 deletions

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){ * set something(val){
* this._something = val; * this._something = val;
* }, * },
*
* render: function(){ * render: function(){
* this.body = '<html></html>'; * this.body = '<html></html>';
* } * }
* }) * });
* *
* @param {Object} obj * @param {Object} obj
* @return {Application} self * @return {Application} self