X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/5a8b533b5abec8dc24674e4ef084b0b9779da8af..e75d29998f5348be83dde4b6fd8f5aa437c2dc74:/app/models/raw_voter_list.rb diff --git a/app/models/raw_voter_list.rb b/app/models/raw_voter_list.rb index 2f7cb28..64530d7 100644 --- a/app/models/raw_voter_list.rb +++ b/app/models/raw_voter_list.rb @@ -1,3 +1,10 @@ +# Selectricity: Voting Machinery for the Masses +# Copyright (C) 2007, 2008 Benjamin Mako Hill +# Copyright (C) 2007 Massachusetts Institute of Technology +# +# This program is free software. Please see the COPYING file for +# details. + class RawVoterList attr_accessor :email @@ -6,7 +13,7 @@ class RawVoterList include Enumerable def initialize(params={}) - @email = params[:email] || 1 + @email = params[:email].to_i || 1 @input_addresses = params[:input_addresses] || String.new end @@ -16,7 +23,7 @@ class RawVoterList def each @input_addresses.split("\n").each do |address| - yield Voter.new( { :email => address } ) + yield FullVoter.new( { :email => address } ) end end end