module Hanami::Utils::QueryString
URI query string transformations
@since 1.2.0
Constants
- HASH_SEPARATOR
@since 1.3.1 @api private
Public Class Methods
call(input)
click to toggle source
Serializes input into a query string
@param input [Object] the input
@return [::String] the query string
@since 1.2.0
TODO: this is a very basic implementation that needs to be expanded
# 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