Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/notehub/notehub.rb
Instance Method Summary collapse
Instance Method Details
#to_query ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/notehub/notehub.rb', line 4 def to_query prefix = "?" query_string = "" self.each {|p, v| query_string += "#{prefix}#{p}=#{CGI.escape(v)}" prefix = "&" } query_string end |