Class: Aws::Query::ParamList Private
- Inherits:
-
Object
- Object
- Aws::Query::ParamList
- Includes:
- Enumerable
- Defined in:
- lib/aws-sdk-core/query/param_list.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: IoWrapper
Instance Method Summary collapse
- #[](param_name) ⇒ Param? private
- #delete(param_name) ⇒ Param? private
- #each(&block) ⇒ Enumerable private
- #empty? ⇒ Boolean private
-
#initialize ⇒ ParamList
constructor
private
A new instance of ParamList.
- #set(param_name, param_value = nil) ⇒ Param (also: #[]=) private
-
#to_a ⇒ Array<Param>
private
Returns an array of sorted Param objects.
- #to_io ⇒ #read, ... private
- #to_s ⇒ String private
Constructor Details
#initialize ⇒ ParamList
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ParamList.
10 11 12 |
# File 'lib/aws-sdk-core/query/param_list.rb', line 10 def initialize @params = {} end |
Instance Method Details
#[](param_name) ⇒ Param?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'lib/aws-sdk-core/query/param_list.rb', line 25 def [](param_name) @params[param_name.to_s] end |
#delete(param_name) ⇒ Param?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 |
# File 'lib/aws-sdk-core/query/param_list.rb', line 31 def delete(param_name) @params.delete(param_name) end |
#each(&block) ⇒ Enumerable
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/aws-sdk-core/query/param_list.rb', line 36 def each(&block) to_a.each(&block) end |
#empty? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
41 42 43 |
# File 'lib/aws-sdk-core/query/param_list.rb', line 41 def empty? @params.empty? end |
#set(param_name, param_value = nil) ⇒ Param Also known as: []=
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 21 |
# File 'lib/aws-sdk-core/query/param_list.rb', line 17 def set(param_name, param_value = nil) param = Param.new(param_name, param_value) @params[param.name] = param param end |
#to_a ⇒ Array<Param>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns an array of sorted Aws::Query::Param objects.
46 47 48 |
# File 'lib/aws-sdk-core/query/param_list.rb', line 46 def to_a @params.values.sort end |
#to_io ⇒ #read, ...
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
56 57 58 |
# File 'lib/aws-sdk-core/query/param_list.rb', line 56 def to_io IoWrapper.new(self) end |
#to_s ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 |
# File 'lib/aws-sdk-core/query/param_list.rb', line 51 def to_s to_a.map(&:to_s).join('&') end |