Created
May 22, 2013 01:14
-
-
Save ms2sato/5624561 to your computer and use it in GitHub Desktop.
動かしていないので動作しないかも。スタイルは確認できるはず。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore'); | |
var MyClass = (function(){ | |
function MyClass(){} | |
_.extend(MyClass.prototype, { | |
doIt : function(a, b){ | |
console.log('doIt'); | |
this._doProtected(); | |
privates.doSecret.call(this, a, b); | |
}, | |
_doProtected : function(){ | |
//protected | |
console.log('protected'); | |
} | |
}); | |
MyClass.privates ={ | |
doSecret: function(){ | |
//private | |
console.log('private'); | |
} | |
}; | |
return MyClass; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment