lunchmoney 0.10.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 (142) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.github/dependabot.yml +18 -0
  4. data/.github/workflows/build_and_publish_yard_docs.yml +47 -0
  5. data/.github/workflows/ci.yml +58 -0
  6. data/.github/workflows/dependabot-rbi-updater.yml +43 -0
  7. data/.github/workflows/publish_gem.yml +31 -0
  8. data/.gitignore +62 -0
  9. data/.rubocop.yml +45 -0
  10. data/.ruby-version +1 -0
  11. data/.toys/.toys.rb +10 -0
  12. data/.toys/ci.rb +22 -0
  13. data/.toys/rbi.rb +60 -0
  14. data/.toys/rubocop.rb +10 -0
  15. data/.toys/spoom.rb +15 -0
  16. data/.toys/typecheck.rb +5 -0
  17. data/.yardopts +2 -0
  18. data/Appraisals +22 -0
  19. data/Gemfile +25 -0
  20. data/Gemfile.lock +174 -0
  21. data/LICENSE +21 -0
  22. data/README.md +57 -0
  23. data/bin/console +16 -0
  24. data/bin/rubocop +27 -0
  25. data/bin/setup +8 -0
  26. data/bin/spoom +27 -0
  27. data/bin/srb +27 -0
  28. data/bin/tapioca +27 -0
  29. data/bin/toys +27 -0
  30. data/bin/yard +27 -0
  31. data/lib/lunchmoney/api.rb +147 -0
  32. data/lib/lunchmoney/api_call.rb +109 -0
  33. data/lib/lunchmoney/assets/asset.rb +89 -0
  34. data/lib/lunchmoney/assets/asset_calls.rb +96 -0
  35. data/lib/lunchmoney/budget/budget.rb +74 -0
  36. data/lib/lunchmoney/budget/budget_calls.rb +82 -0
  37. data/lib/lunchmoney/budget/config.rb +38 -0
  38. data/lib/lunchmoney/budget/data.rb +42 -0
  39. data/lib/lunchmoney/categories/category/category.rb +52 -0
  40. data/lib/lunchmoney/categories/category/child_category.rb +42 -0
  41. data/lib/lunchmoney/categories/category_calls.rb +195 -0
  42. data/lib/lunchmoney/configuration.rb +26 -0
  43. data/lib/lunchmoney/crypto/crypto/crypto.rb +43 -0
  44. data/lib/lunchmoney/crypto/crypto/crypto_base.rb +65 -0
  45. data/lib/lunchmoney/crypto/crypto_calls.rb +49 -0
  46. data/lib/lunchmoney/data_object.rb +25 -0
  47. data/lib/lunchmoney/errors.rb +19 -0
  48. data/lib/lunchmoney/exceptions.rb +19 -0
  49. data/lib/lunchmoney/plaid_accounts/plaid_account.rb +73 -0
  50. data/lib/lunchmoney/plaid_accounts/plaid_account_calls.rb +38 -0
  51. data/lib/lunchmoney/recurring_expenses/recurring_expense/recurring_expense.rb +65 -0
  52. data/lib/lunchmoney/recurring_expenses/recurring_expense/recurring_expense_base.rb +29 -0
  53. data/lib/lunchmoney/recurring_expenses/recurring_expense_calls.rb +28 -0
  54. data/lib/lunchmoney/tags/tag/tag.rb +20 -0
  55. data/lib/lunchmoney/tags/tag/tag_base.rb +21 -0
  56. data/lib/lunchmoney/tags/tag_calls.rb +20 -0
  57. data/lib/lunchmoney/transactions/transaction/child_transaction.rb +31 -0
  58. data/lib/lunchmoney/transactions/transaction/split.rb +24 -0
  59. data/lib/lunchmoney/transactions/transaction/transaction.rb +156 -0
  60. data/lib/lunchmoney/transactions/transaction/transaction_base.rb +52 -0
  61. data/lib/lunchmoney/transactions/transaction/transaction_modification_base.rb +30 -0
  62. data/lib/lunchmoney/transactions/transaction/update_transaction.rb +43 -0
  63. data/lib/lunchmoney/transactions/transaction_calls.rb +218 -0
  64. data/lib/lunchmoney/user/user.rb +36 -0
  65. data/lib/lunchmoney/user/user_calls.rb +19 -0
  66. data/lib/lunchmoney/validators.rb +43 -0
  67. data/lib/lunchmoney/version.rb +7 -0
  68. data/lib/lunchmoney.rb +54 -0
  69. data/lunchmoney.gemspec +34 -0
  70. data/sorbet/config +5 -0
  71. data/sorbet/rbi/annotations/.gitattributes +1 -0
  72. data/sorbet/rbi/annotations/activesupport.rbi +410 -0
  73. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  74. data/sorbet/rbi/annotations/mocha.rbi +34 -0
  75. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  76. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  77. data/sorbet/rbi/dsl/.gitattributes +1 -0
  78. data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
  79. data/sorbet/rbi/gems/.gitattributes +1 -0
  80. data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18004 -0
  81. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1993 -0
  82. data/sorbet/rbi/gems/appraisal@2.5.0.rbi +621 -0
  83. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  84. data/sorbet/rbi/gems/base64@0.2.0.rbi +508 -0
  85. data/sorbet/rbi/gems/bigdecimal@3.1.6.rbi +77 -0
  86. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  87. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11590 -0
  88. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
  89. data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
  90. data/sorbet/rbi/gems/dotenv@2.8.1.rbi +234 -0
  91. data/sorbet/rbi/gems/drb@2.2.0.rbi +1346 -0
  92. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  93. data/sorbet/rbi/gems/faraday-net_http@3.1.0.rbi +146 -0
  94. data/sorbet/rbi/gems/faraday@2.9.0.rbi +2911 -0
  95. data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +352 -0
  96. data/sorbet/rbi/gems/i18n@1.14.1.rbi +2325 -0
  97. data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
  98. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  99. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  100. data/sorbet/rbi/gems/minitest@5.21.2.rbi +2197 -0
  101. data/sorbet/rbi/gems/mocha@2.1.0.rbi +3934 -0
  102. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +93 -0
  103. data/sorbet/rbi/gems/net-http@0.4.1.rbi +4068 -0
  104. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  105. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  106. data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
  107. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  108. data/sorbet/rbi/gems/prism@0.19.0.rbi +29883 -0
  109. data/sorbet/rbi/gems/pry-sorbet@0.2.1.rbi +966 -0
  110. data/sorbet/rbi/gems/pry@0.14.2.rbi +10077 -0
  111. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +935 -0
  112. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  113. data/sorbet/rbi/gems/rack@3.0.8.rbi +5183 -0
  114. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  115. data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
  116. data/sorbet/rbi/gems/rbi@0.1.6.rbi +2922 -0
  117. data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +3771 -0
  118. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
  119. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7117 -0
  120. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2576 -0
  121. data/sorbet/rbi/gems/rubocop-rails@2.23.1.rbi +9175 -0
  122. data/sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi +8 -0
  123. data/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi +1510 -0
  124. data/sorbet/rbi/gems/rubocop@1.60.1.rbi +57356 -0
  125. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  126. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  127. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  128. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
  129. data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3506 -0
  130. data/sorbet/rbi/gems/thor@1.3.0.rbi +4312 -0
  131. data/sorbet/rbi/gems/toys-core@0.15.4.rbi +9462 -0
  132. data/sorbet/rbi/gems/toys@0.15.4.rbi +243 -0
  133. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
  134. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  135. data/sorbet/rbi/gems/uri@0.13.0.rbi +2327 -0
  136. data/sorbet/rbi/gems/vcr@6.2.0.rbi +3036 -0
  137. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1768 -0
  138. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  139. data/sorbet/rbi/gems/yard@0.9.34.rbi +18084 -0
  140. data/sorbet/shims/module.rbi +6 -0
  141. data/sorbet/tapioca/require.rb +10 -0
  142. metadata +228 -0
