That is pretty easy with a plain hash like
{:a => \"a\", :b => \"b\"}
which would translate into
\"a=a&b=b\" <
{:a=>"a", :b=>"b", :c=>"c"}.map{ |x,v| "#{x}=#{v}" }.reduce{|x,v| "#{x}{v}" } "a=a&b=b&c=c"
Here's another way. For simple queries.