class Aws::Query::Param

Attributes

name[R]

@return [String]

value[R]

@return [String, nil]

Public Class Methods

new(name, value = nil) click to toggle source

@param [String] name @param [String, nil] value (nil)

# File lib/aws-sdk-core/query/param.rb, line 7
def initialize(name, value = nil)
  @name = name.to_s
  @value = value
end

Public Instance Methods

<=>(other) click to toggle source

@api private

# File lib/aws-sdk-core/query/param.rb, line 31
def <=> other
  name <=> other.name
end
==(other) click to toggle source

@api private

# File lib/aws-sdk-core/query/param.rb, line 24
def ==(other)
  other.kind_of?(Param) &&
  other.name == name &&
  other.value == value
end
to_s() click to toggle source

@return [String]

# File lib/aws-sdk-core/query/param.rb, line 19
def to_s
  value ? "#{escape(name)}=#{escape(value)}" : "#{escape(name)}="
end

Private Instance Methods

escape(str) click to toggle source
# File lib/aws-sdk-core/query/param.rb, line 37
def escape(str)
  Seahorse::Util.uri_escape(str)
end