Class: Aws::Query::Param
- Inherits:
-
Object
- Object
- Aws::Query::Param
- Defined in:
- lib/aws-sdk-core/query/param.rb
Instance Attribute Summary collapse
- #name ⇒ String readonly
- #value ⇒ String? readonly
Instance Method Summary collapse
- #<=>(other) ⇒ Object private
- #==(other) ⇒ Object private
-
#initialize(name, value = nil) ⇒ Param
constructor
A new instance of Param.
- #to_s ⇒ String
Constructor Details
#initialize(name, value = nil) ⇒ Param
Returns a new instance of Param.
9 10 11 12 |
# File 'lib/aws-sdk-core/query/param.rb', line 9 def initialize(name, value = nil) @name = name.to_s @value = value end |
Instance Attribute Details
#name ⇒ String (readonly)
15 16 17 |
# File 'lib/aws-sdk-core/query/param.rb', line 15 def name @name end |
#value ⇒ String? (readonly)
18 19 20 |
# File 'lib/aws-sdk-core/query/param.rb', line 18 def value @value end |
Instance Method Details
#<=>(other) ⇒ Object
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.
33 34 35 |
# File 'lib/aws-sdk-core/query/param.rb', line 33 def <=> other name <=> other.name end |
#==(other) ⇒ Object
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.
26 27 28 29 30 |
# File 'lib/aws-sdk-core/query/param.rb', line 26 def ==(other) other.kind_of?(Param) && other.name == name && other.value == value end |
#to_s ⇒ String
21 22 23 |
# File 'lib/aws-sdk-core/query/param.rb', line 21 def to_s value ? "#{escape(name)}=#{escape(value)}" : "#{escape(name)}=" end |