This commit is contained in:
Ilya Kantor 2014-10-26 22:10:13 +03:00
parent 06f61d8ce8
commit f301cb744d
2271 changed files with 103162 additions and 0 deletions

View file

@ -0,0 +1,13 @@
function StepVoter(options) {
Voter.apply(this, arguments);
this._step = options.step || 1;
}
StepVoter.prototype = Object.create(Voter.prototype);
StepVoter.prototype._increase = function() {
this.setVote(this._vote + this._step);
};
StepVoter.prototype._decrease = function() {
this.setVote(this._vote - this._step);
};