Class: Aws::Query::Param

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/query/param.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value = nil) ⇒ Param



7
8
9
10
# File 'lib/aws-sdk-core/query/param.rb', line 7

def initialize(name, value = nil)
  @name = name.to_s
  @value = value
end

Instance Attribute Details

#nameString (readonly)



13
14
15
# File 'lib/aws-sdk-core/query/param.rb', line 13

def name
  @name
end

#valueString? (readonly)



16
17
18
# File 'lib/aws-sdk-core/query/param.rb', line 16

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.



31
32
33
# File 'lib/aws-sdk-core/query/param.rb', line 31

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.



24
25
26
27
28
# File 'lib/aws-sdk-core/query/param.rb', line 24

def ==(other)
  other.kind_of?(Param) &&
  other.name == name &&
  other.value == value
end

#to_sString



19
20
21
# File 'lib/aws-sdk-core/query/param.rb', line 19

def to_s
  value ? "#{escape(name)}=#{escape(value)}" : "#{escape(name)}="
end