Class: Bambora::Builders::WWWFormParameters
- Inherits:
-
Object
- Object
- Bambora::Builders::WWWFormParameters
- Defined in:
- lib/bambora/builders/www_form_parameters.rb
Overview
Builds WWW URL Encoded request parameters from a Hash
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(body:) ⇒ WWWFormParameters
constructor
Initiallze a new WWWFormParameter.
-
#to_s ⇒ String
Convert a hash to url-encoded query parameters.
Constructor Details
#initialize(body:) ⇒ WWWFormParameters
Initiallze a new WWWFormParameter
14 15 16 |
# File 'lib/bambora/builders/www_form_parameters.rb', line 14 def initialize(body:) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
8 9 10 |
# File 'lib/bambora/builders/www_form_parameters.rb', line 8 def body @body end |
Instance Method Details
#to_s ⇒ String
Convert a hash to url-encoded query parameters.
22 23 24 |
# File 'lib/bambora/builders/www_form_parameters.rb', line 22 def to_s URI.encode_www_form(sanitized_body) end |