This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function delegate (child) { | |
// make it happen | |
return function inner () { | |
var self = this; | |
var func = Object.getOwnPropertyNames(this).filter(function (prop) { | |
return inner === self[prop]; | |
}).pop(); | |
return this[child][func].apply(this[child], arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Model = require('ampersand-model'); | |
var Foo = Model.extend({ | |
props: { | |
keys: { | |
type: 'object', | |
default: function () {return {};} | |
} | |
}, | |
echo: function () { |