Skip to content

Instantly share code, notes, and snippets.

@kaievns
Created December 24, 2009 06:32
Show Gist options
  • Save kaievns/263054 to your computer and use it in GitHub Desktop.
Save kaievns/263054 to your computer and use it in GitHub Desktop.
Private method example
var Klass = new Class((function() {
var private_method = function() {
// bla bla bla
};
return {
initialize: function() {
this.bla = 'bla';
private_method('bla', 'bla', 'bla');
// or in context of the object
private_method.call(this, 'bla', 'bla', 'bla');
}
}})());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment