]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#446] renames vars per review
authorrwldrn <waldron.rick@gmail.com>
Fri, 8 Apr 2011 20:52:11 +0000 (16:52 -0400)
committerrwldrn <waldron.rick@gmail.com>
Fri, 8 Apr 2011 20:52:11 +0000 (16:52 -0400)
popcorn.js

index 497efac25cdf0945abb8ce213c5ebc73ada7109f..42b1feee11f239711bf91befcdbff767574c3b4b 100644 (file)
   };
 
        //      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 );
       });
     };
   };
     pluginFn = Popcorn.plugin( name, function( options ) {
 
       var self = this, 
-          genus;
+          plugins;
 
       function instantiate( definition ) {
         return definition.call && definition.call( self, options ) || definition;
 
       // 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 );