Class: Aws::Query::Param Private

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/query/param.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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value = nil) ⇒ 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 a new instance of Param.

Parameters:

  • name (String)
  • value (String, nil) (defaults to: nil)

    (nil)



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)

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:

  • (String)


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

def name
  @name
end

#valueString? (readonly)

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:

  • (String, nil)


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

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:

  • (String)


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

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