Simplify path for method proxying in drivers

This commit is contained in:
Andrew Stewart 2014-12-18 13:19:58 -08:00
parent 280687099c
commit 13c388fbf7
2 changed files with 2 additions and 8 deletions

View File

@ -30,13 +30,7 @@ Utils.subclass(Basestar, EventEmitter);
// force - whether or not to overwrite existing method definitions
//
// Returns the klass where the methods have been proxied
Basestar.prototype.proxyMethods = function(methods, target, source, force) {
if (force == null) {
force = false;
}
return Utils.proxyFunctionsToObject(methods, target, source, force);
};
Basestar.prototype.proxyMethods = Utils.proxyFunctionsToObject;
// Public: Defines an event handler that proxies events from a source object
// to a target object

View File

@ -51,7 +51,7 @@ Driver.prototype.setupCommands = function(commands, proxy) {
proxy = this.connection;
}
this.proxyMethods(commands, proxy, this);
Utils.proxyFunctionsToObject(commands, proxy, this);
_.forEach(commands, function(command) {
var snake_case = command.replace(/[A-Z]+/g, function(match) {