1 //
  2 // The Antville Project
  3 // http://code.google.com/p/antville
  4 //
  5 // Copyright 2001-2007 by The Antville People
  6 //
  7 // Licensed under the Apache License, Version 2.0 (the ``License'');
  8 // you may not use this file except in compliance with the License.
  9 // You may obtain a copy of the License at
 10 //
 11 //    http://www.apache.org/licenses/LICENSE-2.0
 12 //
 13 // Unless required by applicable law or agreed to in writing, software
 14 // distributed under the License is distributed on an ``AS IS'' BASIS,
 15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16 // See the License for the specific language governing permissions and
 17 // limitations under the License.
 18 //
 19 // $Revision$
 20 // $LastChangedBy$
 21 // $LastChangedDate$
 22 // $URL$
 23 //
 24 
 25 /**
 26  * @fileOverview Defines the Vote prototype.
 27  */
 28 
 29 /**
 30  * @name Vote
 31  * @constructor
 32  * @param {Choice} choice
 33  * @property {Choice} choice
 34  * @property {Date} created
 35  * @property {User} creator
 36  * @property {String} creator_name
 37  * @property {Date} modified
 38  * @property {Poll} poll
 39  * @extends HopObject
 40  */
 41 Vote.prototype.constructor = function(choice) {
 42    this.choice = choice;
 43    this.creator = session.user;
 44    this.creator_name = session.user.name;
 45    this.created = this.modified = new Date;
 46    return this;
 47 }
 48