Module: Thoran::Hash::XWwwFormUrlEncode
- Defined in:
- lib/Thoran/Hash/XWwwFormUrlencode/x_www_form_urlencode.rb
Instance Method Summary collapse
- #x_www_form_url_encode(joiner = '&') ⇒ Object (also: #x_www_form_urlencode)
Instance Method Details
#x_www_form_url_encode(joiner = '&') ⇒ Object Also known as: x_www_form_urlencode
17 18 19 |
# File 'lib/Thoran/Hash/XWwwFormUrlencode/x_www_form_urlencode.rb', line 17 def x_www_form_url_encode(joiner = '&') inject([]){|a,e| a << "#{e.first.to_s.url_encode}=#{e.last.to_s.url_encode}" unless e.last.nil?; a}.join(joiner) end |