You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Matches characters that are not allowed in a URI path segment. According to RFC 3986 Section 3.3 (https://tools.ietf.org/html/rfc3986#section-3.3), a valid path segment consists of "pchar" characters. This pattern identifies characters that must be percent-encoded when included in a URI path segment.
# Escapes non-path characters using percent encoding.
33
+
# Escapes non-path characters using percent encoding. In other words, this method escapes characters that are not allowed in a URI path segment. According to RFC 3986 Section 3.3 (https://tools.ietf.org/html/rfc3986#section-3.3), a valid path segment consists of "pchar" characters. This method percent-encodes characters that are not "pchar" characters.
# Encodes a hash or array into a query string. This method is used to encode query parameters in a URL. For example, `{"a" => 1, "b" => 2}` is encoded as `a=1&b=2`.
45
+
#
46
+
# @parameter value [Hash, Array] The value to encode.
47
+
# @parameter prefix [String] The prefix to use for keys.
36
48
defself.encode(value,prefix=nil)
37
49
casevalue
38
50
whenArray
@@ -66,6 +78,10 @@ def self.scan(string)
66
78
end
67
79
end
68
80
81
+
# Split a key into parts, e.g. `a[b][c]` -> `["a", "b", "c"]`.
0 commit comments