Simplify path for method proxying in drivers
This commit is contained in:
parent
280687099c
commit
13c388fbf7
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue