Module: Hanami::Utils::QueryString

Defined in:
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/query_string.rb

Overview

URI query string transformations

Since:

  • 1.2.0

Class Method Summary collapse

Class Method Details

.call(input) ⇒ ::String

Serialize input into a query string

TODO: this is a very basic implementation that needs to be expanded

Parameters:

  • input (Object)

    the input

Returns:

  • (::String)

    the query string

Since:

  • 1.2.0

def self.call(input)
  case input
  when ::Hash
    input.to_a.join("=")
  else
    input.to_s
  end
end