Module: Bubble::KnockKnock::Hash
- Included in:
- Hash
- Defined in:
- lib/bubble/knock_knock/hash.rb
Overview
A collection of util methods for KnockKnock gem
Instance Method Summary collapse
-
#to_uri ⇒ Object
Transforms the hash into a string which will be used to transmit data with the requests.
Instance Method Details
#to_uri ⇒ Object
Transforms the hash into a string which will be used to transmit data with the requests.
7 8 9 |
# File 'lib/bubble/knock_knock/hash.rb', line 7 def to_uri self.sort_by { |k,v| k.to_s }.map { |k,v| "#{k}=#{v}"}.join('&') end |