From: rwldrn Date: Fri, 8 Apr 2011 20:52:11 +0000 (-0400) Subject: [#446] renames vars per review X-Git-Tag: v0.5~32 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=666cd25ceb22cc1ab231fa0f7ae35004b3d533f4;p=popcorn-js.git [#446] renames vars per review --- diff --git a/popcorn.js b/popcorn.js index 497efac..42b1fee 100644 --- a/popcorn.js +++ b/popcorn.js @@ -869,13 +869,13 @@ }; // Internal use only - Popcorn.plugin.delegate = function( instance, name, genus ) { + Popcorn.plugin.delegate = function( instance, name, plugins ) { return function() { - genus.forEach( function( gene ) { + plugins.forEach( function( plugin ) { // The new plugin simply calls the delegated methods on // all of its parents in the order they were specified. - gene[ name ] && gene[ name ].apply( instance, arguments ); + plugin[ name ] && plugin[ name ].apply( instance, arguments ); }); }; }; @@ -910,7 +910,7 @@ pluginFn = Popcorn.plugin( name, function( options ) { var self = this, - genus; + plugins; function instantiate( definition ) { return definition.call && definition.call( self, options ) || definition; @@ -918,14 +918,14 @@ // When the newly-defined plugin is instantiated, it must // explicitly instantiate all of its ancestors. - genus = ancestors.map( function( name ) { + plugins = ancestors.map( function( name ) { return instantiate( Popcorn.plugin.getDefinition( name ).base ); }); return { - _setup: Popcorn.plugin.delegate( self, "_setup", genus ), - start: Popcorn.plugin.delegate( self, "start", genus ), - end: Popcorn.plugin.delegate( self, "end", genus ) + _setup: Popcorn.plugin.delegate( self, "_setup", plugins ), + start: Popcorn.plugin.delegate( self, "start", plugins ), + end: Popcorn.plugin.delegate( self, "end", plugins ) }; }, manifest || definition.manifest );