You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Rest::Request::QuerystringBuilder

Inherits:
Object
  • Object
show all
Includes:
Seahorse::Model::Shapes
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/rest/request/querystring_builder.rb

Instance Method Summary collapse

Instance Method Details

#build(params) ⇒ String

Provide shape references and param values:

[
  [shape_ref1, 123],
  [shape_ref2, "text"]
]

Returns a querystring:

"Count=123&Words=text"

Parameters:

  • params (Array<Array<Seahorse::Model::ShapeRef, Object>>)

    An array of model shape references and request parameter value pairs.

Returns:

  • (String)

    Returns a built querystring



23
24
25
26
27
# File 'gems/aws-sdk-core/lib/aws-sdk-core/rest/request/querystring_builder.rb', line 23

def build(params)
  params.map do |(shape_ref, param_value)|
    build_part(shape_ref, param_value)
  end.join('&')
end