Class: Hash
- Defined in:
- lib/ImpURI/Hash/blankQ.rb,
lib/ImpURI/Hash/x_www_form_urlencode.rb
Overview
History: Stolen wholesale from ActiveSupport.
Instance Method Summary collapse
Instance Method Details
#x_www_form_urlencode(joiner = '&') ⇒ Object
16 17 18 |
# File 'lib/ImpURI/Hash/x_www_form_urlencode.rb', line 16 def x_www_form_urlencode(joiner = '&') inject([]){|a,e| a << "#{e.first.to_s.url_encode.gsub(/ /, '+')}=#{e.last.to_s.url_encode.gsub(/ /, '+')}" unless e.last.nil?; a}.join(joiner) end |