Permalink
Browse files

Info on block private/public methods.

  • Loading branch information...
1 parent 9b4df4c commit 06696d97e1e8075b9f26b2d28facef51c91490a7 @hiddentao committed Mar 28, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 README.md
View
@@ -155,8 +155,14 @@ Squel allows you to override the built-in query builders with your own as well a
var CommandBlock = function() {};
util.inherits(CommandBlock, squel.cls.Block);
+ // private method - will not get exposed within the query builder
+ CommandBlock.prototype._command = function(_command) {
+ this._command = _command;
+ }
+
+ // public method - will get exposed within the query builder
CommandBlock.prototype.compress = function() {
- this._command = 'compress';
+ this._command('compress');
};
CommandBlock.prototype.buildStr = function() {

0 comments on commit 06696d9

Please sign in to comment.