expo_notifier 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -0
  3. data/CHANGELOG.md +3 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +172 -0
  6. data/Rakefile +17 -0
  7. data/lib/expo_notifier/mapper/base.rb +30 -0
  8. data/lib/expo_notifier/mapper/error.rb +24 -0
  9. data/lib/expo_notifier/mapper/push_message.rb +132 -0
  10. data/lib/expo_notifier/mapper/push_messages.rb +15 -0
  11. data/lib/expo_notifier/mapper/push_receipt.rb +23 -0
  12. data/lib/expo_notifier/mapper/push_receipt_error_details.rb +23 -0
  13. data/lib/expo_notifier/mapper/push_receipt_ids.rb +16 -0
  14. data/lib/expo_notifier/mapper/push_receipts.rb +38 -0
  15. data/lib/expo_notifier/mapper/push_ticket.rb +30 -0
  16. data/lib/expo_notifier/mapper/push_ticket_error_details.rb +19 -0
  17. data/lib/expo_notifier/mapper/push_tickets.rb +26 -0
  18. data/lib/expo_notifier/mapper/rich_content.rb +17 -0
  19. data/lib/expo_notifier/request/base.rb +162 -0
  20. data/lib/expo_notifier/request/get_push_notification_receipts.rb +18 -0
  21. data/lib/expo_notifier/request/send_push_notifications.rb +26 -0
  22. data/lib/expo_notifier/response.rb +93 -0
  23. data/lib/expo_notifier/sorbet_shim.rb +18 -0
  24. data/lib/expo_notifier/version.rb +6 -0
  25. data/lib/expo_notifier.rb +19 -0
  26. data/sorbet/config +6 -0
  27. data/sorbet/rbi/annotations/.gitattributes +1 -0
  28. data/sorbet/rbi/annotations/activesupport.rbi +495 -0
  29. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  30. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  31. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  32. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  33. data/sorbet/rbi/dsl/.gitattributes +1 -0
  34. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  35. data/sorbet/rbi/dsl/expo_notifier/mapper/base.rbi +12 -0
  36. data/sorbet/rbi/dsl/expo_notifier/mapper/error.rbi +42 -0
  37. data/sorbet/rbi/dsl/expo_notifier/mapper/push_message.rbi +263 -0
  38. data/sorbet/rbi/dsl/expo_notifier/mapper/push_messages.rbi +29 -0
  39. data/sorbet/rbi/dsl/expo_notifier/mapper/push_receipt.rbi +45 -0
  40. data/sorbet/rbi/dsl/expo_notifier/mapper/push_receipt_error_details.rbi +38 -0
  41. data/sorbet/rbi/dsl/expo_notifier/mapper/push_receipt_ids.rbi +20 -0
  42. data/sorbet/rbi/dsl/expo_notifier/mapper/push_receipts.rbi +25 -0
  43. data/sorbet/rbi/dsl/expo_notifier/mapper/push_ticket.rbi +59 -0
  44. data/sorbet/rbi/dsl/expo_notifier/mapper/push_ticket_error_details.rbi +32 -0
  45. data/sorbet/rbi/dsl/expo_notifier/mapper/push_tickets.rbi +54 -0
  46. data/sorbet/rbi/dsl/expo_notifier/mapper/rich_content.rbi +26 -0
  47. data/sorbet/rbi/dsl/time.rbi +13 -0
  48. data/sorbet/rbi/gems/.gitattributes +1 -0
  49. data/sorbet/rbi/gems/activesupport@8.1.1.rbi +22456 -0
  50. data/sorbet/rbi/gems/addressable@2.8.8.rbi +2005 -0
  51. data/sorbet/rbi/gems/ast@2.4.3.rbi +586 -0
  52. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  53. data/sorbet/rbi/gems/benchmark@0.5.0.rbi +637 -0
  54. data/sorbet/rbi/gems/bigdecimal@4.0.1.rbi +409 -0
  55. data/sorbet/rbi/gems/booleans@0.1.3.rbi +31 -0
  56. data/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi +11729 -0
  57. data/sorbet/rbi/gems/connection_pool@3.0.2.rbi +9 -0
  58. data/sorbet/rbi/gems/crack@1.0.1.rbi +145 -0
  59. data/sorbet/rbi/gems/date@3.5.1.rbi +403 -0
  60. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  61. data/sorbet/rbi/gems/erb@6.0.1.rbi +815 -0
  62. data/sorbet/rbi/gems/erubi@1.13.1.rbi +157 -0
  63. data/sorbet/rbi/gems/faraday-net_http@3.4.2.rbi +72 -0
  64. data/sorbet/rbi/gems/faraday@2.14.0.rbi +3301 -0
  65. data/sorbet/rbi/gems/hashdiff@1.2.1.rbi +355 -0
  66. data/sorbet/rbi/gems/i18n@1.14.8.rbi +2383 -0
  67. data/sorbet/rbi/gems/io-console@0.8.2.rbi +9 -0
  68. data/sorbet/rbi/gems/json@2.18.0.rbi +2278 -0
  69. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +323 -0
  70. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  71. data/sorbet/rbi/gems/minitest@6.0.1.rbi +1524 -0
  72. data/sorbet/rbi/gems/net-http@0.9.1.rbi +4304 -0
  73. data/sorbet/rbi/gems/netrc@0.11.0.rbi +177 -0
  74. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  75. data/sorbet/rbi/gems/parser@3.3.10.0.rbi +5537 -0
  76. data/sorbet/rbi/gems/pp@0.6.3.rbi +390 -0
  77. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  78. data/sorbet/rbi/gems/prism@1.6.0.rbi +42126 -0
  79. data/sorbet/rbi/gems/psych@5.3.1.rbi +2556 -0
  80. data/sorbet/rbi/gems/public_suffix@7.0.2.rbi +957 -0
  81. data/sorbet/rbi/gems/racc@1.8.1.rbi +168 -0
  82. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +404 -0
  83. data/sorbet/rbi/gems/rake@13.3.1.rbi +3038 -0
  84. data/sorbet/rbi/gems/rbi@0.3.8.rbi +5238 -0
  85. data/sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi +7805 -0
  86. data/sorbet/rbi/gems/regexp_parser@2.11.3.rbi +3849 -0
  87. data/sorbet/rbi/gems/reline@0.6.3.rbi +2995 -0
  88. data/sorbet/rbi/gems/require-hooks@0.2.2.rbi +110 -0
  89. data/sorbet/rbi/gems/rexml@3.4.4.rbi +5258 -0
  90. data/sorbet/rbi/gems/rubocop-espago@1.2.0.rbi +9 -0
  91. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  92. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  93. data/sorbet/rbi/gems/shale-builder@0.8.5.rbi +267 -0
  94. data/sorbet/rbi/gems/shale@1.2.2.rbi +2323 -0
  95. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +563 -0
  96. data/sorbet/rbi/gems/spoom@1.7.11.rbi +5878 -0
  97. data/sorbet/rbi/gems/stringio@3.2.0.rbi +9 -0
  98. data/sorbet/rbi/gems/tapioca@0.17.4.rbi +3507 -0
  99. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  100. data/sorbet/rbi/gems/tsort@0.2.0.rbi +393 -0
  101. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5919 -0
  102. data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +132 -0
  103. data/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +254 -0
  104. data/sorbet/rbi/gems/uri@1.1.1.rbi +2407 -0
  105. data/sorbet/rbi/gems/vcr@6.4.0.rbi +3055 -0
  106. data/sorbet/rbi/gems/webmock@3.26.1.rbi +1816 -0
  107. data/sorbet/rbi/shims/gems/set.rbi +2 -0
  108. data/sorbet/rbi/shims/gems/shale.rbi +27 -0
  109. data/sorbet/rbi/shims/gems/shoulda-context.rbi +20 -0
  110. data/sorbet/tapioca/config.yml +21 -0
  111. data/sorbet/tapioca/extensions/load_gem.rb +1 -0
  112. data/sorbet/tapioca/require.rb +15 -0
  113. metadata +228 -0
