Skip to content

Instantly share code, notes, and snippets.

@pius
Created November 13, 2009 17:10
Show Gist options
  • Save pius/233993 to your computer and use it in GitHub Desktop.
Save pius/233993 to your computer and use it in GitHub Desktop.
def losses
(prompts_on_the_left.collect(&:votes_count).sum + prompts_on_the_right.collect(&:votes_count).sum)
end
def wins
votes_count
end
def score
(wins.to_f / (wins + losses) ) * 100
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment