Class: HTTPI::QueryBuilder::Flat

Inherits:
Object
  • Object
show all
Defined in:
lib/httpi/query_builder.rb

Class Method Summary collapse

Class Method Details

.build(query) ⇒ Object

Returns a query string given a Hash. Example:

build({names => ['Bruno', 'Samantha', 'Alexandre']})
# => "names=Bruno&names=Samantha&names=Alexandre"

11
12
13
# File 'lib/httpi/query_builder.rb', line 11

def self.build(query)
  Rack::Utils.build_query(query)
end