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