Class: Hash

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

Instance Method Summary collapse

Instance Method Details

#to_http_strObject



2
3
4
5
6
7
8
9
# File 'lib/ext/hash.rb', line 2

def to_http_str
  result = ''
  return result if self.empty?
  self.each do |key, val|
    result << "#{key}=#{URI.encode(val.to_s)}&"
  end
  result.chop
end