lib/steam-api/ruby/hash.rb in steam-api-1.1.0 vs lib/steam-api/ruby/hash.rb in steam-api-1.2.0
- old
+ new
@@ -1,11 +1,12 @@
# Takes a hash and converts it into a URL encoded parameter string.
-# NOTE: this does not do any uri escaping at this point, since all args should be numeric.
+# NOTE: this does not do any uri escaping at this point, since all args
+# should be numeric.
# @param [Hash] params Hash of params you want broken up into a query string,
# escaped, and returned to you.
# @return [String] Escaped parameter string to append to a url.
class Hash
def to_params(params = {})
params[:format] = :json
- return "?#{params.each.map{ |x| x.join('=') }.join('&')}"
+ "?#{params.each.map { |x| x.join('=') }.join('&')}"
end
end