Elections, in Ruby

Updated with second round script in Oct 26, 2014.

Well, last sunday (Oct 5) was the brazilian elections. I was doing nothing, so I decided to write a simple ruby script to parse the results and show the top 3 candidates.

Besides the reverse clean-code done by the TSE (Superior Electoral Court), it was pretty easy:

Maybe the only interesting thing here is the metaprogramming in the String class.

Related Posts

Writing cli applications with Golang

Measuring production code coverage with JaCoCo

From Travis Enterprise to BuildKite in 50 repositories