Class: Joopo::Proxy

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/joopo.rb

Instance Method Summary collapse

Instance Method Details

#hash_to_querystring(hash) ⇒ Object



58
59
60
61
62
63
64
# File 'lib/joopo.rb', line 58

def hash_to_querystring(hash)
  hash.delete('splat')
  hash.delete('captures')
  hash.keys.inject('') do |query_string, key|
    query_string << '&'  << "#{URI.encode(key.to_s)}=#{URI.encode(hash[key])}"
  end
end