Module: Hanami::Utils::QueryString
- Defined in:
- lib/hanami/utils/query_string.rb
Overview
URI query string transformations
Constant Summary collapse
- HASH_SEPARATOR =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
","
Class Method Summary collapse
-
.call(input) ⇒ ::String
Serializes input into a query string.
Class Method Details
.call(input) ⇒ ::String
Serializes input into a query string
TODO: this is a very basic implementation that needs to be expanded
24 25 26 27 28 29 30 31 |
# File 'lib/hanami/utils/query_string.rb', line 24 def self.call(input) case input when ::Hash input.map { |key, value| "#{key}=#{value.inspect}" }.join(HASH_SEPARATOR) else input.to_s end end |