Class: Vermillion::Utils
- Inherits:
-
Object
- Object
- Vermillion::Utils
- Defined in:
- lib/client/utils.rb
Class Method Summary collapse
-
.to_query_string(args) ⇒ Object
- Convert a hash to a query string Params:
args
-
Hash to convert.
- Convert a hash to a query string Params:
Class Method Details
.to_query_string(args) ⇒ Object
Convert a hash to a query string Params:
args
-
Hash to convert
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/client/utils.rb', line 6 def self.to_query_string(args) query_string = "?" unless args.empty? args.each_pair do |arg, val| query_string += "#{arg}=#{val}" end end query_string end |