Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/hash.rb

Instance Method Summary collapse

Instance Method Details

#to_uri_queryObject



2
3
4
# File 'lib/core_ext/hash.rb', line 2

def to_uri_query
  return self.map{|key, value| "#{key}=#{URI.encode_www_form_component(value)}" if value}.select{|value| value if value}.join("&")
end