Class: Hash

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

Overview

Mixin for ruby’s Hash class

Author:

  • Scott Sampson

  • Michael Orr

Instance Method Summary collapse

Instance Method Details

#to_queryString

returns a query string

Returns:

  • (String)

    concated string of key value pairs in the hash

Author:

  • Scott Sampson



16
17
18
# File 'lib/rgigya/hash.rb', line 16

def to_query
  self.map{|k,v| "#{CGI.escape(k.to_s)}=#{CGI.escape(v)}"}.join("&")
end