Try this:

var Worker = Class.create((function() {
 function initialize() {
   this.someVar = "var";;

 function publicMethod() {;

 function privateMethod() {;

 return {
  initialize: initialize,
  publicMethod: publicMethod


The main problem is the scope, privateMethod part of Worker, so "this"
there won't be Worker instance.
You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to