Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/contacts/hash_ext.rb

Instance Method Summary collapse

Instance Method Details

#to_query_stringObject



3
4
5
6
7
8
# File 'lib/contacts/hash_ext.rb', line 3

def to_query_string
  u = ERB::Util.method(:u)
  map { |k, v|
    u.call(k) + "=" + u.call(v)
  }.join("&")
end