Guest User

Untitled

a guest
Apr 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def losses
  2. (prompts_on_the_left.collect(&:votes_count).sum + prompts_on_the_right.collect(&:votes_count).sum)
  3. end
  4.  
  5. def wins
  6. votes_count
  7. end
  8.  
  9. def score
  10. (wins.to_f / (wins + losses) ) * 100
  11. end
Add Comment
Please, Sign In to add comment