Election method library in Ruby