projects
/
selectricity
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
upgraded to latest version of rubyvote in svn
[selectricity]
/
lib
/
rubyvote
/
election.rb
diff --git
a/lib/rubyvote/election.rb
b/lib/rubyvote/election.rb
index fc61840a8aec6172d498345b2b387f79bf4795ce..3d816a89212e572a2c2165a2180908ab20fc7198 100644
(file)
--- a/
lib/rubyvote/election.rb
+++ b/
lib/rubyvote/election.rb
@@
-61,6
+61,11
@@
class ElectionVote
def tally_vote
self.verify_vote(vote)
end
def tally_vote
self.verify_vote(vote)
end
+
+ def filter_out(winner)
+ @candidates.delete_if {|x| winner.winners.include?(x)}
+ end
+
end
class PluralityVote < ElectionVote
end
class PluralityVote < ElectionVote
@@
-70,7
+75,7
@@
class PluralityVote < ElectionVote
protected
def verify_vote(vote=nil)
protected
def verify_vote(vote=nil)
- vote
? true : false
+ vote
.instance_of?( String )
end
def tally_vote(candidate)
end
def tally_vote(candidate)
Benjamin Mako Hill
||
Want to submit a patch?