Skip to content
Myr

inherit settings from parent application using [[Prototype]]

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Nadav Ivgi · committed by Nadav Ivgi · parent d853c83 · Browse files · 1 file+2 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−5 removed

  • other:+2 added−5 removed

1 file+2 added−5 removed

modified:lib/application.js+2 added-5 removed
58 unmodified lines
59 this.on('mount', function(parent){60 this.request.__proto__ = parent.request;61 this.response.__proto__ = parent.response;62 this.engines.__proto__ = parent.engines;63 this.settings.__proto__ = parent.settings;64 });6566 // router67 this._router = new Router(this);
182 unmodified lines
250 */251252app.set = function(setting, val){253 if (1 == arguments.length) {253 if (this.settings.hasOwnProperty(setting)) {254 return this.settings[setting];254 return this.settings[setting];255 } else if (this.parent) {256 return this.parent.set(setting);257 }255 } else {256 this.settings[setting] = val;257 return this;258 }
273 unmodified lines