As promised I have finished the ruby polyline decoder. This class will take an encoded polyline and decode it returning an array of latitude and longitude values. This one gave me a headache. Hope you can find use of it. Please take time to tell me the projects you are using it for, I'm just nosy.

Usage example:

require 'polyline_decoder'

line = "{b~zEdruxPT?L|@PP"

polyline_decoder = PolylineDecoder.new
line_arr = polyline_decoder.decode(line)

line_arr.each do |ln|
puts ln[0].to_s + ", " + ln[1].to_s
end

That's it!

Download - polyline_docder.rb