Class: Kissmetrics::HttpClient::QueryStringHash
- Inherits:
-
Object
- Object
- Kissmetrics::HttpClient::QueryStringHash
- Defined in:
- lib/kissmetrics/http_client.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ QueryStringHash
constructor
A new instance of QueryStringHash.
- #to_s ⇒ Object
Constructor Details
#initialize(hash) ⇒ QueryStringHash
Returns a new instance of QueryStringHash.
58 59 60 |
# File 'lib/kissmetrics/http_client.rb', line 58 def initialize(hash) @hash = hash end |
Instance Method Details
#to_s ⇒ Object
62 63 64 65 66 |
# File 'lib/kissmetrics/http_client.rb', line 62 def to_s @hash.collect do |key, value| "#{CGI.escape(key.to_s)}=#{CGI.escape(value.to_s)}" end.join('&') end |