@@ -0,0 +1,2005 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `addressable` gem.
5
+ # Please instead update this file by running `bin/tapioca gem addressable`.
6
+
7
+
8
+ # Addressable is a library for processing links and URIs.
9
+ #
10
+ # source://addressable//lib/addressable/version.rb#22
11
+ module Addressable; end
12
+
13
+ # source://addressable//lib/addressable/idna/pure.rb#21
14
+ module Addressable::IDNA
15
+ class << self
16
+ # source://addressable//lib/addressable/idna/pure.rb#117
17
+ def _deprecated_unicode_normalize_kc(value); end
18
+
19
+ # Converts from a Unicode internationalized domain name to an ASCII
20
+ # domain name as described in RFC 3490.
21
+ #
22
+ # source://addressable//lib/addressable/idna/pure.rb#62
23
+ def to_ascii(input); end
24
+
25
+ # Converts from an ASCII domain name to a Unicode internationalized
26
+ # domain name as described in RFC 3490.
27
+ #
28
+ # source://addressable//lib/addressable/idna/pure.rb#88
29
+ def to_unicode(input); end
30
+
31
+ # @deprecated Use {String#unicode_normalize(:nfkc)} instead
32
+ #
33
+ # source://addressable//lib/addressable/idna/pure.rb#112
34
+ def unicode_normalize_kc(*args, **_arg1, &block); end
35
+
36
+ private
37
+
38
+ # source://addressable//lib/addressable/idna/pure.rb#135
39
+ def lookup_unicode_lowercase(codepoint); end
40
+
41
+ # Bias adaptation method
42
+ #
43
+ # source://addressable//lib/addressable/idna/pure.rb#4703
44
+ def punycode_adapt(delta, numpoints, firsttime); end
45
+
46
+ # @return [Boolean]
47
+ #
48
+ # source://addressable//lib/addressable/idna/pure.rb#4671
49
+ def punycode_basic?(codepoint); end
50
+
51
+ # source://addressable//lib/addressable/idna/pure.rb#4549
52
+ def punycode_decode(punycode); end
53
+
54
+ # Returns the numeric value of a basic codepoint
55
+ # (for use in representing integers) in the range 0 to
56
+ # base - 1, or PUNYCODE_BASE if codepoint does not represent a value.
57
+ #
58
+ # source://addressable//lib/addressable/idna/pure.rb#4689
59
+ def punycode_decode_digit(codepoint); end
60
+
61
+ # @return [Boolean]
62
+ #
63
+ # source://addressable//lib/addressable/idna/pure.rb#4676
64
+ def punycode_delimiter?(codepoint); end
65
+
66
+ # source://addressable//lib/addressable/idna/pure.rb#4428
67
+ def punycode_encode(unicode); end
68
+
69
+ # source://addressable//lib/addressable/idna/pure.rb#4681
70
+ def punycode_encode_digit(d); end
71
+
72
+ # Unicode aware downcase method.
73
+ #
74
+ # @api private
75
+ # @param input [String] The input string.
76
+ # @return [String] The downcased result.
77
+ #
78
+ # source://addressable//lib/addressable/idna/pure.rb#127
79
+ def unicode_downcase(input); end
80
+ end
81
+ end
82
+
83
+ # source://addressable//lib/addressable/idna/pure.rb#4398
84
+ Addressable::IDNA::ACE_MAX_LENGTH = T.let(T.unsafe(nil), Integer)
85
+
86
+ # This module is loosely based on idn_actionmailer by Mick Staugaard,
87
+ # the unicode library by Yoshida Masato, and the punycode implementation
88
+ # by Kazuhiro Nishiyama. Most of the code was copied verbatim, but
89
+ # some reformatting was done, and some translation from C was done.
90
+ #
91
+ # Without their code to work from as a base, we'd all still be relying
92
+ # on the presence of libidn. Which nobody ever seems to have installed.
93
+ #
94
+ # Original sources:
95
+ # http://github.com/staugaard/idn_actionmailer
96
+ # http://www.yoshidam.net/Ruby.html#unicode
97
+ # http://rubyforge.org/frs/?group_id=2550
98
+ #
99
+ # source://addressable//lib/addressable/idna/pure.rb#35
100
+ Addressable::IDNA::ACE_PREFIX = T.let(T.unsafe(nil), String)
101
+
102
+ # source://addressable//lib/addressable/idna/pure.rb#4387
103
+ Addressable::IDNA::COMPOSITION_TABLE = T.let(T.unsafe(nil), Hash)
104
+
105
+ # source://addressable//lib/addressable/idna/pure.rb#4400
106
+ Addressable::IDNA::PUNYCODE_BASE = T.let(T.unsafe(nil), Integer)
107
+
108
+ # source://addressable//lib/addressable/idna/pure.rb#4404
109
+ Addressable::IDNA::PUNYCODE_DAMP = T.let(T.unsafe(nil), Integer)
110
+
111
+ # source://addressable//lib/addressable/idna/pure.rb#4407
112
+ Addressable::IDNA::PUNYCODE_DELIMITER = T.let(T.unsafe(nil), Integer)
113
+
114
+ # source://addressable//lib/addressable/idna/pure.rb#4405
115
+ Addressable::IDNA::PUNYCODE_INITIAL_BIAS = T.let(T.unsafe(nil), Integer)
116
+
117
+ # source://addressable//lib/addressable/idna/pure.rb#4406
118
+ Addressable::IDNA::PUNYCODE_INITIAL_N = T.let(T.unsafe(nil), Integer)
119
+
120
+ # source://addressable//lib/addressable/idna/pure.rb#4409
121
+ Addressable::IDNA::PUNYCODE_MAXINT = T.let(T.unsafe(nil), Integer)
122
+
123
+ # source://addressable//lib/addressable/idna/pure.rb#4411
124
+ Addressable::IDNA::PUNYCODE_PRINT_ASCII = T.let(T.unsafe(nil), String)
125
+
126
+ # source://addressable//lib/addressable/idna/pure.rb#4403
127
+ Addressable::IDNA::PUNYCODE_SKEW = T.let(T.unsafe(nil), Integer)
128
+
129
+ # source://addressable//lib/addressable/idna/pure.rb#4402
130
+ Addressable::IDNA::PUNYCODE_TMAX = T.let(T.unsafe(nil), Integer)
131
+
132
+ # source://addressable//lib/addressable/idna/pure.rb#4401
133
+ Addressable::IDNA::PUNYCODE_TMIN = T.let(T.unsafe(nil), Integer)
134
+
135
+ # Input is invalid.
136
+ #
137
+ # source://addressable//lib/addressable/idna/pure.rb#4422
138
+ class Addressable::IDNA::PunycodeBadInput < ::StandardError; end
139
+
140
+ # Output would exceed the space provided.
141
+ #
142
+ # source://addressable//lib/addressable/idna/pure.rb#4424
143
+ class Addressable::IDNA::PunycodeBigOutput < ::StandardError; end
144
+
145
+ # Input needs wider integers to process.
146
+ #
147
+ # source://addressable//lib/addressable/idna/pure.rb#4426
148
+ class Addressable::IDNA::PunycodeOverflow < ::StandardError; end
149
+
150
+ # source://addressable//lib/addressable/idna/pure.rb#151
151
+ Addressable::IDNA::UNICODE_DATA = T.let(T.unsafe(nil), Hash)
152
+
153
+ # source://addressable//lib/addressable/idna/pure.rb#145
154
+ Addressable::IDNA::UNICODE_DATA_CANONICAL = T.let(T.unsafe(nil), Integer)
155
+
156
+ # source://addressable//lib/addressable/idna/pure.rb#143
157
+ Addressable::IDNA::UNICODE_DATA_COMBINING_CLASS = T.let(T.unsafe(nil), Integer)
158
+
159
+ # source://addressable//lib/addressable/idna/pure.rb#146
160
+ Addressable::IDNA::UNICODE_DATA_COMPATIBILITY = T.let(T.unsafe(nil), Integer)
161
+
162
+ # source://addressable//lib/addressable/idna/pure.rb#144
163
+ Addressable::IDNA::UNICODE_DATA_EXCLUSION = T.let(T.unsafe(nil), Integer)
164
+
165
+ # source://addressable//lib/addressable/idna/pure.rb#148
166
+ Addressable::IDNA::UNICODE_DATA_LOWERCASE = T.let(T.unsafe(nil), Integer)
167
+
168
+ # source://addressable//lib/addressable/idna/pure.rb#149
169
+ Addressable::IDNA::UNICODE_DATA_TITLECASE = T.let(T.unsafe(nil), Integer)
170
+
171
+ # source://addressable//lib/addressable/idna/pure.rb#147
172
+ Addressable::IDNA::UNICODE_DATA_UPPERCASE = T.let(T.unsafe(nil), Integer)
173
+
174
+ # source://addressable//lib/addressable/idna/pure.rb#4397
175
+ Addressable::IDNA::UNICODE_MAX_LENGTH = T.let(T.unsafe(nil), Integer)
176
+
177
+ # source://addressable//lib/addressable/idna/pure.rb#37
178
+ Addressable::IDNA::UTF8_REGEX = T.let(T.unsafe(nil), Regexp)
179
+
180
+ # source://addressable//lib/addressable/idna/pure.rb#48
181
+ Addressable::IDNA::UTF8_REGEX_MULTIBYTE = T.let(T.unsafe(nil), Regexp)
182
+
183
+ # This is an implementation of a URI template based on
184
+ # RFC 6570 (http://tools.ietf.org/html/rfc6570).
185
+ #
186
+ # source://addressable//lib/addressable/template.rb#27
187
+ class Addressable::Template
188
+ # Creates a new <tt>Addressable::Template</tt> object.
189
+ #
190
+ # @param pattern [#to_str] The URI Template pattern.
191
+ # @return [Addressable::Template] The initialized Template object.
192
+ #
193
+ # source://addressable//lib/addressable/template.rb#234
194
+ def initialize(pattern); end
195
+
196
+ # Returns <code>true</code> if the Template objects are equal. This method
197
+ # does NOT normalize either Template before doing the comparison.
198
+ #
199
+ # @param template [Object] The Template to compare.
200
+ # @return [TrueClass, FalseClass] <code>true</code> if the Templates are equivalent, <code>false</code>
201
+ # otherwise.
202
+ #
203
+ # source://addressable//lib/addressable/template.rb#274
204
+ def ==(template); end
205
+
206
+ # Returns <code>true</code> if the Template objects are equal. This method
207
+ # does NOT normalize either Template before doing the comparison.
208
+ # Addressable::Template makes no distinction between `==` and `eql?`.
209
+ #
210
+ # @param template [Object] The Template to compare.
211
+ # @return [TrueClass, FalseClass] <code>true</code> if the Templates are equivalent, <code>false</code>
212
+ # otherwise.
213
+ # @see #==
214
+ #
215
+ # source://addressable//lib/addressable/template.rb#283
216
+ def eql?(template); end
217
+
218
+ # Expands a URI template into a full URI.
219
+ #
220
+ # The object should respond to either the <tt>validate</tt> or
221
+ # <tt>transform</tt> messages or both. Both the <tt>validate</tt> and
222
+ # <tt>transform</tt> methods should take two parameters: <tt>name</tt> and
223
+ # <tt>value</tt>. The <tt>validate</tt> method should return <tt>true</tt>
224
+ # or <tt>false</tt>; <tt>true</tt> if the value of the variable is valid,
225
+ # <tt>false</tt> otherwise. An <tt>InvalidTemplateValueError</tt>
226
+ # exception will be raised if the value is invalid. The <tt>transform</tt>
227
+ # method should return the transformed variable value as a <tt>String</tt>.
228
+ # If a <tt>transform</tt> method is used, the value will not be percent
229
+ # encoded automatically. Unicode normalization will be performed both
230
+ # before and after sending the value to the transform method.
231
+ #
232
+ # @example
233
+ # class ExampleProcessor
234
+ # def self.validate(name, value)
235
+ # return !!(value =~ /^[\w ]+$/) if name == "query"
236
+ # return true
237
+ # end
238
+ #
239
+ # def self.transform(name, value)
240
+ # return value.gsub(/ /, "+") if name == "query"
241
+ # return value
242
+ # end
243
+ # end
244
+ #
245
+ # Addressable::Template.new(
246
+ # "http://example.com/search/{query}/"
247
+ # ).expand(
248
+ # {"query" => "an example search query"},
249
+ # ExampleProcessor
250
+ # ).to_str
251
+ # #=> "http://example.com/search/an+example+search+query/"
252
+ #
253
+ # Addressable::Template.new(
254
+ # "http://example.com/search/{query}/"
255
+ # ).expand(
256
+ # {"query" => "an example search query"}
257
+ # ).to_str
258
+ # #=> "http://example.com/search/an%20example%20search%20query/"
259
+ #
260
+ # Addressable::Template.new(
261
+ # "http://example.com/search/{query}/"
262
+ # ).expand(
263
+ # {"query" => "bogus!"},
264
+ # ExampleProcessor
265
+ # ).to_str
266
+ # #=> Addressable::Template::InvalidTemplateValueError
267
+ # @param mapping [Hash] The mapping that corresponds to the pattern.
268
+ # @param processor [#validate, #transform] An optional processor object may be supplied.
269
+ # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true
270
+ # @return [Addressable::URI] The expanded URI template.
271
+ #
272
+ # source://addressable//lib/addressable/template.rb#591
273
+ def expand(mapping, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end
274
+
275
+ # Extracts a mapping from the URI using a URI Template pattern.
276
+ #
277
+ # @example
278
+ # class ExampleProcessor
279
+ # def self.restore(name, value)
280
+ # return value.gsub(/\+/, " ") if name == "query"
281
+ # return value
282
+ # end
283
+ #
284
+ # def self.match(name)
285
+ # return ".*?" if name == "first"
286
+ # return ".*"
287
+ # end
288
+ # end
289
+ #
290
+ # uri = Addressable::URI.parse(
291
+ # "http://example.com/search/an+example+search+query/"
292
+ # )
293
+ # Addressable::Template.new(
294
+ # "http://example.com/search/{query}/"
295
+ # ).extract(uri, ExampleProcessor)
296
+ # #=> {"query" => "an example search query"}
297
+ #
298
+ # uri = Addressable::URI.parse("http://example.com/a/b/c/")
299
+ # Addressable::Template.new(
300
+ # "http://example.com/{first}/{second}/"
301
+ # ).extract(uri, ExampleProcessor)
302
+ # #=> {"first" => "a", "second" => "b/c"}
303
+ #
304
+ # uri = Addressable::URI.parse("http://example.com/a/b/c/")
305
+ # Addressable::Template.new(
306
+ # "http://example.com/{first}/{-list|/|second}/"
307
+ # ).extract(uri)
308
+ # #=> {"first" => "a", "second" => ["b", "c"]}
309
+ # @param uri [Addressable::URI, #to_str] The URI to extract from.
310
+ # @param processor [#restore, #match] A template processor object may optionally be supplied.
311
+ #
312
+ # The object should respond to either the <tt>restore</tt> or
313
+ # <tt>match</tt> messages or both. The <tt>restore</tt> method should
314
+ # take two parameters: `[String] name` and `[String] value`.
315
+ # The <tt>restore</tt> method should reverse any transformations that
316
+ # have been performed on the value to ensure a valid URI.
317
+ # The <tt>match</tt> method should take a single
318
+ # parameter: `[String] name`. The <tt>match</tt> method should return
319
+ # a <tt>String</tt> containing a regular expression capture group for
320
+ # matching on that particular variable. The default value is `".*?"`.
321
+ # The <tt>match</tt> method has no effect on multivariate operator
322
+ # expansions.
323
+ # @return [Hash, NilClass] The <tt>Hash</tt> mapping that was extracted from the URI, or
324
+ # <tt>nil</tt> if the URI didn't match the template.
325
+ #
326
+ # source://addressable//lib/addressable/template.rb#342
327
+ def extract(uri, processor = T.unsafe(nil)); end
328
+
329
+ # Freeze URI, initializing instance variables.
330
+ #
331
+ # @return [Addressable::URI] The frozen URI object.
332
+ #
333
+ # source://addressable//lib/addressable/template.rb#245
334
+ def freeze; end
335
+
336
+ # Returns a <tt>String</tt> representation of the Template object's state.
337
+ #
338
+ # @return [String] The Template object's state, as a <tt>String</tt>.
339
+ #
340
+ # source://addressable//lib/addressable/template.rb#260
341
+ def inspect; end
342
+
343
+ # Returns an Array of variables used within the template pattern.
344
+ # The variables are listed in the Array in the order they appear within
345
+ # the pattern. Multiple occurrences of a variable within a pattern are
346
+ # not represented in this Array.
347
+ #
348
+ # @return [Array] The variables present in the template's pattern.
349
+ #
350
+ # source://addressable//lib/addressable/template.rb#610
351
+ def keys; end
352
+
353
+ # Extracts match data from the URI using a URI Template pattern.
354
+ #
355
+ # @example
356
+ # class ExampleProcessor
357
+ # def self.restore(name, value)
358
+ # return value.gsub(/\+/, " ") if name == "query"
359
+ # return value
360
+ # end
361
+ #
362
+ # def self.match(name)
363
+ # return ".*?" if name == "first"
364
+ # return ".*"
365
+ # end
366
+ # end
367
+ #
368
+ # uri = Addressable::URI.parse(
369
+ # "http://example.com/search/an+example+search+query/"
370
+ # )
371
+ # match = Addressable::Template.new(
372
+ # "http://example.com/search/{query}/"
373
+ # ).match(uri, ExampleProcessor)
374
+ # match.variables
375
+ # #=> ["query"]
376
+ # match.captures
377
+ # #=> ["an example search query"]
378
+ #
379
+ # uri = Addressable::URI.parse("http://example.com/a/b/c/")
380
+ # match = Addressable::Template.new(
381
+ # "http://example.com/{first}/{+second}/"
382
+ # ).match(uri, ExampleProcessor)
383
+ # match.variables
384
+ # #=> ["first", "second"]
385
+ # match.captures
386
+ # #=> ["a", "b/c"]
387
+ #
388
+ # uri = Addressable::URI.parse("http://example.com/a/b/c/")
389
+ # match = Addressable::Template.new(
390
+ # "http://example.com/{first}{/second*}/"
391
+ # ).match(uri)
392
+ # match.variables
393
+ # #=> ["first", "second"]
394
+ # match.captures
395
+ # #=> ["a", ["b", "c"]]
396
+ # @param uri [Addressable::URI, #to_str] The URI to extract from.
397
+ # @param processor [#restore, #match] A template processor object may optionally be supplied.
398
+ #
399
+ # The object should respond to either the <tt>restore</tt> or
400
+ # <tt>match</tt> messages or both. The <tt>restore</tt> method should
401
+ # take two parameters: `[String] name` and `[String] value`.
402
+ # The <tt>restore</tt> method should reverse any transformations that
403
+ # have been performed on the value to ensure a valid URI.
404
+ # The <tt>match</tt> method should take a single
405
+ # parameter: `[String] name`. The <tt>match</tt> method should return
406
+ # a <tt>String</tt> containing a regular expression capture group for
407
+ # matching on that particular variable. The default value is `".*?"`.
408
+ # The <tt>match</tt> method has no effect on multivariate operator
409
+ # expansions.
410
+ # @return [Hash, NilClass] The <tt>Hash</tt> mapping that was extracted from the URI, or
411
+ # <tt>nil</tt> if the URI didn't match the template.
412
+ #
413
+ # source://addressable//lib/addressable/template.rb#413
414
+ def match(uri, processor = T.unsafe(nil)); end
415
+
416
+ # Returns the named captures of the coerced `Regexp`.
417
+ #
418
+ # @api private
419
+ # @return [Hash] The named captures of the `Regexp` given by {#to_regexp}.
420
+ #
421
+ # source://addressable//lib/addressable/template.rb#651
422
+ def named_captures; end
423
+
424
+ # Returns an Array of variables used within the template pattern.
425
+ # The variables are listed in the Array in the order they appear within
426
+ # the pattern. Multiple occurrences of a variable within a pattern are
427
+ # not represented in this Array.
428
+ #
429
+ # @return [Array] The variables present in the template's pattern.
430
+ #
431
+ # source://addressable//lib/addressable/template.rb#611
432
+ def names; end
433
+
434
+ # Expands a URI template into another URI template.
435
+ #
436
+ # The object should respond to either the <tt>validate</tt> or
437
+ # <tt>transform</tt> messages or both. Both the <tt>validate</tt> and
438
+ # <tt>transform</tt> methods should take two parameters: <tt>name</tt> and
439
+ # <tt>value</tt>. The <tt>validate</tt> method should return <tt>true</tt>
440
+ # or <tt>false</tt>; <tt>true</tt> if the value of the variable is valid,
441
+ # <tt>false</tt> otherwise. An <tt>InvalidTemplateValueError</tt>
442
+ # exception will be raised if the value is invalid. The <tt>transform</tt>
443
+ # method should return the transformed variable value as a <tt>String</tt>.
444
+ # If a <tt>transform</tt> method is used, the value will not be percent
445
+ # encoded automatically. Unicode normalization will be performed both
446
+ # before and after sending the value to the transform method.
447
+ #
448
+ # @example
449
+ # Addressable::Template.new(
450
+ # "http://example.com/{one}/{two}/"
451
+ # ).partial_expand({"one" => "1"}).pattern
452
+ # #=> "http://example.com/1/{two}/"
453
+ #
454
+ # Addressable::Template.new(
455
+ # "http://example.com/{?one,two}/"
456
+ # ).partial_expand({"one" => "1"}).pattern
457
+ # #=> "http://example.com/?one=1{&two}/"
458
+ #
459
+ # Addressable::Template.new(
460
+ # "http://example.com/{?one,two,three}/"
461
+ # ).partial_expand({"one" => "1", "three" => 3}).pattern
462
+ # #=> "http://example.com/?one=1{&two}&three=3"
463
+ # @param mapping [Hash] The mapping that corresponds to the pattern.
464
+ # @param processor [#validate, #transform] An optional processor object may be supplied.
465
+ # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true
466
+ # @return [Addressable::Template] The partially expanded URI template.
467
+ #
468
+ # source://addressable//lib/addressable/template.rb#524
469
+ def partial_expand(mapping, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end
470
+
471
+ # @return [String] The Template object's pattern.
472
+ #
473
+ # source://addressable//lib/addressable/template.rb#254
474
+ def pattern; end
475
+
476
+ # Returns the source of the coerced `Regexp`.
477
+ #
478
+ # @api private
479
+ # @return [String] The source of the `Regexp` given by {#to_regexp}.
480
+ #
481
+ # source://addressable//lib/addressable/template.rb#641
482
+ def source; end
483
+
484
+ # Coerces a template into a `Regexp` object. This regular expression will
485
+ # behave very similarly to the actual template, and should match the same
486
+ # URI values, but it cannot fully handle, for example, values that would
487
+ # extract to an `Array`.
488
+ #
489
+ # @return [Regexp] A regular expression which should match the template.
490
+ #
491
+ # source://addressable//lib/addressable/template.rb#630
492
+ def to_regexp; end
493
+
494
+ # Returns a mapping of variables to their default values specified
495
+ # in the template. Variables without defaults are not returned.
496
+ #
497
+ # @return [Hash] Mapping of template variables to their defaults
498
+ #
499
+ # source://addressable//lib/addressable/template.rb#618
500
+ def variable_defaults; end
501
+
502
+ # Returns an Array of variables used within the template pattern.
503
+ # The variables are listed in the Array in the order they appear within
504
+ # the pattern. Multiple occurrences of a variable within a pattern are
505
+ # not represented in this Array.
506
+ #
507
+ # @return [Array] The variables present in the template's pattern.
508
+ #
509
+ # source://addressable//lib/addressable/template.rb#607
510
+ def variables; end
511
+
512
+ private
513
+
514
+ # Takes a set of values, and joins them together based on the
515
+ # operator.
516
+ #
517
+ # @param operator [String, Nil] One of the operators from the set
518
+ # (?,&,+,#,;,/,.), or nil if there wasn't one.
519
+ # @param return_value [Array] The set of return values (as [variable_name, value] tuples) that will
520
+ # be joined together.
521
+ # @return [String] The transformed mapped value
522
+ #
523
+ # source://addressable//lib/addressable/template.rb#861
524
+ def join_values(operator, return_value); end
525
+
526
+ # Generates a hash with string keys
527
+ #
528
+ # @param mapping [Hash] A mapping hash to normalize
529
+ # @return [Hash] A hash with stringified keys
530
+ #
531
+ # source://addressable//lib/addressable/template.rb#924
532
+ def normalize_keys(mapping); end
533
+
534
+ # Takes a set of values, and joins them together based on the
535
+ # operator.
536
+ #
537
+ # @param value [Hash, Array, String] Normalizes unicode keys and values with String#unicode_normalize (NFC)
538
+ # @return [Hash, Array, String] The normalized values
539
+ #
540
+ # source://addressable//lib/addressable/template.rb#898
541
+ def normalize_value(value); end
542
+
543
+ # source://addressable//lib/addressable/template.rb#656
544
+ def ordered_variable_defaults; end
545
+
546
+ # Generates the <tt>Regexp</tt> that parses a template pattern.
547
+ #
548
+ # @param pattern [String] The URI template pattern.
549
+ # @param processor [#match] The template processor to use.
550
+ # @return [Array, Regexp] An array of expansion variables nad a regular expression which may be
551
+ # used to parse a template pattern
552
+ #
553
+ # source://addressable//lib/addressable/template.rb#968
554
+ def parse_new_template_pattern(pattern, processor = T.unsafe(nil)); end
555
+
556
+ # Generates the <tt>Regexp</tt> that parses a template pattern. Memoizes the
557
+ # value if template processor not set (processors may not be deterministic)
558
+ #
559
+ # @param pattern [String] The URI template pattern.
560
+ # @param processor [#match] The template processor to use.
561
+ # @return [Array, Regexp] An array of expansion variables nad a regular expression which may be
562
+ # used to parse a template pattern
563
+ #
564
+ # source://addressable//lib/addressable/template.rb#950
565
+ def parse_template_pattern(pattern, processor = T.unsafe(nil)); end
566
+
567
+ # Transforms a mapped value so that values can be substituted into the
568
+ # template.
569
+ #
570
+ # The object should respond to either the <tt>validate</tt> or
571
+ # <tt>transform</tt> messages or both. Both the <tt>validate</tt> and
572
+ # <tt>transform</tt> methods should take two parameters: <tt>name</tt> and
573
+ # <tt>value</tt>. The <tt>validate</tt> method should return <tt>true</tt>
574
+ # or <tt>false</tt>; <tt>true</tt> if the value of the variable is valid,
575
+ # <tt>false</tt> otherwise. An <tt>InvalidTemplateValueError</tt> exception
576
+ # will be raised if the value is invalid. The <tt>transform</tt> method
577
+ # should return the transformed variable value as a <tt>String</tt>. If a
578
+ # <tt>transform</tt> method is used, the value will not be percent encoded
579
+ # automatically. Unicode normalization will be performed both before and
580
+ # after sending the value to the transform method.
581
+ #
582
+ # @param mapping [Hash] The mapping to replace captures
583
+ # @param capture [String] The expression to replace
584
+ # @param processor [#validate, #transform] An optional processor object may be supplied.
585
+ # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true
586
+ # @return [String] The expanded expression
587
+ #
588
+ # source://addressable//lib/addressable/template.rb#753
589
+ def transform_capture(mapping, capture, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end
590
+
591
+ # Loops through each capture and expands any values available in mapping
592
+ #
593
+ # The object should respond to either the <tt>validate</tt> or
594
+ # <tt>transform</tt> messages or both. Both the <tt>validate</tt> and
595
+ # <tt>transform</tt> methods should take two parameters: <tt>name</tt> and
596
+ # <tt>value</tt>. The <tt>validate</tt> method should return <tt>true</tt>
597
+ # or <tt>false</tt>; <tt>true</tt> if the value of the variable is valid,
598
+ # <tt>false</tt> otherwise. An <tt>InvalidTemplateValueError</tt> exception
599
+ # will be raised if the value is invalid. The <tt>transform</tt> method
600
+ # should return the transformed variable value as a <tt>String</tt>. If a
601
+ # <tt>transform</tt> method is used, the value will not be percent encoded
602
+ # automatically. Unicode normalization will be performed both before and
603
+ # after sending the value to the transform method.
604
+ #
605
+ # @param mapping [Hash] Set of keys to expand
606
+ # @param capture [String] The expression to expand
607
+ # @param processor [#validate, #transform] An optional processor object may be supplied.
608
+ # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true
609
+ # @return [String] The expanded expression
610
+ #
611
+ # source://addressable//lib/addressable/template.rb#694
612
+ def transform_partial_capture(mapping, capture, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end
613
+ end
614
+
615
+ # source://addressable//lib/addressable/template.rb#58
616
+ Addressable::Template::EXPRESSION = T.let(T.unsafe(nil), Regexp)
617
+
618
+ # Raised if an invalid template operator is used in a pattern.
619
+ #
620
+ # source://addressable//lib/addressable/template.rb#85
621
+ class Addressable::Template::InvalidTemplateOperatorError < ::StandardError; end
622
+
623
+ # Raised if an invalid template value is supplied.
624
+ #
625
+ # source://addressable//lib/addressable/template.rb#80
626
+ class Addressable::Template::InvalidTemplateValueError < ::StandardError; end
627
+
628
+ # source://addressable//lib/addressable/template.rb#70
629
+ Addressable::Template::JOINERS = T.let(T.unsafe(nil), Hash)
630
+
631
+ # source://addressable//lib/addressable/template.rb#62
632
+ Addressable::Template::LEADERS = T.let(T.unsafe(nil), Hash)
633
+
634
+ # This class represents the data that is extracted when a Template
635
+ # is matched against a URI.
636
+ #
637
+ # source://addressable//lib/addressable/template.rb#96
638
+ class Addressable::Template::MatchData
639
+ # Creates a new MatchData object.
640
+ # MatchData objects should never be instantiated directly.
641
+ #
642
+ # @param uri [Addressable::URI] The URI that the template was matched against.
643
+ # @return [MatchData] a new instance of MatchData
644
+ #
645
+ # source://addressable//lib/addressable/template.rb#103
646
+ def initialize(uri, template, mapping); end
647
+
648
+ # Accesses captured values by name or by index.
649
+ #
650
+ # @param key [String, Symbol, Fixnum] Capture index or name. Note that when accessing by with index
651
+ # of 0, the full URI will be returned. The intention is to mimic
652
+ # the ::MatchData#[] behavior.
653
+ # @param len [#to_int, nil] If provided, an array of values will be returned with the given
654
+ # parameter used as length.
655
+ # @return [Array, String, nil] The captured value corresponding to the index or name. If the
656
+ # value was not provided or the key is unknown, nil will be
657
+ # returned.
658
+ #
659
+ # If the second parameter is provided, an array of that length will
660
+ # be returned instead.
661
+ #
662
+ # source://addressable//lib/addressable/template.rb#170
663
+ def [](key, len = T.unsafe(nil)); end
664
+
665
+ # @return [Array] The list of values that were captured by the Template.
666
+ # Note that this list will include nils for any variables which
667
+ # were in the Template, but did not appear in the URI.
668
+ #
669
+ # source://addressable//lib/addressable/template.rb#149
670
+ def captures; end
671
+
672
+ # Returns a <tt>String</tt> representation of the MatchData's state.
673
+ #
674
+ # @return [String] The MatchData's state, as a <tt>String</tt>.
675
+ #
676
+ # source://addressable//lib/addressable/template.rb#213
677
+ def inspect; end
678
+
679
+ # @return [Array] The list of variables that were present in the Template.
680
+ # Note that this list will include variables which do not appear
681
+ # in the mapping because they were not present in URI.
682
+ #
683
+ # source://addressable//lib/addressable/template.rb#135
684
+ def keys; end
685
+
686
+ # @return [Hash] The mapping that resulted from the match.
687
+ # Note that this mapping does not include keys or values for
688
+ # variables that appear in the Template, but are not present
689
+ # in the URI.
690
+ #
691
+ # source://addressable//lib/addressable/template.rb#125
692
+ def mapping; end
693
+
694
+ # @return [Array] The list of variables that were present in the Template.
695
+ # Note that this list will include variables which do not appear
696
+ # in the mapping because they were not present in URI.
697
+ #
698
+ # source://addressable//lib/addressable/template.rb#136
699
+ def names; end
700
+
701
+ # Dummy method for code expecting a ::MatchData instance
702
+ #
703
+ # @return [String] An empty string.
704
+ #
705
+ # source://addressable//lib/addressable/template.rb#225
706
+ def post_match; end
707
+
708
+ # Dummy method for code expecting a ::MatchData instance
709
+ #
710
+ # @return [String] An empty string.
711
+ #
712
+ # source://addressable//lib/addressable/template.rb#222
713
+ def pre_match; end
714
+
715
+ # @return [String] The matched URI as String.
716
+ #
717
+ # source://addressable//lib/addressable/template.rb#194
718
+ def string; end
719
+
720
+ # @return [Addressable::Template] The Template used for the match.
721
+ #
722
+ # source://addressable//lib/addressable/template.rb#117
723
+ def template; end
724
+
725
+ # @return [Array] Array with the matched URI as first element followed by the captured
726
+ # values.
727
+ #
728
+ # source://addressable//lib/addressable/template.rb#184
729
+ def to_a; end
730
+
731
+ # @return [String] The matched URI as String.
732
+ #
733
+ # source://addressable//lib/addressable/template.rb#191
734
+ def to_s; end
735
+
736
+ # @return [Addressable::URI] The URI that the Template was matched against.
737
+ #
738
+ # source://addressable//lib/addressable/template.rb#112
739
+ def uri; end
740
+
741
+ # @return [Array] The list of values that were captured by the Template.
742
+ # Note that this list will include nils for any variables which
743
+ # were in the Template, but did not appear in the URI.
744
+ #
745
+ # source://addressable//lib/addressable/template.rb#143
746
+ def values; end
747
+
748
+ # Returns multiple captured values at once.
749
+ #
750
+ # @param *indexes [String, Symbol, Fixnum] Indices of the captures to be returned
751
+ # @return [Array] Values corresponding to given indices.
752
+ # @see Addressable::Template::MatchData#[]
753
+ #
754
+ # source://addressable//lib/addressable/template.rb#205
755
+ def values_at(*indexes); end
756
+
757
+ # @return [Array] The list of variables that were present in the Template.
758
+ # Note that this list will include variables which do not appear
759
+ # in the mapping because they were not present in URI.
760
+ #
761
+ # source://addressable//lib/addressable/template.rb#132
762
+ def variables; end
763
+ end
764
+
765
+ # source://addressable//lib/addressable/template.rb#40
766
+ Addressable::Template::RESERVED = T.let(T.unsafe(nil), String)
767
+
768
+ # Raised if an invalid template operator is used in a pattern.
769
+ #
770
+ # source://addressable//lib/addressable/template.rb#90
771
+ class Addressable::Template::TemplateOperatorAbortedError < ::StandardError; end
772
+
773
+ # source://addressable//lib/addressable/template.rb#42
774
+ Addressable::Template::UNRESERVED = T.let(T.unsafe(nil), String)
775
+
776
+ # source://addressable//lib/addressable/template.rb#54
777
+ Addressable::Template::VARIABLE_LIST = T.let(T.unsafe(nil), Regexp)
778
+
779
+ # source://addressable//lib/addressable/template.rb#50
780
+ Addressable::Template::VARNAME = T.let(T.unsafe(nil), Regexp)
781
+
782
+ # source://addressable//lib/addressable/template.rb#52
783
+ Addressable::Template::VARSPEC = T.let(T.unsafe(nil), Regexp)
784
+
785
+ # This is an implementation of a URI parser based on
786
+ # <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>,
787
+ # <a href="http://www.ietf.org/rfc/rfc3987.txt">RFC 3987</a>.
788
+ #
789
+ # source://addressable//lib/addressable/uri.rb#31
790
+ class Addressable::URI
791
+ # Creates a new uri object from component parts.
792
+ #
793
+ # @option [String,
794
+ # @option [String,
795
+ # @option [String,
796
+ # @option [String,
797
+ # @option [String,
798
+ # @option [String,
799
+ # @option [String,
800
+ # @option [String,
801
+ # @option [String,
802
+ # @option [String,
803
+ # @param [String, [Hash] a customizable set of options
804
+ # @return [Addressable::URI] The constructed URI object.
805
+ #
806
+ # source://addressable//lib/addressable/uri.rb#830
807
+ def initialize(options = T.unsafe(nil)); end
808
+
809
+ # Joins two URIs together.
810
+ #
811
+ # @param The [String, Addressable::URI, #to_str] URI to join with.
812
+ # @return [Addressable::URI] The joined URI.
813
+ #
814
+ # source://addressable//lib/addressable/uri.rb#1982
815
+ def +(uri); end
816
+
817
+ # Returns <code>true</code> if the URI objects are equal. This method
818
+ # normalizes both URIs before doing the comparison.
819
+ #
820
+ # @param uri [Object] The URI to compare.
821
+ # @return [TrueClass, FalseClass] <code>true</code> if the URIs are equivalent, <code>false</code>
822
+ # otherwise.
823
+ #
824
+ # source://addressable//lib/addressable/uri.rb#2239
825
+ def ==(uri); end
826
+
827
+ # Returns <code>true</code> if the URI objects are equal. This method
828
+ # normalizes both URIs before doing the comparison, and allows comparison
829
+ # against <code>Strings</code>.
830
+ #
831
+ # @param uri [Object] The URI to compare.
832
+ # @return [TrueClass, FalseClass] <code>true</code> if the URIs are equivalent, <code>false</code>
833
+ # otherwise.
834
+ #
835
+ # source://addressable//lib/addressable/uri.rb#2217
836
+ def ===(uri); end
837
+
838
+ # Determines if the URI is absolute.
839
+ #
840
+ # @return [TrueClass, FalseClass] <code>true</code> if the URI is absolute. <code>false</code>
841
+ # otherwise.
842
+ #
843
+ # source://addressable//lib/addressable/uri.rb#1879
844
+ def absolute?; end
845
+
846
+ # The authority component for this URI.
847
+ # Combines the user, password, host, and port components.
848
+ #
849
+ # @return [String] The authority component.
850
+ #
851
+ # source://addressable//lib/addressable/uri.rb#1234
852
+ def authority; end
853
+
854
+ # Sets the authority component for this URI.
855
+ #
856
+ # @param new_authority [String, #to_str] The new authority component.
857
+ #
858
+ # source://addressable//lib/addressable/uri.rb#1274
859
+ def authority=(new_authority); end
860
+
861
+ # The basename, if any, of the file in the path component.
862
+ #
863
+ # @return [String] The path's basename.
864
+ #
865
+ # source://addressable//lib/addressable/uri.rb#1588
866
+ def basename; end
867
+
868
+ # The default port for this URI's scheme.
869
+ # This method will always returns the default port for the URI's scheme
870
+ # regardless of the presence of an explicit port in the URI.
871
+ #
872
+ # @return [Integer] The default port.
873
+ #
874
+ # source://addressable//lib/addressable/uri.rb#1454
875
+ def default_port; end
876
+
877
+ # This method allows you to make several changes to a URI simultaneously,
878
+ # which separately would cause validation errors, but in conjunction,
879
+ # are valid. The URI will be revalidated as soon as the entire block has
880
+ # been executed.
881
+ #
882
+ # @param block [Proc] A set of operations to perform on a given URI.
883
+ #
884
+ # source://addressable//lib/addressable/uri.rb#2396
885
+ def defer_validation; end
886
+
887
+ # Creates a URI suitable for display to users. If semantic attacks are
888
+ # likely, the application should try to detect these and warn the user.
889
+ # See <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>,
890
+ # section 7.6 for more information.
891
+ #
892
+ # @return [Addressable::URI] A URI suitable for display purposes.
893
+ #
894
+ # source://addressable//lib/addressable/uri.rb#2201
895
+ def display_uri; end
896
+
897
+ # Returns the public suffix domain for this host.
898
+ #
899
+ # @example
900
+ # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk"
901
+ #
902
+ # source://addressable//lib/addressable/uri.rb#1225
903
+ def domain; end
904
+
905
+ # Clones the URI object.
906
+ #
907
+ # @return [Addressable::URI] The cloned URI.
908
+ #
909
+ # source://addressable//lib/addressable/uri.rb#2271
910
+ def dup; end
911
+
912
+ # Determines if the URI is an empty string.
913
+ #
914
+ # @return [TrueClass, FalseClass] Returns <code>true</code> if empty, <code>false</code> otherwise.
915
+ #
916
+ # source://addressable//lib/addressable/uri.rb#2333
917
+ def empty?; end
918
+
919
+ # source://addressable//lib/addressable/uri.rb#2406
920
+ def encode_with(coder); end
921
+
922
+ # Returns <code>true</code> if the URI objects are equal. This method
923
+ # does NOT normalize either URI before doing the comparison.
924
+ #
925
+ # @param uri [Object] The URI to compare.
926
+ # @return [TrueClass, FalseClass] <code>true</code> if the URIs are equivalent, <code>false</code>
927
+ # otherwise.
928
+ #
929
+ # source://addressable//lib/addressable/uri.rb#2253
930
+ def eql?(uri); end
931
+
932
+ # The extname, if any, of the file in the path component.
933
+ # Empty string if there is no extension.
934
+ #
935
+ # @return [String] The path's extname.
936
+ #
937
+ # source://addressable//lib/addressable/uri.rb#1598
938
+ def extname; end
939
+
940
+ # The fragment component for this URI.
941
+ #
942
+ # @return [String] The fragment component.
943
+ #
944
+ # source://addressable//lib/addressable/uri.rb#1810
945
+ def fragment; end
946
+
947
+ # Sets the fragment component for this URI.
948
+ #
949
+ # @param new_fragment [String, #to_str] The new fragment component.
950
+ #
951
+ # source://addressable//lib/addressable/uri.rb#1835
952
+ def fragment=(new_fragment); end
953
+
954
+ # Freeze URI, initializing instance variables.
955
+ #
956
+ # @return [Addressable::URI] The frozen URI object.
957
+ #
958
+ # source://addressable//lib/addressable/uri.rb#870
959
+ def freeze; end
960
+
961
+ # A hash value that will make a URI equivalent to its normalized
962
+ # form.
963
+ #
964
+ # @return [Integer] A hash of the URI.
965
+ #
966
+ # source://addressable//lib/addressable/uri.rb#2263
967
+ def hash; end
968
+
969
+ # The host component for this URI.
970
+ #
971
+ # @return [String] The host component.
972
+ #
973
+ # source://addressable//lib/addressable/uri.rb#1120
974
+ def host; end
975
+
976
+ # Sets the host component for this URI.
977
+ #
978
+ # @param new_host [String, #to_str] The new host component.
979
+ #
980
+ # source://addressable//lib/addressable/uri.rb#1156
981
+ def host=(new_host); end
982
+
983
+ # This method is same as URI::Generic#host except
984
+ # brackets for IPv6 (and 'IPvFuture') addresses are removed.
985
+ #
986
+ # @return [String] The hostname for this URI.
987
+ # @see Addressable::URI#host
988
+ #
989
+ # source://addressable//lib/addressable/uri.rb#1178
990
+ def hostname; end
991
+
992
+ # This method is same as URI::Generic#host= except
993
+ # the argument can be a bare IPv6 address (or 'IPvFuture').
994
+ #
995
+ # @param new_hostname [String, #to_str] The new hostname for this URI.
996
+ # @see Addressable::URI#host=
997
+ #
998
+ # source://addressable//lib/addressable/uri.rb#1190
999
+ def hostname=(new_hostname); end
1000
+
1001
+ # The inferred port component for this URI.
1002
+ # This method will normalize to the default port for the URI's scheme if
1003
+ # the port isn't explicitly specified in the URI.
1004
+ #
1005
+ # @return [Integer] The inferred port component.
1006
+ #
1007
+ # source://addressable//lib/addressable/uri.rb#1440
1008
+ def inferred_port; end
1009
+
1010
+ # source://addressable//lib/addressable/uri.rb#2417
1011
+ def init_with(coder); end
1012
+
1013
+ # Returns a <code>String</code> representation of the URI object's state.
1014
+ #
1015
+ # @return [String] The URI object's state, as a <code>String</code>.
1016
+ #
1017
+ # source://addressable//lib/addressable/uri.rb#2384
1018
+ def inspect; end
1019
+
1020
+ # Determines if the scheme indicates an IP-based protocol.
1021
+ #
1022
+ # @return [TrueClass, FalseClass] <code>true</code> if the scheme indicates an IP-based protocol.
1023
+ # <code>false</code> otherwise.
1024
+ #
1025
+ # source://addressable//lib/addressable/uri.rb#1855
1026
+ def ip_based?; end
1027
+
1028
+ # Joins two URIs together.
1029
+ #
1030
+ # @param The [String, Addressable::URI, #to_str] URI to join with.
1031
+ # @return [Addressable::URI] The joined URI.
1032
+ #
1033
+ # source://addressable//lib/addressable/uri.rb#1889
1034
+ def join(uri); end
1035
+
1036
+ # Destructive form of <code>join</code>.
1037
+ #
1038
+ # @param The [String, Addressable::URI, #to_str] URI to join with.
1039
+ # @return [Addressable::URI] The joined URI.
1040
+ # @see Addressable::URI#join
1041
+ #
1042
+ # source://addressable//lib/addressable/uri.rb#1992
1043
+ def join!(uri); end
1044
+
1045
+ # Merges a URI with a <code>Hash</code> of components.
1046
+ # This method has different behavior from <code>join</code>. Any
1047
+ # components present in the <code>hash</code> parameter will override the
1048
+ # original components. The path component is not treated specially.
1049
+ #
1050
+ # @param The [Hash, Addressable::URI, #to_hash] components to merge with.
1051
+ # @return [Addressable::URI] The merged URI.
1052
+ # @see Hash#merge
1053
+ #
1054
+ # source://addressable//lib/addressable/uri.rb#2007
1055
+ def merge(hash); end
1056
+
1057
+ # Destructive form of <code>merge</code>.
1058
+ #
1059
+ # @param The [Hash, Addressable::URI, #to_hash] components to merge with.
1060
+ # @return [Addressable::URI] The merged URI.
1061
+ # @see Addressable::URI#merge
1062
+ #
1063
+ # source://addressable//lib/addressable/uri.rb#2072
1064
+ def merge!(uri); end
1065
+
1066
+ # Returns a normalized URI object.
1067
+ #
1068
+ # NOTE: This method does not attempt to fully conform to specifications.
1069
+ # It exists largely to correct other people's failures to read the
1070
+ # specifications, and also to deal with caching issues since several
1071
+ # different URIs may represent the same resource and should not be
1072
+ # cached multiple times.
1073
+ #
1074
+ # @return [Addressable::URI] The normalized URI.
1075
+ #
1076
+ # source://addressable//lib/addressable/uri.rb#2164
1077
+ def normalize; end
1078
+
1079
+ # Destructively normalizes this URI object.
1080
+ #
1081
+ # @return [Addressable::URI] The normalized URI.
1082
+ # @see Addressable::URI#normalize
1083
+ #
1084
+ # source://addressable//lib/addressable/uri.rb#2190
1085
+ def normalize!; end
1086
+
1087
+ # The authority component for this URI, normalized.
1088
+ #
1089
+ # @return [String] The authority component, normalized.
1090
+ #
1091
+ # source://addressable//lib/addressable/uri.rb#1252
1092
+ def normalized_authority; end
1093
+
1094
+ # The fragment component for this URI, normalized.
1095
+ #
1096
+ # @return [String] The fragment component, normalized.
1097
+ #
1098
+ # source://addressable//lib/addressable/uri.rb#1816
1099
+ def normalized_fragment; end
1100
+
1101
+ # The host component for this URI, normalized.
1102
+ #
1103
+ # @return [String] The host component, normalized.
1104
+ #
1105
+ # source://addressable//lib/addressable/uri.rb#1126
1106
+ def normalized_host; end
1107
+
1108
+ # The password component for this URI, normalized.
1109
+ #
1110
+ # @return [String] The password component, normalized.
1111
+ #
1112
+ # source://addressable//lib/addressable/uri.rb#1002
1113
+ def normalized_password; end
1114
+
1115
+ # The path component for this URI, normalized.
1116
+ #
1117
+ # @return [String] The path component, normalized.
1118
+ #
1119
+ # source://addressable//lib/addressable/uri.rb#1535
1120
+ def normalized_path; end
1121
+
1122
+ # The port component for this URI, normalized.
1123
+ #
1124
+ # @return [Integer] The port component, normalized.
1125
+ #
1126
+ # source://addressable//lib/addressable/uri.rb#1392
1127
+ def normalized_port; end
1128
+
1129
+ # The query component for this URI, normalized.
1130
+ #
1131
+ # @return [String] The query component, normalized.
1132
+ #
1133
+ # source://addressable//lib/addressable/uri.rb#1613
1134
+ def normalized_query(*flags); end
1135
+
1136
+ # The scheme component for this URI, normalized.
1137
+ #
1138
+ # @return [String] The scheme component, normalized.
1139
+ #
1140
+ # source://addressable//lib/addressable/uri.rb#896
1141
+ def normalized_scheme; end
1142
+
1143
+ # The normalized combination of components that represent a site.
1144
+ # Combines the scheme, user, password, host, and port components.
1145
+ # Primarily useful for HTTP and HTTPS.
1146
+ #
1147
+ # For example, <code>"http://example.com/path?query"</code> would have a
1148
+ # <code>site</code> value of <code>"http://example.com"</code>.
1149
+ #
1150
+ # @return [String] The normalized components that identify a site.
1151
+ #
1152
+ # source://addressable//lib/addressable/uri.rb#1485
1153
+ def normalized_site; end
1154
+
1155
+ # The user component for this URI, normalized.
1156
+ #
1157
+ # @return [String] The user component, normalized.
1158
+ #
1159
+ # source://addressable//lib/addressable/uri.rb#947
1160
+ def normalized_user; end
1161
+
1162
+ # The userinfo component for this URI, normalized.
1163
+ #
1164
+ # @return [String] The userinfo component, normalized.
1165
+ #
1166
+ # source://addressable//lib/addressable/uri.rb#1068
1167
+ def normalized_userinfo; end
1168
+
1169
+ # Omits components from a URI.
1170
+ #
1171
+ # @example
1172
+ # uri = Addressable::URI.parse("http://example.com/path?query")
1173
+ # #=> #<Addressable::URI:0xcc5e7a URI:http://example.com/path?query>
1174
+ # uri.omit(:scheme, :authority)
1175
+ # #=> #<Addressable::URI:0xcc4d86 URI:/path?query>
1176
+ # @param *components [Symbol] The components to be omitted.
1177
+ # @return [Addressable::URI] The URI with components omitted.
1178
+ #
1179
+ # source://addressable//lib/addressable/uri.rb#2297
1180
+ def omit(*components); end
1181
+
1182
+ # Destructive form of omit.
1183
+ #
1184
+ # @param *components [Symbol] The components to be omitted.
1185
+ # @return [Addressable::URI] The URI with components omitted.
1186
+ # @see Addressable::URI#omit
1187
+ #
1188
+ # source://addressable//lib/addressable/uri.rb#2324
1189
+ def omit!(*components); end
1190
+
1191
+ # The origin for this URI, serialized to ASCII, as per
1192
+ # RFC 6454, section 6.2.
1193
+ #
1194
+ # @return [String] The serialized origin.
1195
+ #
1196
+ # source://addressable//lib/addressable/uri.rb#1314
1197
+ def origin; end
1198
+
1199
+ # Sets the origin for this URI, serialized to ASCII, as per
1200
+ # RFC 6454, section 6.2. This assignment will reset the `userinfo`
1201
+ # component.
1202
+ #
1203
+ # @param new_origin [String, #to_str] The new origin component.
1204
+ #
1205
+ # source://addressable//lib/addressable/uri.rb#1333
1206
+ def origin=(new_origin); end
1207
+
1208
+ # The password component for this URI.
1209
+ #
1210
+ # @return [String] The password component.
1211
+ #
1212
+ # source://addressable//lib/addressable/uri.rb#996
1213
+ def password; end
1214
+
1215
+ # Sets the password component for this URI.
1216
+ #
1217
+ # @param new_password [String, #to_str] The new password component.
1218
+ #
1219
+ # source://addressable//lib/addressable/uri.rb#1025
1220
+ def password=(new_password); end
1221
+
1222
+ # The path component for this URI.
1223
+ #
1224
+ # @return [String] The path component.
1225
+ #
1226
+ # source://addressable//lib/addressable/uri.rb#1528
1227
+ def path; end
1228
+
1229
+ # Sets the path component for this URI.
1230
+ #
1231
+ # @param new_path [String, #to_str] The new path component.
1232
+ #
1233
+ # source://addressable//lib/addressable/uri.rb#1567
1234
+ def path=(new_path); end
1235
+
1236
+ # The port component for this URI.
1237
+ # This is the port number actually given in the URI. This does not
1238
+ # infer port numbers from default values.
1239
+ #
1240
+ # @return [Integer] The port component.
1241
+ #
1242
+ # source://addressable//lib/addressable/uri.rb#1386
1243
+ def port; end
1244
+
1245
+ # Sets the port component for this URI.
1246
+ #
1247
+ # @param new_port [String, Integer, #to_s] The new port component.
1248
+ #
1249
+ # source://addressable//lib/addressable/uri.rb#1408
1250
+ def port=(new_port); end
1251
+
1252
+ # The query component for this URI.
1253
+ #
1254
+ # @return [String] The query component.
1255
+ #
1256
+ # source://addressable//lib/addressable/uri.rb#1607
1257
+ def query; end
1258
+
1259
+ # Sets the query component for this URI.
1260
+ #
1261
+ # @param new_query [String, #to_str] The new query component.
1262
+ #
1263
+ # source://addressable//lib/addressable/uri.rb#1641
1264
+ def query=(new_query); end
1265
+
1266
+ # Converts the query component to a Hash value.
1267
+ #
1268
+ # @example
1269
+ # Addressable::URI.parse("?one=1&two=2&three=3").query_values
1270
+ # #=> {"one" => "1", "two" => "2", "three" => "3"}
1271
+ # Addressable::URI.parse("?one=two&one=three").query_values(Array)
1272
+ # #=> [["one", "two"], ["one", "three"]]
1273
+ # Addressable::URI.parse("?one=two&one=three").query_values(Hash)
1274
+ # #=> {"one" => "three"}
1275
+ # Addressable::URI.parse("?").query_values
1276
+ # #=> {}
1277
+ # Addressable::URI.parse("").query_values
1278
+ # #=> nil
1279
+ # @param return_type [Class] The return type desired. Value must be either
1280
+ # `Hash` or `Array`.
1281
+ # @return [Hash, Array, nil] The query string parsed as a Hash or Array
1282
+ # or nil if the query string is blank.
1283
+ #
1284
+ # source://addressable//lib/addressable/uri.rb#1672
1285
+ def query_values(return_type = T.unsafe(nil)); end
1286
+
1287
+ # Sets the query component for this URI from a Hash object.
1288
+ # An empty Hash or Array will result in an empty query string.
1289
+ #
1290
+ # @example
1291
+ # uri.query_values = {:a => "a", :b => ["c", "d", "e"]}
1292
+ # uri.query
1293
+ # # => "a=a&b=c&b=d&b=e"
1294
+ # uri.query_values = [['a', 'a'], ['b', 'c'], ['b', 'd'], ['b', 'e']]
1295
+ # uri.query
1296
+ # # => "a=a&b=c&b=d&b=e"
1297
+ # uri.query_values = [['a', 'a'], ['b', ['c', 'd', 'e']]]
1298
+ # uri.query
1299
+ # # => "a=a&b=c&b=d&b=e"
1300
+ # uri.query_values = [['flag'], ['key', 'value']]
1301
+ # uri.query
1302
+ # # => "flag&key=value"
1303
+ # @param new_query_values [Hash, #to_hash, Array] The new query values.
1304
+ #
1305
+ # source://addressable//lib/addressable/uri.rb#1723
1306
+ def query_values=(new_query_values); end
1307
+
1308
+ # Determines if the URI is relative.
1309
+ #
1310
+ # @return [TrueClass, FalseClass] <code>true</code> if the URI is relative. <code>false</code>
1311
+ # otherwise.
1312
+ #
1313
+ # source://addressable//lib/addressable/uri.rb#1869
1314
+ def relative?; end
1315
+
1316
+ # The HTTP request URI for this URI. This is the path and the
1317
+ # query string.
1318
+ #
1319
+ # @return [String] The request URI required for an HTTP request.
1320
+ #
1321
+ # source://addressable//lib/addressable/uri.rb#1774
1322
+ def request_uri; end
1323
+
1324
+ # Sets the HTTP request URI for this URI.
1325
+ #
1326
+ # @param new_request_uri [String, #to_str] The new HTTP request URI.
1327
+ #
1328
+ # source://addressable//lib/addressable/uri.rb#1786
1329
+ def request_uri=(new_request_uri); end
1330
+
1331
+ # Returns the shortest normalized relative form of this URI that uses the
1332
+ # supplied URI as a base for resolution. Returns an absolute URI if
1333
+ # necessary. This is effectively the opposite of <code>route_to</code>.
1334
+ #
1335
+ # @param uri [String, Addressable::URI, #to_str] The URI to route from.
1336
+ # @return [Addressable::URI] The normalized relative URI that is equivalent to the original URI.
1337
+ #
1338
+ # source://addressable//lib/addressable/uri.rb#2085
1339
+ def route_from(uri); end
1340
+
1341
+ # Returns the shortest normalized relative form of the supplied URI that
1342
+ # uses this URI as a base for resolution. Returns an absolute URI if
1343
+ # necessary. This is effectively the opposite of <code>route_from</code>.
1344
+ #
1345
+ # @param uri [String, Addressable::URI, #to_str] The URI to route to.
1346
+ # @return [Addressable::URI] The normalized relative URI that is equivalent to the supplied URI.
1347
+ #
1348
+ # source://addressable//lib/addressable/uri.rb#2150
1349
+ def route_to(uri); end
1350
+
1351
+ # The scheme component for this URI.
1352
+ #
1353
+ # @return [String] The scheme component.
1354
+ #
1355
+ # source://addressable//lib/addressable/uri.rb#890
1356
+ def scheme; end
1357
+
1358
+ # Sets the scheme component for this URI.
1359
+ #
1360
+ # @param new_scheme [String, #to_str] The new scheme component.
1361
+ #
1362
+ # source://addressable//lib/addressable/uri.rb#917
1363
+ def scheme=(new_scheme); end
1364
+
1365
+ # The combination of components that represent a site.
1366
+ # Combines the scheme, user, password, host, and port components.
1367
+ # Primarily useful for HTTP and HTTPS.
1368
+ #
1369
+ # For example, <code>"http://example.com/path?query"</code> would have a
1370
+ # <code>site</code> value of <code>"http://example.com"</code>.
1371
+ #
1372
+ # @return [String] The components that identify a site.
1373
+ #
1374
+ # source://addressable//lib/addressable/uri.rb#1467
1375
+ def site; end
1376
+
1377
+ # Sets the site value for this URI.
1378
+ #
1379
+ # @param new_site [String, #to_str] The new site value.
1380
+ #
1381
+ # source://addressable//lib/addressable/uri.rb#1506
1382
+ def site=(new_site); end
1383
+
1384
+ # Returns the top-level domain for this host.
1385
+ #
1386
+ # @example
1387
+ # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk"
1388
+ #
1389
+ # source://addressable//lib/addressable/uri.rb#1207
1390
+ def tld; end
1391
+
1392
+ # Sets the top-level domain for this URI.
1393
+ #
1394
+ # @param new_tld [String, #to_str] The new top-level domain.
1395
+ #
1396
+ # source://addressable//lib/addressable/uri.rb#1215
1397
+ def tld=(new_tld); end
1398
+
1399
+ # Returns a Hash of the URI components.
1400
+ #
1401
+ # @return [Hash] The URI as a <code>Hash</code> of components.
1402
+ #
1403
+ # source://addressable//lib/addressable/uri.rb#2367
1404
+ def to_hash; end
1405
+
1406
+ # Converts the URI to a <code>String</code>.
1407
+ #
1408
+ # @return [String] The URI's <code>String</code> representation.
1409
+ #
1410
+ # source://addressable//lib/addressable/uri.rb#2341
1411
+ def to_s; end
1412
+
1413
+ # Converts the URI to a <code>String</code>.
1414
+ # URI's are glorified <code>Strings</code>. Allow implicit conversion.
1415
+ #
1416
+ # @return [String] The URI's <code>String</code> representation.
1417
+ #
1418
+ # source://addressable//lib/addressable/uri.rb#2361
1419
+ def to_str; end
1420
+
1421
+ # The user component for this URI.
1422
+ #
1423
+ # @return [String] The user component.
1424
+ #
1425
+ # source://addressable//lib/addressable/uri.rb#941
1426
+ def user; end
1427
+
1428
+ # Sets the user component for this URI.
1429
+ #
1430
+ # @param new_user [String, #to_str] The new user component.
1431
+ #
1432
+ # source://addressable//lib/addressable/uri.rb#970
1433
+ def user=(new_user); end
1434
+
1435
+ # The userinfo component for this URI.
1436
+ # Combines the user and password components.
1437
+ #
1438
+ # @return [String] The userinfo component.
1439
+ #
1440
+ # source://addressable//lib/addressable/uri.rb#1052
1441
+ def userinfo; end
1442
+
1443
+ # Sets the userinfo component for this URI.
1444
+ #
1445
+ # @param new_userinfo [String, #to_str] The new userinfo component.
1446
+ #
1447
+ # source://addressable//lib/addressable/uri.rb#1091
1448
+ def userinfo=(new_userinfo); end
1449
+
1450
+ protected
1451
+
1452
+ # Converts the string to be UTF-8 if it is not already UTF-8
1453
+ #
1454
+ # @api private
1455
+ #
1456
+ # source://addressable//lib/addressable/uri.rb#2561
1457
+ def force_utf8_encoding_if_needed(str); end
1458
+
1459
+ # Resets composite values for the entire URI
1460
+ #
1461
+ # @api private
1462
+ #
1463
+ # source://addressable//lib/addressable/uri.rb#2552
1464
+ def remove_composite_values; end
1465
+
1466
+ # Replaces the internal state of self with the specified URI's state.
1467
+ # Used in destructive operations to avoid massive code repetition.
1468
+ #
1469
+ # @param uri [Addressable::URI] The URI to replace <code>self</code> with.
1470
+ # @return [Addressable::URI] <code>self</code>.
1471
+ #
1472
+ # source://addressable//lib/addressable/uri.rb#2519
1473
+ def replace_self(uri); end
1474
+
1475
+ # Splits path string with "/" (slash).
1476
+ # It is considered that there is empty string after last slash when
1477
+ # path ends with slash.
1478
+ #
1479
+ # @param path [String] The path to split.
1480
+ # @return [Array<String>] An array of parts of path.
1481
+ #
1482
+ # source://addressable//lib/addressable/uri.rb#2542
1483
+ def split_path(path); end
1484
+
1485
+ # Ensures that the URI is valid.
1486
+ #
1487
+ # source://addressable//lib/addressable/uri.rb#2476
1488
+ def validate; end
1489
+
1490
+ private
1491
+
1492
+ # Resets instance variables
1493
+ #
1494
+ # @api private
1495
+ #
1496
+ # source://addressable//lib/addressable/uri.rb#2573
1497
+ def reset_ivs; end
1498
+
1499
+ class << self
1500
+ # Converts a path to a file scheme URI. If the path supplied is
1501
+ # relative, it will be returned as a relative URI. If the path supplied
1502
+ # is actually a non-file URI, it will parse the URI as if it had been
1503
+ # parsed with <code>Addressable::URI.parse</code>. Handles all of the
1504
+ # various Microsoft-specific formats for specifying paths.
1505
+ #
1506
+ # @example
1507
+ # base = Addressable::URI.convert_path("/absolute/path/")
1508
+ # uri = Addressable::URI.convert_path("relative/path")
1509
+ # (base + uri).to_s
1510
+ # #=> "file:///absolute/path/relative/path"
1511
+ #
1512
+ # Addressable::URI.convert_path(
1513
+ # "c:\\windows\\My Documents 100%20\\foo.txt"
1514
+ # ).to_s
1515
+ # #=> "file:///c:/windows/My%20Documents%20100%20/foo.txt"
1516
+ #
1517
+ # Addressable::URI.convert_path("http://example.com/").to_s
1518
+ # #=> "http://example.com/"
1519
+ # @param path [String, Addressable::URI, #to_str] Typically a <code>String</code> path to a file or directory, but
1520
+ # will return a sensible return value if an absolute URI is supplied
1521
+ # instead.
1522
+ # @return [Addressable::URI] The parsed file scheme URI or the original URI if some other URI
1523
+ # scheme was provided.
1524
+ #
1525
+ # source://addressable//lib/addressable/uri.rb#292
1526
+ def convert_path(path); end
1527
+
1528
+ # Percent encodes any special characters in the URI.
1529
+ #
1530
+ # @param uri [String, Addressable::URI, #to_str] The URI to encode.
1531
+ # @param return_type [Class] The type of object to return.
1532
+ # This value may only be set to <code>String</code> or
1533
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
1534
+ # to <code>String</code>.
1535
+ # @return [String, Addressable::URI] The encoded URI.
1536
+ # The return type is determined by the <code>return_type</code>
1537
+ # parameter.
1538
+ #
1539
+ # source://addressable//lib/addressable/uri.rb#616
1540
+ def encode(uri, return_type = T.unsafe(nil)); end
1541
+
1542
+ # Percent encodes a URI component.
1543
+ #
1544
+ # '9' to be percent encoded. If a <code>Regexp</code> is passed, the
1545
+ # value <code>/[^b-zB-Z0-9]/</code> would have the same effect. A set of
1546
+ # useful <code>String</code> values may be found in the
1547
+ # <code>Addressable::URI::CharacterClasses</code> module. The default
1548
+ # value is the reserved plus unreserved character classes specified in
1549
+ # <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
1550
+ #
1551
+ # @example
1552
+ # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9")
1553
+ # => "simple%2Fex%61mple"
1554
+ # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/)
1555
+ # => "simple%2Fex%61mple"
1556
+ # Addressable::URI.encode_component(
1557
+ # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED
1558
+ # )
1559
+ # => "simple%2Fexample"
1560
+ # @param component [String, #to_str] The URI component to encode.
1561
+ # @param character_class [String, Regexp] The characters which are not percent encoded. If a <code>String</code>
1562
+ # is passed, the <code>String</code> must be formatted as a regular
1563
+ # expression character class. (Do not include the surrounding square
1564
+ # brackets.) For example, <code>"b-zB-Z0-9"</code> would cause
1565
+ # everything but the letters 'b' through 'z' and the numbers '0' through
1566
+ # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose
1567
+ # encodings should be upcased. This allows normalization of percent
1568
+ # encodings for characters not included in the
1569
+ # <code>character_class</code>.
1570
+ # @return [String] The encoded component.
1571
+ #
1572
+ # source://addressable//lib/addressable/uri.rb#403
1573
+ def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end
1574
+
1575
+ # Percent encodes any special characters in the URI.
1576
+ #
1577
+ # @param uri [String, Addressable::URI, #to_str] The URI to encode.
1578
+ # @param return_type [Class] The type of object to return.
1579
+ # This value may only be set to <code>String</code> or
1580
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
1581
+ # to <code>String</code>.
1582
+ # @return [String, Addressable::URI] The encoded URI.
1583
+ # The return type is determined by the <code>return_type</code>
1584
+ # parameter.
1585
+ #
1586
+ # source://addressable//lib/addressable/uri.rb#651
1587
+ def escape(uri, return_type = T.unsafe(nil)); end
1588
+
1589
+ # Percent encodes a URI component.
1590
+ #
1591
+ # '9' to be percent encoded. If a <code>Regexp</code> is passed, the
1592
+ # value <code>/[^b-zB-Z0-9]/</code> would have the same effect. A set of
1593
+ # useful <code>String</code> values may be found in the
1594
+ # <code>Addressable::URI::CharacterClasses</code> module. The default
1595
+ # value is the reserved plus unreserved character classes specified in
1596
+ # <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
1597
+ #
1598
+ # @example
1599
+ # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9")
1600
+ # => "simple%2Fex%61mple"
1601
+ # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/)
1602
+ # => "simple%2Fex%61mple"
1603
+ # Addressable::URI.encode_component(
1604
+ # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED
1605
+ # )
1606
+ # => "simple%2Fexample"
1607
+ # @param component [String, #to_str] The URI component to encode.
1608
+ # @param character_class [String, Regexp] The characters which are not percent encoded. If a <code>String</code>
1609
+ # is passed, the <code>String</code> must be formatted as a regular
1610
+ # expression character class. (Do not include the surrounding square
1611
+ # brackets.) For example, <code>"b-zB-Z0-9"</code> would cause
1612
+ # everything but the letters 'b' through 'z' and the numbers '0' through
1613
+ # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose
1614
+ # encodings should be upcased. This allows normalization of percent
1615
+ # encodings for characters not included in the
1616
+ # <code>character_class</code>.
1617
+ # @return [String] The encoded component.
1618
+ #
1619
+ # source://addressable//lib/addressable/uri.rb#446
1620
+ def escape_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end
1621
+
1622
+ # Encodes a set of key/value pairs according to the rules for the
1623
+ # <code>application/x-www-form-urlencoded</code> MIME type.
1624
+ #
1625
+ # @param form_values [#to_hash, #to_ary] The form values to encode.
1626
+ # @param sort [TrueClass, FalseClass] Sort the key/value pairs prior to encoding.
1627
+ # Defaults to <code>false</code>.
1628
+ # @return [String] The encoded value.
1629
+ #
1630
+ # source://addressable//lib/addressable/uri.rb#740
1631
+ def form_encode(form_values, sort = T.unsafe(nil)); end
1632
+
1633
+ # Decodes a <code>String</code> according to the rules for the
1634
+ # <code>application/x-www-form-urlencoded</code> MIME type.
1635
+ #
1636
+ # @param encoded_value [String, #to_str] The form values to decode.
1637
+ # @return [Array] The decoded values.
1638
+ # This is not a <code>Hash</code> because of the possibility for
1639
+ # duplicate keys.
1640
+ #
1641
+ # source://addressable//lib/addressable/uri.rb#793
1642
+ def form_unencode(encoded_value); end
1643
+
1644
+ # Converts an input to a URI. The input does not have to be a valid
1645
+ # URI — the method will use heuristics to guess what URI was intended.
1646
+ # This is not standards-compliant, merely user-friendly.
1647
+ #
1648
+ # @param uri [String, Addressable::URI, #to_str] The URI string to parse.
1649
+ # No parsing is performed if the object is already an
1650
+ # <code>Addressable::URI</code>.
1651
+ # @param hints [Hash] A <code>Hash</code> of hints to the heuristic parser.
1652
+ # Defaults to <code>{:scheme => "http"}</code>.
1653
+ # @return [Addressable::URI] The parsed URI.
1654
+ #
1655
+ # source://addressable//lib/addressable/uri.rb#191
1656
+ def heuristic_parse(uri, hints = T.unsafe(nil)); end
1657
+
1658
+ # Returns an array of known ip-based schemes. These schemes typically
1659
+ # use a similar URI form:
1660
+ # <code>//<user>:<password>@<host>:<port>/<url-path></code>
1661
+ #
1662
+ # source://addressable//lib/addressable/uri.rb#1369
1663
+ def ip_based_schemes; end
1664
+
1665
+ # Joins several URIs together.
1666
+ #
1667
+ # @example
1668
+ # base = "http://example.com/"
1669
+ # uri = Addressable::URI.parse("relative/path")
1670
+ # Addressable::URI.join(base, uri)
1671
+ # #=> #<Addressable::URI:0xcab390 URI:http://example.com/relative/path>
1672
+ # @param *uris [String, Addressable::URI, #to_str] The URIs to join.
1673
+ # @return [Addressable::URI] The joined URI.
1674
+ #
1675
+ # source://addressable//lib/addressable/uri.rb#343
1676
+ def join(*uris); end
1677
+
1678
+ # Normalizes the encoding of a URI component.
1679
+ #
1680
+ # @example
1681
+ # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z")
1682
+ # => "simple%2Fex%61mple"
1683
+ # Addressable::URI.normalize_component(
1684
+ # "simpl%65/%65xampl%65", /[^b-zB-Z]/
1685
+ # )
1686
+ # => "simple%2Fex%61mple"
1687
+ # Addressable::URI.normalize_component(
1688
+ # "simpl%65/%65xampl%65",
1689
+ # Addressable::URI::CharacterClasses::UNRESERVED
1690
+ # )
1691
+ # => "simple%2Fexample"
1692
+ # Addressable::URI.normalize_component(
1693
+ # "one%20two%2fthree%26four",
1694
+ # "0-9a-zA-Z &/",
1695
+ # "/"
1696
+ # )
1697
+ # => "one two%2Fthree&four"
1698
+ # @param component [String, #to_str] The URI component to encode.
1699
+ # @param character_class [String, Regexp] The characters which are not percent encoded. If a <code>String</code>
1700
+ # is passed, the <code>String</code> must be formatted as a regular
1701
+ # expression character class. (Do not include the surrounding square
1702
+ # brackets.) For example, <code>"b-zB-Z0-9"</code> would cause
1703
+ # everything but the letters 'b' through 'z' and the numbers '0'
1704
+ # through '9' to be percent encoded. If a <code>Regexp</code> is passed,
1705
+ # the value <code>/[^b-zB-Z0-9]/</code> would have the same effect. A
1706
+ # set of useful <code>String</code> values may be found in the
1707
+ # <code>Addressable::URI::CharacterClasses</code> module. The default
1708
+ # value is the reserved plus unreserved character classes specified in
1709
+ # <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
1710
+ # @param leave_encoded [String] When <code>character_class</code> is a <code>String</code> then
1711
+ # <code>leave_encoded</code> is a string of characters that should remain
1712
+ # percent encoded while normalizing the component; if they appear percent
1713
+ # encoded in the original component, then they will be upcased ("%2f"
1714
+ # normalized to "%2F") but otherwise left alone.
1715
+ # @return [String] The normalized component.
1716
+ #
1717
+ # source://addressable//lib/addressable/uri.rb#552
1718
+ def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end
1719
+
1720
+ # Resolves paths to their simplest form.
1721
+ #
1722
+ # @param path [String] The path to normalize.
1723
+ # @return [String] The normalized path.
1724
+ #
1725
+ # source://addressable//lib/addressable/uri.rb#2440
1726
+ def normalize_path(path); end
1727
+
1728
+ # Normalizes the encoding of a URI. Characters within a hostname are
1729
+ # not percent encoded to allow for internationalized domain names.
1730
+ #
1731
+ # @param uri [String, Addressable::URI, #to_str] The URI to encode.
1732
+ # @param return_type [Class] The type of object to return.
1733
+ # This value may only be set to <code>String</code> or
1734
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
1735
+ # to <code>String</code>.
1736
+ # @return [String, Addressable::URI] The encoded URI.
1737
+ # The return type is determined by the <code>return_type</code>
1738
+ # parameter.
1739
+ #
1740
+ # source://addressable//lib/addressable/uri.rb#671
1741
+ def normalized_encode(uri, return_type = T.unsafe(nil)); end
1742
+
1743
+ # Returns a URI object based on the parsed string.
1744
+ #
1745
+ # @param uri [String, Addressable::URI, #to_str] The URI string to parse.
1746
+ # No parsing is performed if the object is already an
1747
+ # <code>Addressable::URI</code>.
1748
+ # @return [Addressable::URI] The parsed URI.
1749
+ #
1750
+ # source://addressable//lib/addressable/uri.rb#114
1751
+ def parse(uri); end
1752
+
1753
+ # Returns a hash of common IP-based schemes and their default port
1754
+ # numbers. Adding new schemes to this hash, as necessary, will allow
1755
+ # for better URI normalization.
1756
+ #
1757
+ # source://addressable//lib/addressable/uri.rb#1376
1758
+ def port_mapping; end
1759
+
1760
+ # Unencodes any percent encoded characters within a URI component.
1761
+ # This method may be used for unencoding either components or full URIs,
1762
+ # however, it is recommended to use the <code>unencode_component</code>
1763
+ # alias when unencoding components.
1764
+ #
1765
+ # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode.
1766
+ # @param return_type [Class] The type of object to return.
1767
+ # This value may only be set to <code>String</code> or
1768
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
1769
+ # to <code>String</code>.
1770
+ # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character
1771
+ # in this list is encountered then it will remain percent encoded.
1772
+ # @return [String, Addressable::URI] The unencoded component or URI.
1773
+ # The return type is determined by the <code>return_type</code>
1774
+ # parameter.
1775
+ #
1776
+ # source://addressable//lib/addressable/uri.rb#472
1777
+ def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end
1778
+
1779
+ # Unencodes any percent encoded characters within a URI component.
1780
+ # This method may be used for unencoding either components or full URIs,
1781
+ # however, it is recommended to use the <code>unencode_component</code>
1782
+ # alias when unencoding components.
1783
+ #
1784
+ # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode.
1785
+ # @param return_type [Class] The type of object to return.
1786
+ # This value may only be set to <code>String</code> or
1787
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
1788
+ # to <code>String</code>.
1789
+ # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character
1790
+ # in this list is encountered then it will remain percent encoded.
1791
+ # @return [String, Addressable::URI] The unencoded component or URI.
1792
+ # The return type is determined by the <code>return_type</code>
1793
+ # parameter.
1794
+ #
1795
+ # source://addressable//lib/addressable/uri.rb#502
1796
+ def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end
1797
+
1798
+ # Unencodes any percent encoded characters within a URI component.
1799
+ # This method may be used for unencoding either components or full URIs,
1800
+ # however, it is recommended to use the <code>unencode_component</code>
1801
+ # alias when unencoding components.
1802
+ #
1803
+ # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode.
1804
+ # @param return_type [Class] The type of object to return.
1805
+ # This value may only be set to <code>String</code> or
1806
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
1807
+ # to <code>String</code>.
1808
+ # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character
1809
+ # in this list is encountered then it will remain percent encoded.
1810
+ # @return [String, Addressable::URI] The unencoded component or URI.
1811
+ # The return type is determined by the <code>return_type</code>
1812
+ # parameter.
1813
+ #
1814
+ # source://addressable//lib/addressable/uri.rb#501
1815
+ def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end
1816
+
1817
+ # Unencodes any percent encoded characters within a URI component.
1818
+ # This method may be used for unencoding either components or full URIs,
1819
+ # however, it is recommended to use the <code>unencode_component</code>
1820
+ # alias when unencoding components.
1821
+ #
1822
+ # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode.
1823
+ # @param return_type [Class] The type of object to return.
1824
+ # This value may only be set to <code>String</code> or
1825
+ # <code>Addressable::URI</code>. All other values are invalid. Defaults
1826
+ # to <code>String</code>.
1827
+ # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character
1828
+ # in this list is encountered then it will remain percent encoded.
1829
+ # @return [String, Addressable::URI] The unencoded component or URI.
1830
+ # The return type is determined by the <code>return_type</code>
1831
+ # parameter.
1832
+ #
1833
+ # source://addressable//lib/addressable/uri.rb#503
1834
+ def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end
1835
+ end
1836
+ end
1837
+
1838
+ # Container for the character classes specified in
1839
+ # <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
1840
+ #
1841
+ # Note: Concatenated and interpolated `String`s are not affected by the
1842
+ # `frozen_string_literal` directive and must be frozen explicitly.
1843
+ #
1844
+ # Interpolated `String`s *were* frozen this way before Ruby 3.0:
1845
+ # https://bugs.ruby-lang.org/issues/17104
1846
+ #
1847
+ # source://addressable//lib/addressable/uri.rb#46
1848
+ module Addressable::URI::CharacterClasses; end
1849
+
1850
+ # source://addressable//lib/addressable/uri.rb#47
1851
+ Addressable::URI::CharacterClasses::ALPHA = T.let(T.unsafe(nil), String)
1852
+
1853
+ # source://addressable//lib/addressable/uri.rb#57
1854
+ Addressable::URI::CharacterClasses::AUTHORITY = T.let(T.unsafe(nil), String)
1855
+
1856
+ # source://addressable//lib/addressable/uri.rb#48
1857
+ Addressable::URI::CharacterClasses::DIGIT = T.let(T.unsafe(nil), String)
1858
+
1859
+ # source://addressable//lib/addressable/uri.rb#60
1860
+ Addressable::URI::CharacterClasses::FRAGMENT = T.let(T.unsafe(nil), String)
1861
+
1862
+ # source://addressable//lib/addressable/uri.rb#49
1863
+ Addressable::URI::CharacterClasses::GEN_DELIMS = T.let(T.unsafe(nil), String)
1864
+
1865
+ # source://addressable//lib/addressable/uri.rb#56
1866
+ Addressable::URI::CharacterClasses::HOST = T.let(T.unsafe(nil), String)
1867
+
1868
+ # source://addressable//lib/addressable/uri.rb#58
1869
+ Addressable::URI::CharacterClasses::PATH = T.let(T.unsafe(nil), String)
1870
+
1871
+ # source://addressable//lib/addressable/uri.rb#54
1872
+ Addressable::URI::CharacterClasses::PCHAR = T.let(T.unsafe(nil), String)
1873
+
1874
+ # source://addressable//lib/addressable/uri.rb#59
1875
+ Addressable::URI::CharacterClasses::QUERY = T.let(T.unsafe(nil), String)
1876
+
1877
+ # source://addressable//lib/addressable/uri.rb#51
1878
+ Addressable::URI::CharacterClasses::RESERVED = T.let(T.unsafe(nil), String)
1879
+
1880
+ # source://addressable//lib/addressable/uri.rb#53
1881
+ Addressable::URI::CharacterClasses::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), String)
1882
+
1883
+ # source://addressable//lib/addressable/uri.rb#55
1884
+ Addressable::URI::CharacterClasses::SCHEME = T.let(T.unsafe(nil), String)
1885
+
1886
+ # source://addressable//lib/addressable/uri.rb#50
1887
+ Addressable::URI::CharacterClasses::SUB_DELIMS = T.let(T.unsafe(nil), String)
1888
+
1889
+ # source://addressable//lib/addressable/uri.rb#52
1890
+ Addressable::URI::CharacterClasses::UNRESERVED = T.let(T.unsafe(nil), String)
1891
+
1892
+ # source://addressable//lib/addressable/uri.rb#72
1893
+ module Addressable::URI::CharacterClassesRegexps; end
1894
+
1895
+ # source://addressable//lib/addressable/uri.rb#73
1896
+ Addressable::URI::CharacterClassesRegexps::AUTHORITY = T.let(T.unsafe(nil), Regexp)
1897
+
1898
+ # source://addressable//lib/addressable/uri.rb#74
1899
+ Addressable::URI::CharacterClassesRegexps::FRAGMENT = T.let(T.unsafe(nil), Regexp)
1900
+
1901
+ # source://addressable//lib/addressable/uri.rb#75
1902
+ Addressable::URI::CharacterClassesRegexps::HOST = T.let(T.unsafe(nil), Regexp)
1903
+
1904
+ # source://addressable//lib/addressable/uri.rb#76
1905
+ Addressable::URI::CharacterClassesRegexps::PATH = T.let(T.unsafe(nil), Regexp)
1906
+
1907
+ # source://addressable//lib/addressable/uri.rb#77
1908
+ Addressable::URI::CharacterClassesRegexps::QUERY = T.let(T.unsafe(nil), Regexp)
1909
+
1910
+ # source://addressable//lib/addressable/uri.rb#78
1911
+ Addressable::URI::CharacterClassesRegexps::RESERVED = T.let(T.unsafe(nil), Regexp)
1912
+
1913
+ # source://addressable//lib/addressable/uri.rb#79
1914
+ Addressable::URI::CharacterClassesRegexps::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), Regexp)
1915
+
1916
+ # source://addressable//lib/addressable/uri.rb#80
1917
+ Addressable::URI::CharacterClassesRegexps::SCHEME = T.let(T.unsafe(nil), Regexp)
1918
+
1919
+ # source://addressable//lib/addressable/uri.rb#81
1920
+ Addressable::URI::CharacterClassesRegexps::UNRESERVED = T.let(T.unsafe(nil), Regexp)
1921
+
1922
+ # source://addressable//lib/addressable/uri.rb#85
1923
+ Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String)
1924
+
1925
+ # Raised if something other than a uri is supplied.
1926
+ #
1927
+ # source://addressable//lib/addressable/uri.rb#34
1928
+ class Addressable::URI::InvalidURIError < ::StandardError; end
1929
+
1930
+ module Addressable::URI::NONE; end
1931
+
1932
+ # source://addressable//lib/addressable/uri.rb#1530
1933
+ Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp)
1934
+
1935
+ # source://addressable//lib/addressable/uri.rb#63
1936
+ module Addressable::URI::NormalizeCharacterClasses; end
1937
+
1938
+ # source://addressable//lib/addressable/uri.rb#68
1939
+ Addressable::URI::NormalizeCharacterClasses::FRAGMENT = T.let(T.unsafe(nil), Regexp)
1940
+
1941
+ # source://addressable//lib/addressable/uri.rb#64
1942
+ Addressable::URI::NormalizeCharacterClasses::HOST = T.let(T.unsafe(nil), Regexp)
1943
+
1944
+ # source://addressable//lib/addressable/uri.rb#66
1945
+ Addressable::URI::NormalizeCharacterClasses::PCHAR = T.let(T.unsafe(nil), Regexp)
1946
+
1947
+ # source://addressable//lib/addressable/uri.rb#69
1948
+ Addressable::URI::NormalizeCharacterClasses::QUERY = T.let(T.unsafe(nil), Regexp)
1949
+
1950
+ # source://addressable//lib/addressable/uri.rb#67
1951
+ Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regexp)
1952
+
1953
+ # source://addressable//lib/addressable/uri.rb#65
1954
+ Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp)
1955
+
1956
+ # source://addressable//lib/addressable/uri.rb#2427
1957
+ Addressable::URI::PARENT = T.let(T.unsafe(nil), String)
1958
+
1959
+ # source://addressable//lib/addressable/uri.rb#89
1960
+ Addressable::URI::PORT_MAPPING = T.let(T.unsafe(nil), Hash)
1961
+
1962
+ # source://addressable//lib/addressable/uri.rb#2429
1963
+ Addressable::URI::RULE_2A = T.let(T.unsafe(nil), Regexp)
1964
+
1965
+ # source://addressable//lib/addressable/uri.rb#2430
1966
+ Addressable::URI::RULE_2B_2C = T.let(T.unsafe(nil), Regexp)
1967
+
1968
+ # source://addressable//lib/addressable/uri.rb#2431
1969
+ Addressable::URI::RULE_2D = T.let(T.unsafe(nil), Regexp)
1970
+
1971
+ # source://addressable//lib/addressable/uri.rb#2432
1972
+ Addressable::URI::RULE_PREFIXED_PARENT = T.let(T.unsafe(nil), Regexp)
1973
+
1974
+ # source://addressable//lib/addressable/uri.rb#2426
1975
+ Addressable::URI::SELF_REF = T.let(T.unsafe(nil), String)
1976
+
1977
+ # Tables used to optimize encoding operations in `self.encode_component`
1978
+ # and `self.normalize_component`
1979
+ #
1980
+ # source://addressable//lib/addressable/uri.rb#360
1981
+ Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Array)
1982
+
1983
+ # source://addressable//lib/addressable/uri.rb#364
1984
+ Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Array)
1985
+
1986
+ # source://addressable//lib/addressable/uri.rb#84
1987
+ Addressable::URI::SLASH = T.let(T.unsafe(nil), String)
1988
+
1989
+ # source://addressable//lib/addressable/uri.rb#87
1990
+ Addressable::URI::URIREGEX = T.let(T.unsafe(nil), Regexp)
1991
+
1992
+ # source://addressable//lib/addressable/version.rb#23
1993
+ module Addressable::VERSION; end
1994
+
1995
+ # source://addressable//lib/addressable/version.rb#24
1996
+ Addressable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
1997
+
1998
+ # source://addressable//lib/addressable/version.rb#25
1999
+ Addressable::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
2000
+
2001
+ # source://addressable//lib/addressable/version.rb#28
2002
+ Addressable::VERSION::STRING = T.let(T.unsafe(nil), String)
2003
+
2004
+ # source://addressable//lib/addressable/version.rb#26
2005
+ Addressable::VERSION::TINY = T.let(T.unsafe(nil), Integer)