Sha256: 9bbd560686a2beff9b8f193f2aa4dae22777b25a5e4e35e21072de7fb6c52fc3
Contents?: true
Size: 802 Bytes
Versions: 197
Compression:
Stored size: 802 Bytes
Contents
# frozen_string_literal: true module Aws module Query class Param # @param [String] name # @param [String, nil] value (nil) def initialize(name, value = nil) @name = name.to_s @value = value end # @return [String] attr_reader :name # @return [String, nil] attr_reader :value # @return [String] def to_s value ? "#{escape(name)}=#{escape(value)}" : "#{escape(name)}=" end # @api private def ==(other) other.kind_of?(Param) && other.name == name && other.value == value end # @api private def <=> other name <=> other.name end private def escape(str) Seahorse::Util.uri_escape(str) end end end end
Version data entries
197 entries across 197 versions & 1 rubygems