@@ -0,0 +1,2327 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `uri` gem.
5
+ # Please instead update this file by running `bin/tapioca gem uri`.
6
+
7
+ # module URI
8
+ module Kernel
9
+ private
10
+
11
+ # Returns a \URI object derived from the given +uri+,
12
+ # which may be a \URI string or an existing \URI object:
13
+ #
14
+ # # Returns a new URI.
15
+ # uri = URI('http://github.com/ruby/ruby')
16
+ # # => #<URI::HTTP http://github.com/ruby/ruby>
17
+ # # Returns the given URI.
18
+ # URI(uri)
19
+ # # => #<URI::HTTP http://github.com/ruby/ruby>
20
+ #
21
+ # source://uri//uri/common.rb#842
22
+ def URI(uri); end
23
+
24
+ class << self
25
+ # Returns a \URI object derived from the given +uri+,
26
+ # which may be a \URI string or an existing \URI object:
27
+ #
28
+ # # Returns a new URI.
29
+ # uri = URI('http://github.com/ruby/ruby')
30
+ # # => #<URI::HTTP http://github.com/ruby/ruby>
31
+ # # Returns the given URI.
32
+ # URI(uri)
33
+ # # => #<URI::HTTP http://github.com/ruby/ruby>
34
+ #
35
+ # source://uri//uri/common.rb#842
36
+ def URI(uri); end
37
+ end
38
+ end
39
+
40
+ module URI
41
+ include ::URI::RFC2396_REGEXP
42
+
43
+ class << self
44
+ # Like URI.decode_www_form_component, except that <tt>'+'</tt> is preserved.
45
+ #
46
+ # source://uri//uri/common.rb#379
47
+ def decode_uri_component(str, enc = T.unsafe(nil)); end
48
+
49
+ # Returns name/value pairs derived from the given string +str+,
50
+ # which must be an ASCII string.
51
+ #
52
+ # The method may be used to decode the body of Net::HTTPResponse object +res+
53
+ # for which <tt>res['Content-Type']</tt> is <tt>'application/x-www-form-urlencoded'</tt>.
54
+ #
55
+ # The returned data is an array of 2-element subarrays;
56
+ # each subarray is a name/value pair (both are strings).
57
+ # Each returned string has encoding +enc+,
58
+ # and has had invalid characters removed via
59
+ # {String#scrub}[rdoc-ref:String#scrub].
60
+ #
61
+ # A simple example:
62
+ #
63
+ # URI.decode_www_form('foo=0&bar=1&baz')
64
+ # # => [["foo", "0"], ["bar", "1"], ["baz", ""]]
65
+ #
66
+ # The returned strings have certain conversions,
67
+ # similar to those performed in URI.decode_www_form_component:
68
+ #
69
+ # URI.decode_www_form('f%23o=%2F&b-r=%24&b+z=%40')
70
+ # # => [["f#o", "/"], ["b-r", "$"], ["b z", "@"]]
71
+ #
72
+ # The given string may contain consecutive separators:
73
+ #
74
+ # URI.decode_www_form('foo=0&&bar=1&&baz=2')
75
+ # # => [["foo", "0"], ["", ""], ["bar", "1"], ["", ""], ["baz", "2"]]
76
+ #
77
+ # A different separator may be specified:
78
+ #
79
+ # URI.decode_www_form('foo=0--bar=1--baz', separator: '--')
80
+ # # => [["foo", "0"], ["bar", "1"], ["baz", ""]]
81
+ #
82
+ # @raise [ArgumentError]
83
+ #
84
+ # source://uri//uri/common.rb#554
85
+ def decode_www_form(str, enc = T.unsafe(nil), separator: T.unsafe(nil), use__charset_: T.unsafe(nil), isindex: T.unsafe(nil)); end
86
+
87
+ # Returns a string decoded from the given \URL-encoded string +str+.
88
+ #
89
+ # The given string is first encoded as Encoding::ASCII-8BIT (using String#b),
90
+ # then decoded (as below), and finally force-encoded to the given encoding +enc+.
91
+ #
92
+ # The returned string:
93
+ #
94
+ # - Preserves:
95
+ #
96
+ # - Characters <tt>'*'</tt>, <tt>'.'</tt>, <tt>'-'</tt>, and <tt>'_'</tt>.
97
+ # - Character in ranges <tt>'a'..'z'</tt>, <tt>'A'..'Z'</tt>,
98
+ # and <tt>'0'..'9'</tt>.
99
+ #
100
+ # Example:
101
+ #
102
+ # URI.decode_www_form_component('*.-_azAZ09')
103
+ # # => "*.-_azAZ09"
104
+ #
105
+ # - Converts:
106
+ #
107
+ # - Character <tt>'+'</tt> to character <tt>' '</tt>.
108
+ # - Each "percent notation" to an ASCII character.
109
+ #
110
+ # Example:
111
+ #
112
+ # URI.decode_www_form_component('Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A')
113
+ # # => "Here are some punctuation characters: ,;?:"
114
+ #
115
+ # Related: URI.decode_uri_component (preserves <tt>'+'</tt>).
116
+ #
117
+ # source://uri//uri/common.rb#368
118
+ def decode_www_form_component(str, enc = T.unsafe(nil)); end
119
+
120
+ # Like URI.encode_www_form_component, except that <tt>' '</tt> (space)
121
+ # is encoded as <tt>'%20'</tt> (instead of <tt>'+'</tt>).
122
+ #
123
+ # source://uri//uri/common.rb#374
124
+ def encode_uri_component(str, enc = T.unsafe(nil)); end
125
+
126
+ # Returns a URL-encoded string derived from the given
127
+ # {Enumerable}[rdoc-ref:Enumerable@Enumerable+in+Ruby+Classes]
128
+ # +enum+.
129
+ #
130
+ # The result is suitable for use as form data
131
+ # for an \HTTP request whose <tt>Content-Type</tt> is
132
+ # <tt>'application/x-www-form-urlencoded'</tt>.
133
+ #
134
+ # The returned string consists of the elements of +enum+,
135
+ # each converted to one or more URL-encoded strings,
136
+ # and all joined with character <tt>'&'</tt>.
137
+ #
138
+ # Simple examples:
139
+ #
140
+ # URI.encode_www_form([['foo', 0], ['bar', 1], ['baz', 2]])
141
+ # # => "foo=0&bar=1&baz=2"
142
+ # URI.encode_www_form({foo: 0, bar: 1, baz: 2})
143
+ # # => "foo=0&bar=1&baz=2"
144
+ #
145
+ # The returned string is formed using method URI.encode_www_form_component,
146
+ # which converts certain characters:
147
+ #
148
+ # URI.encode_www_form('f#o': '/', 'b-r': '$', 'b z': '@')
149
+ # # => "f%23o=%2F&b-r=%24&b+z=%40"
150
+ #
151
+ # When +enum+ is Array-like, each element +ele+ is converted to a field:
152
+ #
153
+ # - If +ele+ is an array of two or more elements,
154
+ # the field is formed from its first two elements
155
+ # (and any additional elements are ignored):
156
+ #
157
+ # name = URI.encode_www_form_component(ele[0], enc)
158
+ # value = URI.encode_www_form_component(ele[1], enc)
159
+ # "#{name}=#{value}"
160
+ #
161
+ # Examples:
162
+ #
163
+ # URI.encode_www_form([%w[foo bar], %w[baz bat bah]])
164
+ # # => "foo=bar&baz=bat"
165
+ # URI.encode_www_form([['foo', 0], ['bar', :baz, 'bat']])
166
+ # # => "foo=0&bar=baz"
167
+ #
168
+ # - If +ele+ is an array of one element,
169
+ # the field is formed from <tt>ele[0]</tt>:
170
+ #
171
+ # URI.encode_www_form_component(ele[0])
172
+ #
173
+ # Example:
174
+ #
175
+ # URI.encode_www_form([['foo'], [:bar], [0]])
176
+ # # => "foo&bar&0"
177
+ #
178
+ # - Otherwise the field is formed from +ele+:
179
+ #
180
+ # URI.encode_www_form_component(ele)
181
+ #
182
+ # Example:
183
+ #
184
+ # URI.encode_www_form(['foo', :bar, 0])
185
+ # # => "foo&bar&0"
186
+ #
187
+ # The elements of an Array-like +enum+ may be mixture:
188
+ #
189
+ # URI.encode_www_form([['foo', 0], ['bar', 1, 2], ['baz'], :bat])
190
+ # # => "foo=0&bar=1&baz&bat"
191
+ #
192
+ # When +enum+ is Hash-like,
193
+ # each +key+/+value+ pair is converted to one or more fields:
194
+ #
195
+ # - If +value+ is
196
+ # {Array-convertible}[rdoc-ref:implicit_conversion.rdoc@Array-Convertible+Objects],
197
+ # each element +ele+ in +value+ is paired with +key+ to form a field:
198
+ #
199
+ # name = URI.encode_www_form_component(key, enc)
200
+ # value = URI.encode_www_form_component(ele, enc)
201
+ # "#{name}=#{value}"
202
+ #
203
+ # Example:
204
+ #
205
+ # URI.encode_www_form({foo: [:bar, 1], baz: [:bat, :bam, 2]})
206
+ # # => "foo=bar&foo=1&baz=bat&baz=bam&baz=2"
207
+ #
208
+ # - Otherwise, +key+ and +value+ are paired to form a field:
209
+ #
210
+ # name = URI.encode_www_form_component(key, enc)
211
+ # value = URI.encode_www_form_component(value, enc)
212
+ # "#{name}=#{value}"
213
+ #
214
+ # Example:
215
+ #
216
+ # URI.encode_www_form({foo: 0, bar: 1, baz: 2})
217
+ # # => "foo=0&bar=1&baz=2"
218
+ #
219
+ # The elements of a Hash-like +enum+ may be mixture:
220
+ #
221
+ # URI.encode_www_form({foo: [0, 1], bar: 2})
222
+ # # => "foo=0&foo=1&bar=2"
223
+ #
224
+ # source://uri//uri/common.rb#501
225
+ def encode_www_form(enum, enc = T.unsafe(nil)); end
226
+
227
+ # Returns a URL-encoded string derived from the given string +str+.
228
+ #
229
+ # The returned string:
230
+ #
231
+ # - Preserves:
232
+ #
233
+ # - Characters <tt>'*'</tt>, <tt>'.'</tt>, <tt>'-'</tt>, and <tt>'_'</tt>.
234
+ # - Character in ranges <tt>'a'..'z'</tt>, <tt>'A'..'Z'</tt>,
235
+ # and <tt>'0'..'9'</tt>.
236
+ #
237
+ # Example:
238
+ #
239
+ # URI.encode_www_form_component('*.-_azAZ09')
240
+ # # => "*.-_azAZ09"
241
+ #
242
+ # - Converts:
243
+ #
244
+ # - Character <tt>' '</tt> to character <tt>'+'</tt>.
245
+ # - Any other character to "percent notation";
246
+ # the percent notation for character <i>c</i> is <tt>'%%%X' % c.ord</tt>.
247
+ #
248
+ # Example:
249
+ #
250
+ # URI.encode_www_form_component('Here are some punctuation characters: ,;?:')
251
+ # # => "Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A"
252
+ #
253
+ # Encoding:
254
+ #
255
+ # - If +str+ has encoding Encoding::ASCII_8BIT, argument +enc+ is ignored.
256
+ # - Otherwise +str+ is converted first to Encoding::UTF_8
257
+ # (with suitable character replacements),
258
+ # and then to encoding +enc+.
259
+ #
260
+ # In either case, the returned string has forced encoding Encoding::US_ASCII.
261
+ #
262
+ # Related: URI.encode_uri_component (encodes <tt>' '</tt> as <tt>'%20'</tt>).
263
+ #
264
+ # source://uri//uri/common.rb#335
265
+ def encode_www_form_component(str, enc = T.unsafe(nil)); end
266
+
267
+ # == Synopsis
268
+ #
269
+ # URI::extract(str[, schemes][,&blk])
270
+ #
271
+ # == Args
272
+ #
273
+ # +str+::
274
+ # String to extract URIs from.
275
+ # +schemes+::
276
+ # Limit URI matching to specific schemes.
277
+ #
278
+ # == Description
279
+ #
280
+ # Extracts URIs from a string. If block given, iterates through all matched URIs.
281
+ # Returns nil if block given or array with matches.
282
+ #
283
+ # == Usage
284
+ #
285
+ # require "uri"
286
+ #
287
+ # URI.extract("text here http://foo.example.org/bla and here mailto:test@example.com and here also.")
288
+ # # => ["http://foo.example.com/bla", "mailto:test@example.com"]
289
+ #
290
+ # source://uri//uri/common.rb#239
291
+ def extract(str, schemes = T.unsafe(nil), &block); end
292
+
293
+ # Returns a new object constructed from the given +scheme+, +arguments+,
294
+ # and +default+:
295
+ #
296
+ # - The new object is an instance of <tt>URI.scheme_list[scheme.upcase]</tt>.
297
+ # - The object is initialized by calling the class initializer
298
+ # using +scheme+ and +arguments+.
299
+ # See URI::Generic.new.
300
+ #
301
+ # Examples:
302
+ #
303
+ # values = ['john.doe', 'www.example.com', '123', nil, '/forum/questions/', nil, 'tag=networking&order=newest', 'top']
304
+ # URI.for('https', *values)
305
+ # # => #<URI::HTTPS https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top>
306
+ # URI.for('foo', *values, default: URI::HTTP)
307
+ # # => #<URI::HTTP foo://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top>
308
+ #
309
+ # source://uri//uri/common.rb#123
310
+ def for(scheme, *arguments, default: T.unsafe(nil)); end
311
+
312
+ # return encoding or nil
313
+ # http://encoding.spec.whatwg.org/#concept-encoding-get
314
+ #
315
+ # source://uri//uri/common.rb#824
316
+ def get_encoding(label); end
317
+
318
+ # Merges the given URI strings +str+
319
+ # per {RFC 2396}[https://www.rfc-editor.org/rfc/rfc2396.html].
320
+ #
321
+ # Each string in +str+ is converted to an
322
+ # {RFC3986 URI}[https://www.rfc-editor.org/rfc/rfc3986.html] before being merged.
323
+ #
324
+ # Examples:
325
+ #
326
+ # URI.join("http://example.com/","main.rbx")
327
+ # # => #<URI::HTTP http://example.com/main.rbx>
328
+ #
329
+ # URI.join('http://example.com', 'foo')
330
+ # # => #<URI::HTTP http://example.com/foo>
331
+ #
332
+ # URI.join('http://example.com', '/foo', '/bar')
333
+ # # => #<URI::HTTP http://example.com/bar>
334
+ #
335
+ # URI.join('http://example.com', '/foo', 'bar')
336
+ # # => #<URI::HTTP http://example.com/bar>
337
+ #
338
+ # URI.join('http://example.com', '/foo/', 'bar')
339
+ # # => #<URI::HTTP http://example.com/foo/bar>
340
+ #
341
+ # source://uri//uri/common.rb#211
342
+ def join(*str); end
343
+
344
+ # Returns a new \URI object constructed from the given string +uri+:
345
+ #
346
+ # URI.parse('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top')
347
+ # # => #<URI::HTTPS https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top>
348
+ # URI.parse('http://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top')
349
+ # # => #<URI::HTTP http://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top>
350
+ #
351
+ # It's recommended to first ::escape string +uri+
352
+ # if it may contain invalid URI characters.
353
+ #
354
+ # source://uri//uri/common.rb#184
355
+ def parse(uri); end
356
+
357
+ # == Synopsis
358
+ #
359
+ # URI::regexp([match_schemes])
360
+ #
361
+ # == Args
362
+ #
363
+ # +match_schemes+::
364
+ # Array of schemes. If given, resulting regexp matches to URIs
365
+ # whose scheme is one of the match_schemes.
366
+ #
367
+ # == Description
368
+ #
369
+ # Returns a Regexp object which matches to URI-like strings.
370
+ # The Regexp object returned by this method includes arbitrary
371
+ # number of capture group (parentheses). Never rely on its number.
372
+ #
373
+ # == Usage
374
+ #
375
+ # require 'uri'
376
+ #
377
+ # # extract first URI from html_string
378
+ # html_string.slice(URI.regexp)
379
+ #
380
+ # # remove ftp URIs
381
+ # html_string.sub(URI.regexp(['ftp']), '')
382
+ #
383
+ # # You should not rely on the number of parentheses
384
+ # html_string.scan(URI.regexp) do |*matches|
385
+ # p $&
386
+ # end
387
+ #
388
+ # source://uri//uri/common.rb#276
389
+ def regexp(schemes = T.unsafe(nil)); end
390
+
391
+ # Registers the given +klass+ as the class to be instantiated
392
+ # when parsing a \URI with the given +scheme+:
393
+ #
394
+ # URI.register_scheme('MS_SEARCH', URI::Generic) # => URI::Generic
395
+ # URI.scheme_list['MS_SEARCH'] # => URI::Generic
396
+ #
397
+ # Note that after calling String#upcase on +scheme+, it must be a valid
398
+ # constant name.
399
+ #
400
+ # source://uri//uri/common.rb#79
401
+ def register_scheme(scheme, klass); end
402
+
403
+ # Returns a hash of the defined schemes:
404
+ #
405
+ # URI.scheme_list
406
+ # # =>
407
+ # {"MAILTO"=>URI::MailTo,
408
+ # "LDAPS"=>URI::LDAPS,
409
+ # "WS"=>URI::WS,
410
+ # "HTTP"=>URI::HTTP,
411
+ # "HTTPS"=>URI::HTTPS,
412
+ # "LDAP"=>URI::LDAP,
413
+ # "FILE"=>URI::File,
414
+ # "FTP"=>URI::FTP}
415
+ #
416
+ # Related: URI.register_scheme.
417
+ #
418
+ # source://uri//uri/common.rb#97
419
+ def scheme_list; end
420
+
421
+ # Returns a 9-element array representing the parts of the \URI
422
+ # formed from the string +uri+;
423
+ # each array element is a string or +nil+:
424
+ #
425
+ # names = %w[scheme userinfo host port registry path opaque query fragment]
426
+ # values = URI.split('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top')
427
+ # names.zip(values)
428
+ # # =>
429
+ # [["scheme", "https"],
430
+ # ["userinfo", "john.doe"],
431
+ # ["host", "www.example.com"],
432
+ # ["port", "123"],
433
+ # ["registry", nil],
434
+ # ["path", "/forum/questions/"],
435
+ # ["opaque", nil],
436
+ # ["query", "tag=networking&order=newest"],
437
+ # ["fragment", "top"]]
438
+ #
439
+ # source://uri//uri/common.rb#170
440
+ def split(uri); end
441
+
442
+ private
443
+
444
+ # @raise [ArgumentError]
445
+ #
446
+ # source://uri//uri/common.rb#397
447
+ def _decode_uri_component(regexp, str, enc); end
448
+
449
+ # source://uri//uri/common.rb#383
450
+ def _encode_uri_component(regexp, table, str, enc); end
451
+ end
452
+ end
453
+
454
+ # FTP URI syntax is defined by RFC1738 section 3.2.
455
+ #
456
+ # This class will be redesigned because of difference of implementations;
457
+ # the structure of its path. draft-hoffman-ftp-uri-04 is a draft but it
458
+ # is a good summary about the de facto spec.
459
+ # http://tools.ietf.org/html/draft-hoffman-ftp-uri-04
460
+ class URI::FTP < ::URI::Generic
461
+ # == Description
462
+ #
463
+ # Creates a new URI::FTP object from generic URL components with no
464
+ # syntax checking.
465
+ #
466
+ # Unlike build(), this method does not escape the path component as
467
+ # required by RFC1738; instead it is treated as per RFC2396.
468
+ #
469
+ # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+,
470
+ # +opaque+, +query+, and +fragment+, in that order.
471
+ #
472
+ # @raise [InvalidURIError]
473
+ # @return [FTP] a new instance of FTP
474
+ #
475
+ # source://uri//uri/ftp.rb#133
476
+ def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = T.unsafe(nil), arg_check = T.unsafe(nil)); end
477
+
478
+ # source://uri//uri/ftp.rb#214
479
+ def merge(oth); end
480
+
481
+ # Returns the path from an FTP URI.
482
+ #
483
+ # RFC 1738 specifically states that the path for an FTP URI does not
484
+ # include the / which separates the URI path from the URI host. Example:
485
+ #
486
+ # <code>ftp://ftp.example.com/pub/ruby</code>
487
+ #
488
+ # The above URI indicates that the client should connect to
489
+ # ftp.example.com then cd to pub/ruby from the initial login directory.
490
+ #
491
+ # If you want to cd to an absolute directory, you must include an
492
+ # escaped / (%2F) in the path. Example:
493
+ #
494
+ # <code>ftp://ftp.example.com/%2Fpub/ruby</code>
495
+ #
496
+ # This method will then return "/pub/ruby".
497
+ #
498
+ # source://uri//uri/ftp.rb#240
499
+ def path; end
500
+
501
+ # Returns a String representation of the URI::FTP.
502
+ #
503
+ # source://uri//uri/ftp.rb#251
504
+ def to_s; end
505
+
506
+ # typecode accessor.
507
+ #
508
+ # See URI::FTP::COMPONENT.
509
+ #
510
+ # source://uri//uri/ftp.rb#161
511
+ def typecode; end
512
+
513
+ # == Args
514
+ #
515
+ # +v+::
516
+ # String
517
+ #
518
+ # == Description
519
+ #
520
+ # Public setter for the typecode +v+
521
+ # (with validation).
522
+ #
523
+ # See also URI::FTP.check_typecode.
524
+ #
525
+ # == Usage
526
+ #
527
+ # require 'uri'
528
+ #
529
+ # uri = URI.parse("ftp://john@ftp.example.com/my_file.img")
530
+ # #=> #<URI::FTP ftp://john@ftp.example.com/my_file.img>
531
+ # uri.typecode = "i"
532
+ # uri
533
+ # #=> #<URI::FTP ftp://john@ftp.example.com/my_file.img;type=i>
534
+ #
535
+ # source://uri//uri/ftp.rb#208
536
+ def typecode=(typecode); end
537
+
538
+ protected
539
+
540
+ # Private setter for the path of the URI::FTP.
541
+ #
542
+ # source://uri//uri/ftp.rb#245
543
+ def set_path(v); end
544
+
545
+ # Private setter for the typecode +v+.
546
+ #
547
+ # See also URI::FTP.typecode=.
548
+ #
549
+ # source://uri//uri/ftp.rb#180
550
+ def set_typecode(v); end
551
+
552
+ private
553
+
554
+ # Validates typecode +v+,
555
+ # returns +true+ or +false+.
556
+ #
557
+ # source://uri//uri/ftp.rb#166
558
+ def check_typecode(v); end
559
+
560
+ class << self
561
+ # == Description
562
+ #
563
+ # Creates a new URI::FTP object from components, with syntax checking.
564
+ #
565
+ # The components accepted are +userinfo+, +host+, +port+, +path+, and
566
+ # +typecode+.
567
+ #
568
+ # The components should be provided either as an Array, or as a Hash
569
+ # with keys formed by preceding the component names with a colon.
570
+ #
571
+ # If an Array is used, the components must be passed in the
572
+ # order <code>[userinfo, host, port, path, typecode]</code>.
573
+ #
574
+ # If the path supplied is absolute, it will be escaped in order to
575
+ # make it absolute in the URI.
576
+ #
577
+ # Examples:
578
+ #
579
+ # require 'uri'
580
+ #
581
+ # uri1 = URI::FTP.build(['user:password', 'ftp.example.com', nil,
582
+ # '/path/file.zip', 'i'])
583
+ # uri1.to_s # => "ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=i"
584
+ #
585
+ # uri2 = URI::FTP.build({:host => 'ftp.example.com',
586
+ # :path => 'ruby/src'})
587
+ # uri2.to_s # => "ftp://ftp.example.com/ruby/src"
588
+ #
589
+ # source://uri//uri/ftp.rb#96
590
+ def build(args); end
591
+
592
+ # source://uri//uri/ftp.rb#47
593
+ def new2(user, password, host, port, path, typecode = T.unsafe(nil), arg_check = T.unsafe(nil)); end
594
+ end
595
+ end
596
+
597
+ # The "file" URI is defined by RFC8089.
598
+ class URI::File < ::URI::Generic
599
+ # raise InvalidURIError
600
+ #
601
+ # @raise [URI::InvalidURIError]
602
+ #
603
+ # source://uri//uri/file.rb#82
604
+ def check_password(user); end
605
+
606
+ # raise InvalidURIError
607
+ #
608
+ # @raise [URI::InvalidURIError]
609
+ #
610
+ # source://uri//uri/file.rb#77
611
+ def check_user(user); end
612
+
613
+ # raise InvalidURIError
614
+ #
615
+ # @raise [URI::InvalidURIError]
616
+ #
617
+ # source://uri//uri/file.rb#72
618
+ def check_userinfo(user); end
619
+
620
+ # Protected setter for the host component +v+.
621
+ #
622
+ # See also URI::Generic.host=.
623
+ #
624
+ # source://uri//uri/file.rb#62
625
+ def set_host(v); end
626
+
627
+ # do nothing
628
+ #
629
+ # source://uri//uri/file.rb#95
630
+ def set_password(v); end
631
+
632
+ # do nothing
633
+ #
634
+ # source://uri//uri/file.rb#68
635
+ def set_port(v); end
636
+
637
+ # do nothing
638
+ #
639
+ # source://uri//uri/file.rb#91
640
+ def set_user(v); end
641
+
642
+ # do nothing
643
+ #
644
+ # source://uri//uri/file.rb#87
645
+ def set_userinfo(v); end
646
+
647
+ class << self
648
+ # == Description
649
+ #
650
+ # Creates a new URI::File object from components, with syntax checking.
651
+ #
652
+ # The components accepted are +host+ and +path+.
653
+ #
654
+ # The components should be provided either as an Array, or as a Hash
655
+ # with keys formed by preceding the component names with a colon.
656
+ #
657
+ # If an Array is used, the components must be passed in the
658
+ # order <code>[host, path]</code>.
659
+ #
660
+ # A path from e.g. the File class should be escaped before
661
+ # being passed.
662
+ #
663
+ # Examples:
664
+ #
665
+ # require 'uri'
666
+ #
667
+ # uri1 = URI::File.build(['host.example.com', '/path/file.zip'])
668
+ # uri1.to_s # => "file://host.example.com/path/file.zip"
669
+ #
670
+ # uri2 = URI::File.build({:host => 'host.example.com',
671
+ # :path => '/ruby/src'})
672
+ # uri2.to_s # => "file://host.example.com/ruby/src"
673
+ #
674
+ # uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')})
675
+ # uri3.to_s # => "file:///path/my%20file.txt"
676
+ #
677
+ # source://uri//uri/file.rb#53
678
+ def build(args); end
679
+ end
680
+ end
681
+
682
+ # An Array of the available components for URI::File.
683
+ #
684
+ # source://uri//uri/file.rb#17
685
+ URI::File::COMPONENT = T.let(T.unsafe(nil), Array)
686
+
687
+ # A Default port of nil for URI::File.
688
+ #
689
+ # source://uri//uri/file.rb#12
690
+ URI::File::DEFAULT_PORT = T.let(T.unsafe(nil), T.untyped)
691
+
692
+ # Base class for all URI classes.
693
+ # Implements generic URI syntax as per RFC 2396.
694
+ class URI::Generic
695
+ include ::URI::RFC2396_REGEXP
696
+ include ::URI
697
+
698
+ # == Args
699
+ #
700
+ # +scheme+::
701
+ # Protocol scheme, i.e. 'http','ftp','mailto' and so on.
702
+ # +userinfo+::
703
+ # User name and password, i.e. 'sdmitry:bla'.
704
+ # +host+::
705
+ # Server host name.
706
+ # +port+::
707
+ # Server port.
708
+ # +registry+::
709
+ # Registry of naming authorities.
710
+ # +path+::
711
+ # Path on server.
712
+ # +opaque+::
713
+ # Opaque part.
714
+ # +query+::
715
+ # Query data.
716
+ # +fragment+::
717
+ # Part of the URI after '#' character.
718
+ # +parser+::
719
+ # Parser for internal use [URI::DEFAULT_PARSER by default].
720
+ # +arg_check+::
721
+ # Check arguments [false by default].
722
+ #
723
+ # == Description
724
+ #
725
+ # Creates a new URI::Generic instance from ``generic'' components without check.
726
+ #
727
+ # @return [Generic] a new instance of Generic
728
+ #
729
+ # source://uri//uri/generic.rb#169
730
+ def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = T.unsafe(nil), arg_check = T.unsafe(nil)); end
731
+
732
+ # == Args
733
+ #
734
+ # +oth+::
735
+ # URI or String
736
+ #
737
+ # == Description
738
+ #
739
+ # Merges two URIs.
740
+ #
741
+ # == Usage
742
+ #
743
+ # require 'uri'
744
+ #
745
+ # uri = URI.parse("http://my.example.com")
746
+ # uri.merge("/main.rbx?page=1")
747
+ # # => "http://my.example.com/main.rbx?page=1"
748
+ # merge
749
+ #
750
+ # source://uri//uri/generic.rb#1109
751
+ def +(oth); end
752
+
753
+ # == Args
754
+ #
755
+ # +oth+::
756
+ # URI or String
757
+ #
758
+ # == Description
759
+ #
760
+ # Calculates relative path from oth to self.
761
+ #
762
+ # == Usage
763
+ #
764
+ # require 'uri'
765
+ #
766
+ # uri = URI.parse('http://my.example.com/main.rbx?page=1')
767
+ # uri.route_from('http://my.example.com')
768
+ # #=> #<URI::Generic /main.rbx?page=1>
769
+ #
770
+ # source://uri//uri/generic.rb#1262
771
+ def -(oth); end
772
+
773
+ # Compares two URIs.
774
+ #
775
+ # source://uri//uri/generic.rb#1384
776
+ def ==(oth); end
777
+
778
+ # Returns true if URI has a scheme (e.g. http:// or https://) specified.
779
+ #
780
+ # @return [Boolean]
781
+ #
782
+ # source://uri//uri/generic.rb#972
783
+ def absolute; end
784
+
785
+ # Returns true if URI has a scheme (e.g. http:// or https://) specified.
786
+ #
787
+ # @return [Boolean]
788
+ #
789
+ # source://uri//uri/generic.rb#972
790
+ def absolute?; end
791
+
792
+ # == Args
793
+ #
794
+ # +v+::
795
+ # URI or String
796
+ #
797
+ # == Description
798
+ #
799
+ # Attempts to parse other URI +oth+,
800
+ # returns [parsed_oth, self].
801
+ #
802
+ # == Usage
803
+ #
804
+ # require 'uri'
805
+ #
806
+ # uri = URI.parse("http://my.example.com")
807
+ # uri.coerce("http://foo.com")
808
+ # #=> [#<URI::HTTP http://foo.com>, #<URI::HTTP http://my.example.com>]
809
+ #
810
+ # source://uri//uri/generic.rb#1474
811
+ def coerce(oth); end
812
+
813
+ # Components of the URI in the order.
814
+ #
815
+ # source://uri//uri/generic.rb#313
816
+ def component; end
817
+
818
+ # Returns the password component after URI decoding.
819
+ #
820
+ # source://uri//uri/generic.rb#583
821
+ def decoded_password; end
822
+
823
+ # Returns the user component after URI decoding.
824
+ #
825
+ # source://uri//uri/generic.rb#578
826
+ def decoded_user; end
827
+
828
+ # Returns default port.
829
+ #
830
+ # source://uri//uri/generic.rb#39
831
+ def default_port; end
832
+
833
+ # @return [Boolean]
834
+ #
835
+ # source://uri//uri/generic.rb#1396
836
+ def eql?(oth); end
837
+
838
+ # Returns a proxy URI.
839
+ # The proxy URI is obtained from environment variables such as http_proxy,
840
+ # ftp_proxy, no_proxy, etc.
841
+ # If there is no proper proxy, nil is returned.
842
+ #
843
+ # If the optional parameter +env+ is specified, it is used instead of ENV.
844
+ #
845
+ # Note that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.)
846
+ # are examined, too.
847
+ #
848
+ # But http_proxy and HTTP_PROXY is treated specially under CGI environment.
849
+ # It's because HTTP_PROXY may be set by Proxy: header.
850
+ # So HTTP_PROXY is not used.
851
+ # http_proxy is not used too if the variable is case insensitive.
852
+ # CGI_HTTP_PROXY can be used instead.
853
+ #
854
+ # @raise [BadURIError]
855
+ #
856
+ # source://uri//uri/generic.rb#1500
857
+ def find_proxy(env = T.unsafe(nil)); end
858
+
859
+ # Returns the fragment component of the URI.
860
+ #
861
+ # URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies"
862
+ #
863
+ # source://uri//uri/generic.rb#283
864
+ def fragment; end
865
+
866
+ # Checks the fragment +v+ component against the URI::Parser Regexp for :FRAGMENT.
867
+ #
868
+ #
869
+ # == Args
870
+ #
871
+ # +v+::
872
+ # String
873
+ #
874
+ # == Description
875
+ #
876
+ # Public setter for the fragment component +v+
877
+ # (with validation).
878
+ #
879
+ # == Usage
880
+ #
881
+ # require 'uri'
882
+ #
883
+ # uri = URI.parse("http://my.example.com/?id=25#time=1305212049")
884
+ # uri.fragment = "time=1305212086"
885
+ # uri.to_s #=> "http://my.example.com/?id=25#time=1305212086"
886
+ #
887
+ # source://uri//uri/generic.rb#929
888
+ def fragment=(v); end
889
+
890
+ # source://uri//uri/generic.rb#1392
891
+ def hash; end
892
+
893
+ # Returns true if URI is hierarchical.
894
+ #
895
+ # == Description
896
+ #
897
+ # URI has components listed in order of decreasing significance from left to right,
898
+ # see RFC3986 https://tools.ietf.org/html/rfc3986 1.2.3.
899
+ #
900
+ # == Usage
901
+ #
902
+ # require 'uri'
903
+ #
904
+ # uri = URI.parse("http://my.example.com/")
905
+ # uri.hierarchical?
906
+ # #=> true
907
+ # uri = URI.parse("mailto:joe@example.com")
908
+ # uri.hierarchical?
909
+ # #=> false
910
+ #
911
+ # @return [Boolean]
912
+ #
913
+ # source://uri//uri/generic.rb#961
914
+ def hierarchical?; end
915
+
916
+ # Returns the host component of the URI.
917
+ #
918
+ # URI("http://foo/bar/baz").host #=> "foo"
919
+ #
920
+ # It returns nil if no host component exists.
921
+ #
922
+ # URI("mailto:foo@example.org").host #=> nil
923
+ #
924
+ # The component does not contain the port number.
925
+ #
926
+ # URI("http://foo:8080/bar/baz").host #=> "foo"
927
+ #
928
+ # Since IPv6 addresses are wrapped with brackets in URIs,
929
+ # this method returns IPv6 addresses wrapped with brackets.
930
+ # This form is not appropriate to pass to socket methods such as TCPSocket.open.
931
+ # If unwrapped host names are required, use the #hostname method.
932
+ #
933
+ # URI("http://[::1]/bar/baz").host #=> "[::1]"
934
+ # URI("http://[::1]/bar/baz").hostname #=> "::1"
935
+ #
936
+ # source://uri//uri/generic.rb#243
937
+ def host; end
938
+
939
+ # == Args
940
+ #
941
+ # +v+::
942
+ # String
943
+ #
944
+ # == Description
945
+ #
946
+ # Public setter for the host component +v+
947
+ # (with validation).
948
+ #
949
+ # See also URI::Generic.check_host.
950
+ #
951
+ # == Usage
952
+ #
953
+ # require 'uri'
954
+ #
955
+ # uri = URI.parse("http://my.example.com")
956
+ # uri.host = "foo.com"
957
+ # uri.to_s #=> "http://foo.com"
958
+ #
959
+ # source://uri//uri/generic.rb#639
960
+ def host=(v); end
961
+
962
+ # Extract the host part of the URI and unwrap brackets for IPv6 addresses.
963
+ #
964
+ # This method is the same as URI::Generic#host except
965
+ # brackets for IPv6 (and future IP) addresses are removed.
966
+ #
967
+ # uri = URI("http://[::1]/bar")
968
+ # uri.hostname #=> "::1"
969
+ # uri.host #=> "[::1]"
970
+ #
971
+ # source://uri//uri/generic.rb#654
972
+ def hostname; end
973
+
974
+ # Sets the host part of the URI as the argument with brackets for IPv6 addresses.
975
+ #
976
+ # This method is the same as URI::Generic#host= except
977
+ # the argument can be a bare IPv6 address.
978
+ #
979
+ # uri = URI("http://foo/bar")
980
+ # uri.hostname = "::1"
981
+ # uri.to_s #=> "http://[::1]/bar"
982
+ #
983
+ # If the argument seems to be an IPv6 address,
984
+ # it is wrapped with brackets.
985
+ #
986
+ # source://uri//uri/generic.rb#671
987
+ def hostname=(v); end
988
+
989
+ # source://uri//uri/generic.rb#1451
990
+ def inspect; end
991
+
992
+ # == Args
993
+ #
994
+ # +oth+::
995
+ # URI or String
996
+ #
997
+ # == Description
998
+ #
999
+ # Merges two URIs.
1000
+ #
1001
+ # == Usage
1002
+ #
1003
+ # require 'uri'
1004
+ #
1005
+ # uri = URI.parse("http://my.example.com")
1006
+ # uri.merge("/main.rbx?page=1")
1007
+ # # => "http://my.example.com/main.rbx?page=1"
1008
+ #
1009
+ # source://uri//uri/generic.rb#1109
1010
+ def merge(oth); end
1011
+
1012
+ # == Args
1013
+ #
1014
+ # +oth+::
1015
+ # URI or String
1016
+ #
1017
+ # == Description
1018
+ #
1019
+ # Destructive form of #merge.
1020
+ #
1021
+ # == Usage
1022
+ #
1023
+ # require 'uri'
1024
+ #
1025
+ # uri = URI.parse("http://my.example.com")
1026
+ # uri.merge!("/main.rbx?page=1")
1027
+ # uri.to_s # => "http://my.example.com/main.rbx?page=1"
1028
+ #
1029
+ # source://uri//uri/generic.rb#1081
1030
+ def merge!(oth); end
1031
+
1032
+ # Returns normalized URI.
1033
+ #
1034
+ # require 'uri'
1035
+ #
1036
+ # URI("HTTP://my.EXAMPLE.com").normalize
1037
+ # #=> #<URI::HTTP http://my.example.com/>
1038
+ #
1039
+ # Normalization here means:
1040
+ #
1041
+ # * scheme and host are converted to lowercase,
1042
+ # * an empty path component is set to "/".
1043
+ #
1044
+ # source://uri//uri/generic.rb#1319
1045
+ def normalize; end
1046
+
1047
+ # Destructive version of #normalize.
1048
+ #
1049
+ # source://uri//uri/generic.rb#1328
1050
+ def normalize!; end
1051
+
1052
+ # Returns the opaque part of the URI.
1053
+ #
1054
+ # URI("mailto:foo@example.org").opaque #=> "foo@example.org"
1055
+ # URI("http://foo/bar/baz").opaque #=> nil
1056
+ #
1057
+ # The portion of the path that does not make use of the slash '/'.
1058
+ # The path typically refers to an absolute path or an opaque part.
1059
+ # (See RFC2396 Section 3 and 5.2.)
1060
+ #
1061
+ # source://uri//uri/generic.rb#277
1062
+ def opaque; end
1063
+
1064
+ # == Args
1065
+ #
1066
+ # +v+::
1067
+ # String
1068
+ #
1069
+ # == Description
1070
+ #
1071
+ # Public setter for the opaque component +v+
1072
+ # (with validation).
1073
+ #
1074
+ # See also URI::Generic.check_opaque.
1075
+ #
1076
+ # source://uri//uri/generic.rb#901
1077
+ def opaque=(v); end
1078
+
1079
+ # Returns the parser to be used.
1080
+ #
1081
+ # Unless a URI::Parser is defined, DEFAULT_PARSER is used.
1082
+ #
1083
+ # source://uri//uri/generic.rb#289
1084
+ def parser; end
1085
+
1086
+ # Returns the password component (without URI decoding).
1087
+ #
1088
+ # source://uri//uri/generic.rb#573
1089
+ def password; end
1090
+
1091
+ # == Args
1092
+ #
1093
+ # +v+::
1094
+ # String
1095
+ #
1096
+ # == Description
1097
+ #
1098
+ # Public setter for the +password+ component
1099
+ # (with validation).
1100
+ #
1101
+ # See also URI::Generic.check_password.
1102
+ #
1103
+ # == Usage
1104
+ #
1105
+ # require 'uri'
1106
+ #
1107
+ # uri = URI.parse("http://john:S3nsit1ve@my.example.com")
1108
+ # uri.password = "V3ry_S3nsit1ve"
1109
+ # uri.to_s #=> "http://john:V3ry_S3nsit1ve@my.example.com"
1110
+ #
1111
+ # source://uri//uri/generic.rb#498
1112
+ def password=(password); end
1113
+
1114
+ # Returns the path component of the URI.
1115
+ #
1116
+ # URI("http://foo/bar/baz").path #=> "/bar/baz"
1117
+ #
1118
+ # source://uri//uri/generic.rb#260
1119
+ def path; end
1120
+
1121
+ # == Args
1122
+ #
1123
+ # +v+::
1124
+ # String
1125
+ #
1126
+ # == Description
1127
+ #
1128
+ # Public setter for the path component +v+
1129
+ # (with validation).
1130
+ #
1131
+ # See also URI::Generic.check_path.
1132
+ #
1133
+ # == Usage
1134
+ #
1135
+ # require 'uri'
1136
+ #
1137
+ # uri = URI.parse("http://my.example.com/pub/files")
1138
+ # uri.path = "/faq/"
1139
+ # uri.to_s #=> "http://my.example.com/faq/"
1140
+ #
1141
+ # source://uri//uri/generic.rb#815
1142
+ def path=(v); end
1143
+
1144
+ # Returns the port component of the URI.
1145
+ #
1146
+ # URI("http://foo/bar/baz").port #=> 80
1147
+ # URI("http://foo:8080/bar/baz").port #=> 8080
1148
+ #
1149
+ # source://uri//uri/generic.rb#250
1150
+ def port; end
1151
+
1152
+ # == Args
1153
+ #
1154
+ # +v+::
1155
+ # String
1156
+ #
1157
+ # == Description
1158
+ #
1159
+ # Public setter for the port component +v+
1160
+ # (with validation).
1161
+ #
1162
+ # See also URI::Generic.check_port.
1163
+ #
1164
+ # == Usage
1165
+ #
1166
+ # require 'uri'
1167
+ #
1168
+ # uri = URI.parse("http://my.example.com")
1169
+ # uri.port = 8080
1170
+ # uri.to_s #=> "http://my.example.com:8080"
1171
+ #
1172
+ # source://uri//uri/generic.rb#729
1173
+ def port=(v); end
1174
+
1175
+ # Returns the query component of the URI.
1176
+ #
1177
+ # URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar"
1178
+ #
1179
+ # source://uri//uri/generic.rb#266
1180
+ def query; end
1181
+
1182
+ # == Args
1183
+ #
1184
+ # +v+::
1185
+ # String
1186
+ #
1187
+ # == Description
1188
+ #
1189
+ # Public setter for the query component +v+.
1190
+ #
1191
+ # == Usage
1192
+ #
1193
+ # require 'uri'
1194
+ #
1195
+ # uri = URI.parse("http://my.example.com/?id=25")
1196
+ # uri.query = "id=1"
1197
+ # uri.to_s #=> "http://my.example.com/?id=1"
1198
+ #
1199
+ # @raise [InvalidURIError]
1200
+ #
1201
+ # source://uri//uri/generic.rb#839
1202
+ def query=(v); end
1203
+
1204
+ # source://uri//uri/generic.rb#252
1205
+ def registry; end
1206
+
1207
+ # @raise [InvalidURIError]
1208
+ #
1209
+ # source://uri//uri/generic.rb#745
1210
+ def registry=(v); end
1211
+
1212
+ # Returns true if URI does not have a scheme (e.g. http:// or https://) specified.
1213
+ #
1214
+ # @return [Boolean]
1215
+ #
1216
+ # source://uri//uri/generic.rb#984
1217
+ def relative?; end
1218
+
1219
+ # == Args
1220
+ #
1221
+ # +oth+::
1222
+ # URI or String
1223
+ #
1224
+ # == Description
1225
+ #
1226
+ # Calculates relative path from oth to self.
1227
+ #
1228
+ # == Usage
1229
+ #
1230
+ # require 'uri'
1231
+ #
1232
+ # uri = URI.parse('http://my.example.com/main.rbx?page=1')
1233
+ # uri.route_from('http://my.example.com')
1234
+ # #=> #<URI::Generic /main.rbx?page=1>
1235
+ #
1236
+ # source://uri//uri/generic.rb#1262
1237
+ def route_from(oth); end
1238
+
1239
+ # == Args
1240
+ #
1241
+ # +oth+::
1242
+ # URI or String
1243
+ #
1244
+ # == Description
1245
+ #
1246
+ # Calculates relative path to oth from self.
1247
+ #
1248
+ # == Usage
1249
+ #
1250
+ # require 'uri'
1251
+ #
1252
+ # uri = URI.parse('http://my.example.com')
1253
+ # uri.route_to('http://my.example.com/main.rbx?page=1')
1254
+ # #=> #<URI::Generic /main.rbx?page=1>
1255
+ #
1256
+ # source://uri//uri/generic.rb#1302
1257
+ def route_to(oth); end
1258
+
1259
+ # Returns the scheme component of the URI.
1260
+ #
1261
+ # URI("http://foo/bar/baz").scheme #=> "http"
1262
+ #
1263
+ # source://uri//uri/generic.rb#221
1264
+ def scheme; end
1265
+
1266
+ # == Args
1267
+ #
1268
+ # +v+::
1269
+ # String
1270
+ #
1271
+ # == Description
1272
+ #
1273
+ # Public setter for the scheme component +v+
1274
+ # (with validation).
1275
+ #
1276
+ # See also URI::Generic.check_scheme.
1277
+ #
1278
+ # == Usage
1279
+ #
1280
+ # require 'uri'
1281
+ #
1282
+ # uri = URI.parse("http://my.example.com")
1283
+ # uri.scheme = "https"
1284
+ # uri.to_s #=> "https://my.example.com"
1285
+ #
1286
+ # source://uri//uri/generic.rb#360
1287
+ def scheme=(v); end
1288
+
1289
+ # == Args
1290
+ #
1291
+ # +components+::
1292
+ # Multiple Symbol arguments defined in URI::HTTP.
1293
+ #
1294
+ # == Description
1295
+ #
1296
+ # Selects specified components from URI.
1297
+ #
1298
+ # == Usage
1299
+ #
1300
+ # require 'uri'
1301
+ #
1302
+ # uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
1303
+ # uri.select(:userinfo, :host, :path)
1304
+ # # => ["myuser:mypass", "my.example.com", "/test.rbx"]
1305
+ #
1306
+ # source://uri//uri/generic.rb#1440
1307
+ def select(*components); end
1308
+
1309
+ # Constructs String from URI.
1310
+ #
1311
+ # source://uri//uri/generic.rb#1343
1312
+ def to_s; end
1313
+
1314
+ # Constructs String from URI.
1315
+ #
1316
+ # source://uri//uri/generic.rb#1343
1317
+ def to_str; end
1318
+
1319
+ # Returns the user component (without URI decoding).
1320
+ #
1321
+ # source://uri//uri/generic.rb#568
1322
+ def user; end
1323
+
1324
+ # == Args
1325
+ #
1326
+ # +v+::
1327
+ # String
1328
+ #
1329
+ # == Description
1330
+ #
1331
+ # Public setter for the +user+ component
1332
+ # (with validation).
1333
+ #
1334
+ # See also URI::Generic.check_user.
1335
+ #
1336
+ # == Usage
1337
+ #
1338
+ # require 'uri'
1339
+ #
1340
+ # uri = URI.parse("http://john:S3nsit1ve@my.example.com")
1341
+ # uri.user = "sam"
1342
+ # uri.to_s #=> "http://sam:V3ry_S3nsit1ve@my.example.com"
1343
+ #
1344
+ # source://uri//uri/generic.rb#471
1345
+ def user=(user); end
1346
+
1347
+ # Returns the userinfo, either as 'user' or 'user:password'.
1348
+ #
1349
+ # source://uri//uri/generic.rb#557
1350
+ def userinfo; end
1351
+
1352
+ # Sets userinfo, argument is string like 'name:pass'.
1353
+ #
1354
+ # source://uri//uri/generic.rb#441
1355
+ def userinfo=(userinfo); end
1356
+
1357
+ protected
1358
+
1359
+ # Returns an Array of the components defined from the COMPONENT Array.
1360
+ #
1361
+ # source://uri//uri/generic.rb#1416
1362
+ def component_ary; end
1363
+
1364
+ # Protected setter for the host component +v+.
1365
+ #
1366
+ # See also URI::Generic.host=.
1367
+ #
1368
+ # source://uri//uri/generic.rb#613
1369
+ def set_host(v); end
1370
+
1371
+ # Protected setter for the opaque component +v+.
1372
+ #
1373
+ # See also URI::Generic.opaque=.
1374
+ #
1375
+ # source://uri//uri/generic.rb#883
1376
+ def set_opaque(v); end
1377
+
1378
+ # Protected setter for the password component +v+.
1379
+ #
1380
+ # See also URI::Generic.password=.
1381
+ #
1382
+ # source://uri//uri/generic.rb#534
1383
+ def set_password(v); end
1384
+
1385
+ # Protected setter for the path component +v+.
1386
+ #
1387
+ # See also URI::Generic.path=.
1388
+ #
1389
+ # source://uri//uri/generic.rb#789
1390
+ def set_path(v); end
1391
+
1392
+ # Protected setter for the port component +v+.
1393
+ #
1394
+ # See also URI::Generic.port=.
1395
+ #
1396
+ # source://uri//uri/generic.rb#702
1397
+ def set_port(v); end
1398
+
1399
+ # @raise [InvalidURIError]
1400
+ #
1401
+ # source://uri//uri/generic.rb#740
1402
+ def set_registry(v); end
1403
+
1404
+ # Protected setter for the scheme component +v+.
1405
+ #
1406
+ # See also URI::Generic.scheme=.
1407
+ #
1408
+ # source://uri//uri/generic.rb#334
1409
+ def set_scheme(v); end
1410
+
1411
+ # Protected setter for the user component +v+.
1412
+ #
1413
+ # See also URI::Generic.user=.
1414
+ #
1415
+ # source://uri//uri/generic.rb#524
1416
+ def set_user(v); end
1417
+
1418
+ # Protected setter for the +user+ component, and +password+ if available
1419
+ # (with validation).
1420
+ #
1421
+ # See also URI::Generic.userinfo=.
1422
+ #
1423
+ # source://uri//uri/generic.rb#509
1424
+ def set_userinfo(user, password = T.unsafe(nil)); end
1425
+
1426
+ private
1427
+
1428
+ # Checks the host +v+ component for RFC2396 compliance
1429
+ # and against the URI::Parser Regexp for :HOST.
1430
+ #
1431
+ # Can not have a registry or opaque component defined,
1432
+ # with a host component defined.
1433
+ #
1434
+ # source://uri//uri/generic.rb#594
1435
+ def check_host(v); end
1436
+
1437
+ # Checks the opaque +v+ component for RFC2396 compliance and
1438
+ # against the URI::Parser Regexp for :OPAQUE.
1439
+ #
1440
+ # Can not have a host, port, user, or path component defined,
1441
+ # with an opaque component defined.
1442
+ #
1443
+ # source://uri//uri/generic.rb#861
1444
+ def check_opaque(v); end
1445
+
1446
+ # Checks the password +v+ component for RFC2396 compliance
1447
+ # and against the URI::Parser Regexp for :USERINFO.
1448
+ #
1449
+ # Can not have a registry or opaque component defined,
1450
+ # with a user component defined.
1451
+ #
1452
+ # source://uri//uri/generic.rb#417
1453
+ def check_password(v, user = T.unsafe(nil)); end
1454
+
1455
+ # Checks the path +v+ component for RFC2396 compliance
1456
+ # and against the URI::Parser Regexp
1457
+ # for :ABS_PATH and :REL_PATH.
1458
+ #
1459
+ # Can not have a opaque component defined,
1460
+ # with a path component defined.
1461
+ #
1462
+ # source://uri//uri/generic.rb#757
1463
+ def check_path(v); end
1464
+
1465
+ # Checks the port +v+ component for RFC2396 compliance
1466
+ # and against the URI::Parser Regexp for :PORT.
1467
+ #
1468
+ # Can not have a registry or opaque component defined,
1469
+ # with a port component defined.
1470
+ #
1471
+ # source://uri//uri/generic.rb#683
1472
+ def check_port(v); end
1473
+
1474
+ # @raise [InvalidURIError]
1475
+ #
1476
+ # source://uri//uri/generic.rb#735
1477
+ def check_registry(v); end
1478
+
1479
+ # Checks the scheme +v+ component against the URI::Parser Regexp for :SCHEME.
1480
+ #
1481
+ # source://uri//uri/generic.rb#320
1482
+ def check_scheme(v); end
1483
+
1484
+ # Checks the user +v+ component for RFC2396 compliance
1485
+ # and against the URI::Parser Regexp for :USERINFO.
1486
+ #
1487
+ # Can not have a registry or opaque component defined,
1488
+ # with a user component defined.
1489
+ #
1490
+ # source://uri//uri/generic.rb#393
1491
+ def check_user(v); end
1492
+
1493
+ # Checks the +user+ and +password+.
1494
+ #
1495
+ # If +password+ is not provided, then +user+ is
1496
+ # split, using URI::Generic.split_userinfo, to
1497
+ # pull +user+ and +password.
1498
+ #
1499
+ # See also URI::Generic.check_user, URI::Generic.check_password.
1500
+ #
1501
+ # source://uri//uri/generic.rb#375
1502
+ def check_userinfo(user, password = T.unsafe(nil)); end
1503
+
1504
+ # Escapes 'user:password' +v+ based on RFC 1738 section 3.1.
1505
+ #
1506
+ # source://uri//uri/generic.rb#551
1507
+ def escape_userpass(v); end
1508
+
1509
+ # Merges a base path +base+, with relative path +rel+,
1510
+ # returns a modified base path.
1511
+ #
1512
+ # source://uri//uri/generic.rb#1000
1513
+ def merge_path(base, rel); end
1514
+
1515
+ # Replaces self by other URI object.
1516
+ #
1517
+ # source://uri//uri/generic.rb#299
1518
+ def replace!(oth); end
1519
+
1520
+ # :stopdoc:
1521
+ #
1522
+ # source://uri//uri/generic.rb#1194
1523
+ def route_from0(oth); end
1524
+
1525
+ # :stopdoc:
1526
+ #
1527
+ # source://uri//uri/generic.rb#1155
1528
+ def route_from_path(src, dst); end
1529
+
1530
+ # Returns an Array of the path split on '/'.
1531
+ #
1532
+ # source://uri//uri/generic.rb#991
1533
+ def split_path(path); end
1534
+
1535
+ # Returns the userinfo +ui+ as <code>[user, password]</code>
1536
+ # if properly formatted as 'user:password'.
1537
+ #
1538
+ # source://uri//uri/generic.rb#542
1539
+ def split_userinfo(ui); end
1540
+
1541
+ class << self
1542
+ # == Synopsis
1543
+ #
1544
+ # See ::new.
1545
+ #
1546
+ # == Description
1547
+ #
1548
+ # Creates a new URI::Generic instance from components of URI::Generic
1549
+ # with check. Components are: scheme, userinfo, host, port, registry, path,
1550
+ # opaque, query, and fragment. You can provide arguments either by an Array or a Hash.
1551
+ # See ::new for hash keys to use or for order of array items.
1552
+ #
1553
+ # source://uri//uri/generic.rb#116
1554
+ def build(args); end
1555
+
1556
+ # == Synopsis
1557
+ #
1558
+ # See ::new.
1559
+ #
1560
+ # == Description
1561
+ #
1562
+ # At first, tries to create a new URI::Generic instance using
1563
+ # URI::Generic::build. But, if exception URI::InvalidComponentError is raised,
1564
+ # then it does URI::Escape.escape all URI components and tries again.
1565
+ #
1566
+ # source://uri//uri/generic.rb#78
1567
+ def build2(args); end
1568
+
1569
+ # Components of the URI in the order.
1570
+ #
1571
+ # source://uri//uri/generic.rb#57
1572
+ def component; end
1573
+
1574
+ # Returns default port.
1575
+ #
1576
+ # source://uri//uri/generic.rb#32
1577
+ def default_port; end
1578
+
1579
+ # @return [Boolean]
1580
+ #
1581
+ # source://uri//uri/generic.rb#1566
1582
+ def use_proxy?(hostname, addr, port, no_proxy); end
1583
+
1584
+ # source://uri//uri/generic.rb#63
1585
+ def use_registry; end
1586
+ end
1587
+ end
1588
+
1589
+ # The syntax of HTTP URIs is defined in RFC1738 section 3.3.
1590
+ #
1591
+ # Note that the Ruby URI library allows HTTP URLs containing usernames and
1592
+ # passwords. This is not legal as per the RFC, but used to be
1593
+ # supported in Internet Explorer 5 and 6, before the MS04-004 security
1594
+ # update. See <URL:http://support.microsoft.com/kb/834489>.
1595
+ class URI::HTTP < ::URI::Generic
1596
+ # == Description
1597
+ #
1598
+ # Returns the authority for an HTTP uri, as defined in
1599
+ # https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2.
1600
+ #
1601
+ #
1602
+ # Example:
1603
+ #
1604
+ # URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').authority #=> "www.example.com"
1605
+ # URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').authority #=> "www.example.com:8000"
1606
+ # URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').authority #=> "www.example.com"
1607
+ #
1608
+ # source://uri//uri/http.rb#97
1609
+ def authority; end
1610
+
1611
+ # == Description
1612
+ #
1613
+ # Returns the origin for an HTTP uri, as defined in
1614
+ # https://datatracker.ietf.org/doc/html/rfc6454.
1615
+ #
1616
+ #
1617
+ # Example:
1618
+ #
1619
+ # URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com"
1620
+ # URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000"
1621
+ # URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com"
1622
+ # URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com"
1623
+ #
1624
+ # source://uri//uri/http.rb#119
1625
+ def origin; end
1626
+
1627
+ # == Description
1628
+ #
1629
+ # Returns the full path for an HTTP request, as required by Net::HTTP::Get.
1630
+ #
1631
+ # If the URI contains a query, the full path is URI#path + '?' + URI#query.
1632
+ # Otherwise, the path is simply URI#path.
1633
+ #
1634
+ # Example:
1635
+ #
1636
+ # uri = URI::HTTP.build(path: '/foo/bar', query: 'test=true')
1637
+ # uri.request_uri # => "/foo/bar?test=true"
1638
+ #
1639
+ # source://uri//uri/http.rb#77
1640
+ def request_uri; end
1641
+
1642
+ class << self
1643
+ # == Description
1644
+ #
1645
+ # Creates a new URI::HTTP object from components, with syntax checking.
1646
+ #
1647
+ # The components accepted are userinfo, host, port, path, query, and
1648
+ # fragment.
1649
+ #
1650
+ # The components should be provided either as an Array, or as a Hash
1651
+ # with keys formed by preceding the component names with a colon.
1652
+ #
1653
+ # If an Array is used, the components must be passed in the
1654
+ # order <code>[userinfo, host, port, path, query, fragment]</code>.
1655
+ #
1656
+ # Example:
1657
+ #
1658
+ # uri = URI::HTTP.build(host: 'www.example.com', path: '/foo/bar')
1659
+ #
1660
+ # uri = URI::HTTP.build([nil, "www.example.com", nil, "/path",
1661
+ # "query", 'fragment'])
1662
+ #
1663
+ # Currently, if passed userinfo components this method generates
1664
+ # invalid HTTP URIs as per RFC 1738.
1665
+ #
1666
+ # source://uri//uri/http.rb#59
1667
+ def build(args); end
1668
+ end
1669
+ end
1670
+
1671
+ # source://uri//uri/common.rb#103
1672
+ URI::INITIAL_SCHEMES = T.let(T.unsafe(nil), Hash)
1673
+
1674
+ # LDAP URI SCHEMA (described in RFC2255).
1675
+ # --
1676
+ # ldap://<host>/<dn>[?<attrs>[?<scope>[?<filter>[?<extensions>]]]]
1677
+ # ++
1678
+ class URI::LDAP < ::URI::Generic
1679
+ # == Description
1680
+ #
1681
+ # Creates a new URI::LDAP object from generic URI components as per
1682
+ # RFC 2396. No LDAP-specific syntax checking is performed.
1683
+ #
1684
+ # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+,
1685
+ # +opaque+, +query+, and +fragment+, in that order.
1686
+ #
1687
+ # Example:
1688
+ #
1689
+ # uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil,
1690
+ # "/dc=example;dc=com", nil, "query", nil)
1691
+ #
1692
+ # See also URI::Generic.new.
1693
+ #
1694
+ # @return [LDAP] a new instance of LDAP
1695
+ #
1696
+ # source://uri//uri/ldap.rb#108
1697
+ def initialize(*arg); end
1698
+
1699
+ # Returns attributes.
1700
+ #
1701
+ # source://uri//uri/ldap.rb#178
1702
+ def attributes; end
1703
+
1704
+ # Setter for attributes +val+.
1705
+ #
1706
+ # source://uri//uri/ldap.rb#191
1707
+ def attributes=(val); end
1708
+
1709
+ # Returns dn.
1710
+ #
1711
+ # source://uri//uri/ldap.rb#159
1712
+ def dn; end
1713
+
1714
+ # Setter for dn +val+.
1715
+ #
1716
+ # source://uri//uri/ldap.rb#172
1717
+ def dn=(val); end
1718
+
1719
+ # Returns extensions.
1720
+ #
1721
+ # source://uri//uri/ldap.rb#235
1722
+ def extensions; end
1723
+
1724
+ # Setter for extensions +val+.
1725
+ #
1726
+ # source://uri//uri/ldap.rb#248
1727
+ def extensions=(val); end
1728
+
1729
+ # Returns filter.
1730
+ #
1731
+ # source://uri//uri/ldap.rb#216
1732
+ def filter; end
1733
+
1734
+ # Setter for filter +val+.
1735
+ #
1736
+ # source://uri//uri/ldap.rb#229
1737
+ def filter=(val); end
1738
+
1739
+ # Checks if URI has a path.
1740
+ # For URI::LDAP this will return +false+.
1741
+ #
1742
+ # @return [Boolean]
1743
+ #
1744
+ # source://uri//uri/ldap.rb#255
1745
+ def hierarchical?; end
1746
+
1747
+ # Returns scope.
1748
+ #
1749
+ # source://uri//uri/ldap.rb#197
1750
+ def scope; end
1751
+
1752
+ # Setter for scope +val+.
1753
+ #
1754
+ # source://uri//uri/ldap.rb#210
1755
+ def scope=(val); end
1756
+
1757
+ protected
1758
+
1759
+ # Private setter for attributes +val+.
1760
+ #
1761
+ # source://uri//uri/ldap.rb#183
1762
+ def set_attributes(val); end
1763
+
1764
+ # Private setter for dn +val+.
1765
+ #
1766
+ # source://uri//uri/ldap.rb#164
1767
+ def set_dn(val); end
1768
+
1769
+ # Private setter for extensions +val+.
1770
+ #
1771
+ # source://uri//uri/ldap.rb#240
1772
+ def set_extensions(val); end
1773
+
1774
+ # Private setter for filter +val+.
1775
+ #
1776
+ # source://uri//uri/ldap.rb#221
1777
+ def set_filter(val); end
1778
+
1779
+ # Private setter for scope +val+.
1780
+ #
1781
+ # source://uri//uri/ldap.rb#202
1782
+ def set_scope(val); end
1783
+
1784
+ private
1785
+
1786
+ # Private method to assemble +query+ from +attributes+, +scope+, +filter+, and +extensions+.
1787
+ #
1788
+ # source://uri//uri/ldap.rb#146
1789
+ def build_path_query; end
1790
+
1791
+ # Private method to cleanup +dn+ from using the +path+ component attribute.
1792
+ #
1793
+ # @raise [InvalidURIError]
1794
+ #
1795
+ # source://uri//uri/ldap.rb#120
1796
+ def parse_dn; end
1797
+
1798
+ # Private method to cleanup +attributes+, +scope+, +filter+, and +extensions+
1799
+ # from using the +query+ component attribute.
1800
+ #
1801
+ # source://uri//uri/ldap.rb#128
1802
+ def parse_query; end
1803
+
1804
+ class << self
1805
+ # == Description
1806
+ #
1807
+ # Creates a new URI::LDAP object from components, with syntax checking.
1808
+ #
1809
+ # The components accepted are host, port, dn, attributes,
1810
+ # scope, filter, and extensions.
1811
+ #
1812
+ # The components should be provided either as an Array, or as a Hash
1813
+ # with keys formed by preceding the component names with a colon.
1814
+ #
1815
+ # If an Array is used, the components must be passed in the
1816
+ # order <code>[host, port, dn, attributes, scope, filter, extensions]</code>.
1817
+ #
1818
+ # Example:
1819
+ #
1820
+ # uri = URI::LDAP.build({:host => 'ldap.example.com',
1821
+ # :dn => '/dc=example'})
1822
+ #
1823
+ # uri = URI::LDAP.build(["ldap.example.com", nil,
1824
+ # "/dc=example;dc=com", "query", nil, nil, nil])
1825
+ #
1826
+ # source://uri//uri/ldap.rb#74
1827
+ def build(args); end
1828
+ end
1829
+ end
1830
+
1831
+ # RFC6068, the mailto URL scheme.
1832
+ class URI::MailTo < ::URI::Generic
1833
+ # == Description
1834
+ #
1835
+ # Creates a new URI::MailTo object from generic URL components with
1836
+ # no syntax checking.
1837
+ #
1838
+ # This method is usually called from URI::parse, which checks
1839
+ # the validity of each component.
1840
+ #
1841
+ # @return [MailTo] a new instance of MailTo
1842
+ #
1843
+ # source://uri//uri/mailto.rb#132
1844
+ def initialize(*arg); end
1845
+
1846
+ # E-mail headers set by the URL, as an Array of Arrays.
1847
+ #
1848
+ # source://uri//uri/mailto.rb#166
1849
+ def headers; end
1850
+
1851
+ # Setter for headers +v+.
1852
+ #
1853
+ # source://uri//uri/mailto.rb#232
1854
+ def headers=(v); end
1855
+
1856
+ # The primary e-mail address of the URL, as a String.
1857
+ #
1858
+ # source://uri//uri/mailto.rb#163
1859
+ def to; end
1860
+
1861
+ # Setter for to +v+.
1862
+ #
1863
+ # source://uri//uri/mailto.rb#200
1864
+ def to=(v); end
1865
+
1866
+ # Returns the RFC822 e-mail text equivalent of the URL, as a String.
1867
+ #
1868
+ # Example:
1869
+ #
1870
+ # require 'uri'
1871
+ #
1872
+ # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr")
1873
+ # uri.to_mailtext
1874
+ # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n"
1875
+ #
1876
+ # source://uri//uri/mailto.rb#268
1877
+ def to_mailtext; end
1878
+
1879
+ # Returns the RFC822 e-mail text equivalent of the URL, as a String.
1880
+ #
1881
+ # Example:
1882
+ #
1883
+ # require 'uri'
1884
+ #
1885
+ # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr")
1886
+ # uri.to_mailtext
1887
+ # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n"
1888
+ #
1889
+ # source://uri//uri/mailto.rb#268
1890
+ def to_rfc822text; end
1891
+
1892
+ # Constructs String from URI.
1893
+ #
1894
+ # source://uri//uri/mailto.rb#239
1895
+ def to_s; end
1896
+
1897
+ protected
1898
+
1899
+ # Private setter for headers +v+.
1900
+ #
1901
+ # source://uri//uri/mailto.rb#221
1902
+ def set_headers(v); end
1903
+
1904
+ # Private setter for to +v+.
1905
+ #
1906
+ # source://uri//uri/mailto.rb#194
1907
+ def set_to(v); end
1908
+
1909
+ private
1910
+
1911
+ # Checks the headers +v+ component against either
1912
+ # * HEADER_REGEXP
1913
+ #
1914
+ # source://uri//uri/mailto.rb#208
1915
+ def check_headers(v); end
1916
+
1917
+ # Checks the to +v+ component.
1918
+ #
1919
+ # source://uri//uri/mailto.rb#169
1920
+ def check_to(v); end
1921
+
1922
+ class << self
1923
+ # == Description
1924
+ #
1925
+ # Creates a new URI::MailTo object from components, with syntax checking.
1926
+ #
1927
+ # Components can be provided as an Array or Hash. If an Array is used,
1928
+ # the components must be supplied as <code>[to, headers]</code>.
1929
+ #
1930
+ # If a Hash is used, the keys are the component names preceded by colons.
1931
+ #
1932
+ # The headers can be supplied as a pre-encoded string, such as
1933
+ # <code>"subject=subscribe&cc=address"</code>, or as an Array of Arrays
1934
+ # like <code>[['subject', 'subscribe'], ['cc', 'address']]</code>.
1935
+ #
1936
+ # Examples:
1937
+ #
1938
+ # require 'uri'
1939
+ #
1940
+ # m1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby'])
1941
+ # m1.to_s # => "mailto:joe@example.com?subject=Ruby"
1942
+ #
1943
+ # m2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]])
1944
+ # m2.to_s # => "mailto:john@example.com?Subject=Ruby&Cc=jack@example.com"
1945
+ #
1946
+ # m3 = URI::MailTo.build({:to => 'listman@example.com', :headers => [['subject', 'subscribe']]})
1947
+ # m3.to_s # => "mailto:listman@example.com?subject=subscribe"
1948
+ #
1949
+ # source://uri//uri/mailto.rb#85
1950
+ def build(args); end
1951
+ end
1952
+ end
1953
+
1954
+ # Class that parses String's into URI's.
1955
+ #
1956
+ # It contains a Hash set of patterns and Regexp's that match and validate.
1957
+ class URI::RFC2396_Parser
1958
+ include ::URI::RFC2396_REGEXP
1959
+
1960
+ # == Synopsis
1961
+ #
1962
+ # URI::Parser.new([opts])
1963
+ #
1964
+ # == Args
1965
+ #
1966
+ # The constructor accepts a hash as options for parser.
1967
+ # Keys of options are pattern names of URI components
1968
+ # and values of options are pattern strings.
1969
+ # The constructor generates set of regexps for parsing URIs.
1970
+ #
1971
+ # You can use the following keys:
1972
+ #
1973
+ # * :ESCAPED (URI::PATTERN::ESCAPED in default)
1974
+ # * :UNRESERVED (URI::PATTERN::UNRESERVED in default)
1975
+ # * :DOMLABEL (URI::PATTERN::DOMLABEL in default)
1976
+ # * :TOPLABEL (URI::PATTERN::TOPLABEL in default)
1977
+ # * :HOSTNAME (URI::PATTERN::HOSTNAME in default)
1978
+ #
1979
+ # == Examples
1980
+ #
1981
+ # p = URI::Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})")
1982
+ # u = p.parse("http://example.jp/%uABCD") #=> #<URI::HTTP http://example.jp/%uABCD>
1983
+ # URI.parse(u.to_s) #=> raises URI::InvalidURIError
1984
+ #
1985
+ # s = "http://example.com/ABCD"
1986
+ # u1 = p.parse(s) #=> #<URI::HTTP http://example.com/ABCD>
1987
+ # u2 = URI.parse(s) #=> #<URI::HTTP http://example.com/ABCD>
1988
+ # u1 == u2 #=> true
1989
+ # u1.eql?(u2) #=> false
1990
+ #
1991
+ # @return [RFC2396_Parser] a new instance of RFC2396_Parser
1992
+ #
1993
+ # source://uri//uri/rfc2396_parser.rb#99
1994
+ def initialize(opts = T.unsafe(nil)); end
1995
+
1996
+ # :call-seq:
1997
+ # escape( str )
1998
+ # escape( str, unsafe )
1999
+ #
2000
+ # == Args
2001
+ #
2002
+ # +str+::
2003
+ # String to make safe
2004
+ # +unsafe+::
2005
+ # Regexp to apply. Defaults to +self.regexp[:UNSAFE]+
2006
+ #
2007
+ # == Description
2008
+ #
2009
+ # Constructs a safe String from +str+, removing unsafe characters,
2010
+ # replacing them with codes.
2011
+ #
2012
+ # source://uri//uri/rfc2396_parser.rb#287
2013
+ def escape(str, unsafe = T.unsafe(nil)); end
2014
+
2015
+ # :call-seq:
2016
+ # extract( str )
2017
+ # extract( str, schemes )
2018
+ # extract( str, schemes ) {|item| block }
2019
+ #
2020
+ # == Args
2021
+ #
2022
+ # +str+::
2023
+ # String to search
2024
+ # +schemes+::
2025
+ # Patterns to apply to +str+
2026
+ #
2027
+ # == Description
2028
+ #
2029
+ # Attempts to parse and merge a set of URIs.
2030
+ # If no +block+ given, then returns the result,
2031
+ # else it calls +block+ for each element in result.
2032
+ #
2033
+ # See also URI::Parser.make_regexp.
2034
+ #
2035
+ # source://uri//uri/rfc2396_parser.rb#249
2036
+ def extract(str, schemes = T.unsafe(nil)); end
2037
+
2038
+ # source://uri//uri/rfc2396_parser.rb#326
2039
+ def inspect; end
2040
+
2041
+ # == Args
2042
+ #
2043
+ # +uris+::
2044
+ # an Array of Strings
2045
+ #
2046
+ # == Description
2047
+ #
2048
+ # Attempts to parse and merge a set of URIs.
2049
+ #
2050
+ # source://uri//uri/rfc2396_parser.rb#223
2051
+ def join(*uris); end
2052
+
2053
+ # Returns Regexp that is default +self.regexp[:ABS_URI_REF]+,
2054
+ # unless +schemes+ is provided. Then it is a Regexp.union with +self.pattern[:X_ABS_URI]+.
2055
+ #
2056
+ # source://uri//uri/rfc2396_parser.rb#262
2057
+ def make_regexp(schemes = T.unsafe(nil)); end
2058
+
2059
+ # == Args
2060
+ #
2061
+ # +uri+::
2062
+ # String
2063
+ #
2064
+ # == Description
2065
+ #
2066
+ # Parses +uri+ and constructs either matching URI scheme object
2067
+ # (File, FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic.
2068
+ #
2069
+ # == Usage
2070
+ #
2071
+ # p = URI::Parser.new
2072
+ # p.parse("ldap://ldap.example.com/dc=example?user=john")
2073
+ # #=> #<URI::LDAP ldap://ldap.example.com/dc=example?user=john>
2074
+ #
2075
+ # source://uri//uri/rfc2396_parser.rb#209
2076
+ def parse(uri); end
2077
+
2078
+ # The Hash of patterns.
2079
+ #
2080
+ # See also URI::Parser.initialize_pattern.
2081
+ #
2082
+ # source://uri//uri/rfc2396_parser.rb#112
2083
+ def pattern; end
2084
+
2085
+ # The Hash of Regexp.
2086
+ #
2087
+ # See also URI::Parser.initialize_regexp.
2088
+ #
2089
+ # source://uri//uri/rfc2396_parser.rb#117
2090
+ def regexp; end
2091
+
2092
+ # Returns a split URI against +regexp[:ABS_URI]+.
2093
+ #
2094
+ # source://uri//uri/rfc2396_parser.rb#120
2095
+ def split(uri); end
2096
+
2097
+ # :call-seq:
2098
+ # unescape( str )
2099
+ # unescape( str, escaped )
2100
+ #
2101
+ # == Args
2102
+ #
2103
+ # +str+::
2104
+ # String to remove escapes from
2105
+ # +escaped+::
2106
+ # Regexp to apply. Defaults to +self.regexp[:ESCAPED]+
2107
+ #
2108
+ # == Description
2109
+ #
2110
+ # Removes escapes from +str+.
2111
+ #
2112
+ # source://uri//uri/rfc2396_parser.rb#318
2113
+ def unescape(str, escaped = T.unsafe(nil)); end
2114
+
2115
+ private
2116
+
2117
+ # source://uri//uri/rfc2396_parser.rb#527
2118
+ def convert_to_uri(uri); end
2119
+
2120
+ # Constructs the default Hash of patterns.
2121
+ #
2122
+ # source://uri//uri/rfc2396_parser.rb#338
2123
+ def initialize_pattern(opts = T.unsafe(nil)); end
2124
+
2125
+ # Constructs the default Hash of Regexp's.
2126
+ #
2127
+ # source://uri//uri/rfc2396_parser.rb#496
2128
+ def initialize_regexp(pattern); end
2129
+ end
2130
+
2131
+ class URI::RFC3986_Parser
2132
+ # @return [RFC3986_Parser] a new instance of RFC3986_Parser
2133
+ #
2134
+ # source://uri//uri/rfc3986_parser.rb#73
2135
+ def initialize; end
2136
+
2137
+ # source://uri//uri/rfc3986_parser.rb#146
2138
+ def inspect; end
2139
+
2140
+ # source://uri//uri/rfc3986_parser.rb#139
2141
+ def join(*uris); end
2142
+
2143
+ # source://uri//uri/rfc3986_parser.rb#134
2144
+ def parse(uri); end
2145
+
2146
+ # Returns the value of attribute regexp.
2147
+ #
2148
+ # source://uri//uri/rfc3986_parser.rb#71
2149
+ def regexp; end
2150
+
2151
+ # source://uri//uri/rfc3986_parser.rb#77
2152
+ def split(uri); end
2153
+
2154
+ private
2155
+
2156
+ # source://uri//uri/rfc3986_parser.rb#171
2157
+ def convert_to_uri(uri); end
2158
+
2159
+ # source://uri//uri/rfc3986_parser.rb#157
2160
+ def default_regexp; end
2161
+ end
2162
+
2163
+ # source://uri//uri/rfc3986_parser.rb#33
2164
+ URI::RFC3986_Parser::FRAGMENT = T.let(T.unsafe(nil), String)
2165
+
2166
+ # URI defined in RFC3986
2167
+ #
2168
+ # source://uri//uri/rfc3986_parser.rb#5
2169
+ URI::RFC3986_Parser::HOST = T.let(T.unsafe(nil), Regexp)
2170
+
2171
+ # source://uri//uri/rfc3986_parser.rb#54
2172
+ URI::RFC3986_Parser::RFC3986_relative_ref = T.let(T.unsafe(nil), Regexp)
2173
+
2174
+ # source://uri//uri/rfc3986_parser.rb#30
2175
+ URI::RFC3986_Parser::SCHEME = T.let(T.unsafe(nil), String)
2176
+
2177
+ # source://uri//uri/rfc3986_parser.rb#31
2178
+ URI::RFC3986_Parser::SEG = T.let(T.unsafe(nil), String)
2179
+
2180
+ # source://uri//uri/rfc3986_parser.rb#32
2181
+ URI::RFC3986_Parser::SEG_NC = T.let(T.unsafe(nil), String)
2182
+
2183
+ # source://uri//uri/rfc3986_parser.rb#28
2184
+ URI::RFC3986_Parser::USERINFO = T.let(T.unsafe(nil), Regexp)
2185
+
2186
+ module URI::Schemes; end
2187
+
2188
+ # source://uri//uri/common.rb#80
2189
+ URI::Schemes::FILE = URI::File
2190
+
2191
+ # source://uri//uri/common.rb#80
2192
+ URI::Schemes::FTP = URI::FTP
2193
+
2194
+ # source://uri//uri/common.rb#80
2195
+ URI::Schemes::HTTP = URI::HTTP
2196
+
2197
+ # source://uri//uri/common.rb#80
2198
+ URI::Schemes::HTTPS = URI::HTTPS
2199
+
2200
+ # source://uri//uri/common.rb#80
2201
+ URI::Schemes::LDAP = URI::LDAP
2202
+
2203
+ # source://uri//uri/common.rb#80
2204
+ URI::Schemes::LDAPS = URI::LDAPS
2205
+
2206
+ # source://uri//uri/common.rb#80
2207
+ URI::Schemes::MAILTO = URI::MailTo
2208
+
2209
+ # source://uri//uri/common.rb#80
2210
+ URI::Schemes::SOURCE = URI::Source
2211
+
2212
+ # source://uri//uri/common.rb#80
2213
+ URI::Schemes::WS = URI::WS
2214
+
2215
+ # source://uri//uri/common.rb#80
2216
+ URI::Schemes::WSS = URI::WSS
2217
+
2218
+ class URI::Source < ::URI::File
2219
+ # source://tapioca/0.11.14/lib/tapioca/helpers/source_uri.rb#58
2220
+ sig { params(v: T.nilable(::String)).returns(T::Boolean) }
2221
+ def check_host(v); end
2222
+
2223
+ # source://uri//uri/generic.rb#243
2224
+ def gem_name; end
2225
+
2226
+ # source://tapioca/0.11.14/lib/tapioca/helpers/source_uri.rb#25
2227
+ sig { returns(T.nilable(::String)) }
2228
+ def gem_version; end
2229
+
2230
+ # source://uri//uri/generic.rb#283
2231
+ def line_number; end
2232
+
2233
+ # source://tapioca/0.11.14/lib/tapioca/helpers/source_uri.rb#51
2234
+ sig { params(v: T.nilable(::String)).void }
2235
+ def set_path(v); end
2236
+
2237
+ # source://tapioca/0.11.14/lib/tapioca/helpers/source_uri.rb#70
2238
+ sig { returns(::String) }
2239
+ def to_s; end
2240
+
2241
+ class << self
2242
+ # source://tapioca/0.11.14/lib/tapioca/helpers/source_uri.rb#38
2243
+ sig do
2244
+ params(
2245
+ gem_name: ::String,
2246
+ gem_version: T.nilable(::String),
2247
+ path: ::String,
2248
+ line_number: T.nilable(::String)
2249
+ ).returns(::URI::Source)
2250
+ end
2251
+ def build(gem_name:, gem_version:, path:, line_number:); end
2252
+ end
2253
+ end
2254
+
2255
+ # source://uri//uri/common.rb#285
2256
+ URI::TBLENCURICOMP_ = T.let(T.unsafe(nil), Hash)
2257
+
2258
+ module URI::Util
2259
+ private
2260
+
2261
+ # source://uri//uri/common.rb#36
2262
+ def make_components_hash(klass, array_hash); end
2263
+
2264
+ class << self
2265
+ # source://uri//uri/common.rb#36
2266
+ def make_components_hash(klass, array_hash); end
2267
+ end
2268
+ end
2269
+
2270
+ # The syntax of WS URIs is defined in RFC6455 section 3.
2271
+ #
2272
+ # Note that the Ruby URI library allows WS URLs containing usernames and
2273
+ # passwords. This is not legal as per the RFC, but used to be
2274
+ # supported in Internet Explorer 5 and 6, before the MS04-004 security
2275
+ # update. See <URL:http://support.microsoft.com/kb/834489>.
2276
+ class URI::WS < ::URI::Generic
2277
+ # == Description
2278
+ #
2279
+ # Returns the full path for a WS URI, as required by Net::HTTP::Get.
2280
+ #
2281
+ # If the URI contains a query, the full path is URI#path + '?' + URI#query.
2282
+ # Otherwise, the path is simply URI#path.
2283
+ #
2284
+ # Example:
2285
+ #
2286
+ # uri = URI::WS.build(path: '/foo/bar', query: 'test=true')
2287
+ # uri.request_uri # => "/foo/bar?test=true"
2288
+ #
2289
+ # source://uri//uri/ws.rb#74
2290
+ def request_uri; end
2291
+
2292
+ class << self
2293
+ # == Description
2294
+ #
2295
+ # Creates a new URI::WS object from components, with syntax checking.
2296
+ #
2297
+ # The components accepted are userinfo, host, port, path, and query.
2298
+ #
2299
+ # The components should be provided either as an Array, or as a Hash
2300
+ # with keys formed by preceding the component names with a colon.
2301
+ #
2302
+ # If an Array is used, the components must be passed in the
2303
+ # order <code>[userinfo, host, port, path, query]</code>.
2304
+ #
2305
+ # Example:
2306
+ #
2307
+ # uri = URI::WS.build(host: 'www.example.com', path: '/foo/bar')
2308
+ #
2309
+ # uri = URI::WS.build([nil, "www.example.com", nil, "/path", "query"])
2310
+ #
2311
+ # Currently, if passed userinfo components this method generates
2312
+ # invalid WS URIs as per RFC 1738.
2313
+ #
2314
+ # source://uri//uri/ws.rb#56
2315
+ def build(args); end
2316
+ end
2317
+ end
2318
+
2319
+ # The default port for WSS URIs is 443, and the scheme is 'wss:' rather
2320
+ # than 'ws:'. Other than that, WSS URIs are identical to WS URIs;
2321
+ # see URI::WS.
2322
+ class URI::WSS < ::URI::WS; end
2323
+
2324
+ # A Default port of 443 for URI::WSS
2325
+ #
2326
+ # source://uri//uri/wss.rb#19
2327
+ URI::WSS::DEFAULT_PORT = T.let(T.unsafe(nil), Integer)