rbs 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +5 -0
  3. data/CHANGELOG.md +23 -0
  4. data/README.md +6 -1
  5. data/core/array.rbs +2866 -1086
  6. data/core/basic_object.rbs +150 -30
  7. data/core/binding.rbs +33 -0
  8. data/core/builtin.rbs +4 -4
  9. data/core/class.rbs +43 -5
  10. data/core/comparable.rbs +57 -0
  11. data/core/complex.rbs +170 -4
  12. data/core/constants.rbs +51 -0
  13. data/core/deprecated.rbs +7 -0
  14. data/core/dir.rbs +305 -20
  15. data/core/encoding.rbs +472 -77
  16. data/core/enumerable.rbs +2173 -234
  17. data/core/enumerator.rbs +448 -182
  18. data/core/env.rbs +448 -1
  19. data/core/errno.rbs +1 -10
  20. data/core/errors.rbs +152 -2
  21. data/core/exception.rbs +201 -127
  22. data/core/false_class.rbs +27 -0
  23. data/core/fiber.rbs +118 -37
  24. data/core/fiber_error.rbs +8 -9
  25. data/core/file.rbs +1059 -139
  26. data/core/file_test.rbs +287 -32
  27. data/core/float.rbs +776 -300
  28. data/core/gc.rbs +185 -34
  29. data/core/global_variables.rbs +5 -1
  30. data/core/hash.rbs +1582 -649
  31. data/core/integer.rbs +974 -204
  32. data/core/io/buffer.rbs +710 -0
  33. data/core/io/wait.rbs +29 -8
  34. data/core/io.rbs +2438 -417
  35. data/core/kernel.rbs +2315 -316
  36. data/core/marshal.rbs +37 -2
  37. data/core/match_data.rbs +123 -6
  38. data/core/math.rbs +126 -6
  39. data/core/method.rbs +226 -102
  40. data/core/module.rbs +421 -45
  41. data/core/nil_class.rbs +64 -0
  42. data/core/numeric.rbs +620 -142
  43. data/core/object.rbs +453 -81
  44. data/core/object_space.rbs +92 -2
  45. data/core/proc.rbs +482 -285
  46. data/core/process.rbs +443 -34
  47. data/core/ractor.rbs +232 -9
  48. data/core/random.rbs +151 -52
  49. data/core/range.rbs +885 -160
  50. data/core/rational.rbs +122 -6
  51. data/core/rb_config.rbs +14 -4
  52. data/core/refinement.rbs +44 -0
  53. data/core/regexp.rbs +156 -14
  54. data/core/ruby_vm.rbs +42 -3
  55. data/core/signal.rbs +78 -39
  56. data/core/string.rbs +2123 -567
  57. data/core/string_io.rbs +204 -0
  58. data/core/struct.rbs +283 -28
  59. data/core/symbol.rbs +304 -30
  60. data/core/thread.rbs +1288 -688
  61. data/core/thread_group.rbs +66 -10
  62. data/core/time.rbs +643 -217
  63. data/core/trace_point.rbs +100 -12
  64. data/core/true_class.rbs +24 -0
  65. data/core/unbound_method.rbs +73 -7
  66. data/core/warning.rbs +37 -12
  67. data/docs/CONTRIBUTING.md +40 -34
  68. data/docs/stdlib.md +3 -102
  69. data/lib/rbs/annotate/annotations.rb +197 -0
  70. data/lib/rbs/annotate/formatter.rb +80 -0
  71. data/lib/rbs/annotate/rdoc_annotator.rb +398 -0
  72. data/lib/rbs/annotate/rdoc_source.rb +120 -0
  73. data/lib/rbs/annotate.rb +6 -0
  74. data/lib/rbs/cli.rb +45 -1
  75. data/lib/rbs/definition_builder.rb +5 -1
  76. data/lib/rbs/location_aux.rb +12 -0
  77. data/lib/rbs/prototype/rb.rb +12 -0
  78. data/lib/rbs/version.rb +1 -1
  79. data/sig/annotate/annotations.rbs +102 -0
  80. data/sig/annotate/formatter.rbs +24 -0
  81. data/sig/annotate/rdoc_annotater.rbs +82 -0
  82. data/sig/annotate/rdoc_source.rbs +30 -0
  83. data/sig/cli.rbs +2 -0
  84. data/sig/collection/{collections.rbs → sources.rbs} +0 -0
  85. data/sig/location.rbs +6 -0
  86. data/sig/method_types.rbs +5 -1
  87. data/sig/polyfill.rbs +78 -0
  88. data/stdlib/abbrev/0/abbrev.rbs +6 -0
  89. data/stdlib/abbrev/0/array.rbs +26 -0
  90. data/stdlib/base64/0/base64.rbs +31 -0
  91. data/stdlib/benchmark/0/benchmark.rbs +74 -3
  92. data/stdlib/bigdecimal/0/big_decimal.rbs +614 -165
  93. data/stdlib/bigdecimal-math/0/big_math.rbs +41 -64
  94. data/stdlib/cgi/0/core.rbs +59 -0
  95. data/stdlib/coverage/0/coverage.rbs +164 -2
  96. data/stdlib/csv/0/csv.rbs +2862 -398
  97. data/stdlib/date/0/date.rbs +483 -25
  98. data/stdlib/date/0/date_time.rbs +187 -12
  99. data/stdlib/dbm/0/dbm.rbs +152 -17
  100. data/stdlib/digest/0/digest.rbs +146 -0
  101. data/stdlib/erb/0/erb.rbs +65 -245
  102. data/stdlib/fiber/0/fiber.rbs +73 -91
  103. data/stdlib/fileutils/0/fileutils.rbs +301 -1
  104. data/stdlib/find/0/find.rbs +9 -0
  105. data/stdlib/forwardable/0/forwardable.rbs +65 -1
  106. data/stdlib/io-console/0/io-console.rbs +227 -15
  107. data/stdlib/ipaddr/0/ipaddr.rbs +161 -0
  108. data/stdlib/json/0/json.rbs +1146 -144
  109. data/stdlib/logger/0/formatter.rbs +24 -0
  110. data/stdlib/logger/0/log_device.rbs +64 -0
  111. data/stdlib/logger/0/logger.rbs +165 -13
  112. data/stdlib/logger/0/period.rbs +10 -0
  113. data/stdlib/logger/0/severity.rbs +26 -0
  114. data/stdlib/monitor/0/monitor.rbs +163 -0
  115. data/stdlib/mutex_m/0/mutex_m.rbs +35 -6
  116. data/stdlib/net-http/0/net-http.rbs +1492 -683
  117. data/stdlib/nkf/0/nkf.rbs +372 -0
  118. data/stdlib/objspace/0/objspace.rbs +149 -90
  119. data/stdlib/openssl/0/openssl.rbs +8108 -71
  120. data/stdlib/optparse/0/optparse.rbs +487 -19
  121. data/stdlib/pathname/0/pathname.rbs +425 -124
  122. data/stdlib/prettyprint/0/prettyprint.rbs +120 -99
  123. data/stdlib/prime/0/integer-extension.rbs +20 -2
  124. data/stdlib/prime/0/prime.rbs +88 -21
  125. data/stdlib/pstore/0/pstore.rbs +102 -0
  126. data/stdlib/pty/0/pty.rbs +64 -14
  127. data/stdlib/resolv/0/resolv.rbs +420 -31
  128. data/stdlib/rubygems/0/basic_specification.rbs +4 -1
  129. data/stdlib/rubygems/0/config_file.rbs +33 -1
  130. data/stdlib/rubygems/0/dependency_installer.rbs +4 -3
  131. data/stdlib/rubygems/0/installer.rbs +13 -1
  132. data/stdlib/rubygems/0/path_support.rbs +4 -1
  133. data/stdlib/rubygems/0/platform.rbs +5 -1
  134. data/stdlib/rubygems/0/request_set.rbs +44 -2
  135. data/stdlib/rubygems/0/requirement.rbs +65 -2
  136. data/stdlib/rubygems/0/rubygems.rbs +407 -0
  137. data/stdlib/rubygems/0/source_list.rbs +13 -0
  138. data/stdlib/rubygems/0/specification.rbs +21 -1
  139. data/stdlib/rubygems/0/stream_ui.rbs +3 -1
  140. data/stdlib/rubygems/0/uninstaller.rbs +8 -1
  141. data/stdlib/rubygems/0/version.rbs +60 -157
  142. data/stdlib/securerandom/0/securerandom.rbs +44 -0
  143. data/stdlib/set/0/set.rbs +420 -106
  144. data/stdlib/shellwords/0/shellwords.rbs +55 -77
  145. data/stdlib/singleton/0/singleton.rbs +20 -0
  146. data/stdlib/socket/0/addrinfo.rbs +210 -9
  147. data/stdlib/socket/0/basic_socket.rbs +103 -11
  148. data/stdlib/socket/0/ip_socket.rbs +31 -9
  149. data/stdlib/socket/0/socket.rbs +586 -38
  150. data/stdlib/socket/0/tcp_server.rbs +22 -2
  151. data/stdlib/socket/0/tcp_socket.rbs +12 -1
  152. data/stdlib/socket/0/udp_socket.rbs +25 -2
  153. data/stdlib/socket/0/unix_server.rbs +22 -2
  154. data/stdlib/socket/0/unix_socket.rbs +45 -5
  155. data/stdlib/strscan/0/string_scanner.rbs +210 -9
  156. data/stdlib/tempfile/0/tempfile.rbs +58 -10
  157. data/stdlib/time/0/time.rbs +208 -116
  158. data/stdlib/timeout/0/timeout.rbs +10 -0
  159. data/stdlib/tmpdir/0/tmpdir.rbs +13 -4
  160. data/stdlib/tsort/0/cyclic.rbs +1 -0
  161. data/stdlib/tsort/0/interfaces.rbs +1 -0
  162. data/stdlib/tsort/0/tsort.rbs +42 -0
  163. data/stdlib/uri/0/common.rbs +57 -8
  164. data/stdlib/uri/0/file.rbs +55 -109
  165. data/stdlib/uri/0/ftp.rbs +6 -3
  166. data/stdlib/uri/0/generic.rbs +556 -327
  167. data/stdlib/uri/0/http.rbs +26 -115
  168. data/stdlib/uri/0/https.rbs +8 -102
  169. data/stdlib/uri/0/ldap.rbs +143 -137
  170. data/stdlib/uri/0/ldaps.rbs +8 -102
  171. data/stdlib/uri/0/mailto.rbs +3 -0
  172. data/stdlib/uri/0/rfc2396_parser.rbs +66 -26
  173. data/stdlib/uri/0/ws.rbs +6 -3
  174. data/stdlib/uri/0/wss.rbs +5 -3
  175. data/stdlib/yaml/0/dbm.rbs +151 -87
  176. data/stdlib/yaml/0/store.rbs +6 -0
  177. data/stdlib/zlib/0/zlib.rbs +90 -31
  178. metadata +17 -5
  179. data/lib/rbs/location.rb +0 -221
@@ -1,8 +1,4 @@
1
- #
2
- #
3
- # Windows NT
4
- #
5
- #
1
+ # <!-- rdoc-file=lib/resolv.rb -->
6
2
  # Resolv is a thread-aware DNS resolver library written in Ruby. Resolv can
7
3
  # handle multiple DNS requests concurrently without blocking the entire Ruby
8
4
  # interpreter.
@@ -28,71 +24,128 @@
28
24
  # * NIS is not supported.
29
25
  # * /etc/nsswitch.conf is not supported.
30
26
  #
27
+ %a{annotate:rdoc:source:from=lib/resolv.rb}
31
28
  class Resolv
32
-
29
+ # <!--
30
+ # rdoc-file=lib/resolv.rb
31
+ # - each_address(name, &block)
32
+ # -->
33
33
  # Iterates over all IP addresses for `name`.
34
34
  #
35
35
  def self.each_address: (String name) { (String) -> void } -> void
36
36
 
37
+ # <!--
38
+ # rdoc-file=lib/resolv.rb
39
+ # - each_name(address, &proc)
40
+ # -->
37
41
  # Iterates over all hostnames for `address`.
38
42
  #
39
43
  def self.each_name: (String address) { (String) -> void } -> void
40
44
 
45
+ # <!--
46
+ # rdoc-file=lib/resolv.rb
47
+ # - getaddress(name)
48
+ # -->
41
49
  # Looks up the first IP address for `name`.
42
50
  #
43
51
  def self.getaddress: (String name) -> String
44
52
 
53
+ # <!--
54
+ # rdoc-file=lib/resolv.rb
55
+ # - getaddresses(name)
56
+ # -->
45
57
  # Looks up all IP address for `name`.
46
58
  #
47
59
  def self.getaddresses: (String name) -> Array[String]
48
60
 
61
+ # <!--
62
+ # rdoc-file=lib/resolv.rb
63
+ # - getname(address)
64
+ # -->
49
65
  # Looks up the hostname of `address`.
50
66
  #
51
67
  def self.getname: (String address) -> String
52
68
 
69
+ # <!--
70
+ # rdoc-file=lib/resolv.rb
71
+ # - getnames(address)
72
+ # -->
53
73
  # Looks up all hostnames for `address`.
54
74
  #
55
75
  def self.getnames: (String address) -> Array[String]
56
76
 
57
77
  public
58
78
 
79
+ # <!--
80
+ # rdoc-file=lib/resolv.rb
81
+ # - each_address(name) { |name| ... }
82
+ # -->
59
83
  # Iterates over all IP addresses for `name`.
60
84
  #
61
85
  def each_address: (String name) { (String) -> void } -> void
62
86
 
87
+ # <!--
88
+ # rdoc-file=lib/resolv.rb
89
+ # - each_name(address) { |name| ... }
90
+ # -->
63
91
  # Iterates over all hostnames for `address`.
64
92
  #
65
93
  def each_name: (String name) { (String) -> void } -> void
66
94
 
95
+ # <!--
96
+ # rdoc-file=lib/resolv.rb
97
+ # - getaddress(name)
98
+ # -->
67
99
  # Looks up the first IP address for `name`.
68
100
  #
69
101
  def getaddress: (String name) -> String
70
102
 
103
+ # <!--
104
+ # rdoc-file=lib/resolv.rb
105
+ # - getaddresses(name)
106
+ # -->
71
107
  # Looks up all IP address for `name`.
72
108
  #
73
109
  def getaddresses: (String name) -> Array[String]
74
110
 
111
+ # <!--
112
+ # rdoc-file=lib/resolv.rb
113
+ # - getname(address)
114
+ # -->
75
115
  # Looks up the hostname of `address`.
76
116
  #
77
117
  def getname: (String address) -> String
78
118
 
119
+ # <!--
120
+ # rdoc-file=lib/resolv.rb
121
+ # - getnames(address)
122
+ # -->
79
123
  # Looks up all hostnames for `address`.
80
124
  #
81
125
  def getnames: (String address) -> Array[String]
82
126
 
83
127
  private
84
128
 
129
+ # <!--
130
+ # rdoc-file=lib/resolv.rb
131
+ # - new(resolvers=[Hosts.new, DNS.new])
132
+ # -->
85
133
  # Creates a new Resolv using `resolvers`.
86
134
  #
87
- def initialize: (?(Resolv::Hosts | Resolv::DNS) resolvers) -> untyped
135
+ def initialize: (?Resolv::Hosts | Resolv::DNS resolvers) -> untyped
88
136
  end
89
137
 
138
+ # <!-- rdoc-file=lib/resolv.rb -->
90
139
  # Address Regexp to use for matching IP addresses.
140
+ #
91
141
  Resolv::AddressRegex: Regexp
92
142
 
143
+ # <!-- rdoc-file=lib/resolv.rb -->
93
144
  # Default resolver to use for Resolv class methods.
145
+ #
94
146
  Resolv::DefaultResolver: Resolv
95
147
 
148
+ # <!-- rdoc-file=lib/resolv.rb -->
96
149
  # Resolv::DNS is a DNS stub resolver.
97
150
  #
98
151
  # Information taken from the following places:
@@ -113,6 +166,10 @@ class Resolv::DNS
113
166
 
114
167
  def self.free_request_id: (String host, Integer port, Integer id) -> void
115
168
 
169
+ # <!--
170
+ # rdoc-file=lib/resolv.rb
171
+ # - open(*args) { |dns| ... }
172
+ # -->
116
173
  # Creates a new DNS resolver. See Resolv::DNS.new for argument details.
117
174
  #
118
175
  # Yields the created DNS resolver to the block, if given, otherwise returns it.
@@ -124,10 +181,18 @@ class Resolv::DNS
124
181
 
125
182
  public
126
183
 
184
+ # <!--
185
+ # rdoc-file=lib/resolv.rb
186
+ # - close()
187
+ # -->
127
188
  # Closes the DNS resolver.
128
189
  #
129
190
  def close: () -> untyped
130
191
 
192
+ # <!--
193
+ # rdoc-file=lib/resolv.rb
194
+ # - each_address(name) { |address| ... }
195
+ # -->
131
196
  # Iterates over all IP addresses for `name` retrieved from the DNS resolver.
132
197
  #
133
198
  # `name` can be a Resolv::DNS::Name or a String. Retrieved addresses will be a
@@ -135,6 +200,10 @@ class Resolv::DNS
135
200
  #
136
201
  def each_address: (dns_name name) { (ip_address) -> void } -> void
137
202
 
203
+ # <!--
204
+ # rdoc-file=lib/resolv.rb
205
+ # - each_name(address) { |name| ... }
206
+ # -->
138
207
  # Iterates over all hostnames for `address` retrieved from the DNS resolver.
139
208
  #
140
209
  # `address` must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved names
@@ -142,6 +211,10 @@ class Resolv::DNS
142
211
  #
143
212
  def each_name: (ip_address | dns_name address) { (Resolv::DNS::Name) -> void } -> void
144
213
 
214
+ # <!--
215
+ # rdoc-file=lib/resolv.rb
216
+ # - each_resource(name, typeclass, &proc)
217
+ # -->
145
218
  # Iterates over all `typeclass` DNS resources for `name`. See #getresource for
146
219
  # argument details.
147
220
  #
@@ -149,8 +222,17 @@ class Resolv::DNS
149
222
 
150
223
  def extract_resources: (Resolv::DNS::Message msg, dns_name name, singleton(Resolv::DNS::Query) typeclass) { (Resolv::DNS::Resource) -> void } -> void
151
224
 
225
+ # <!--
226
+ # rdoc-file=lib/resolv.rb
227
+ # - fetch_resource(name, typeclass) { |reply, reply_name| ... }
228
+ # -->
229
+ #
152
230
  def fetch_resource: (Resolv::DNS::Name name, singleton(Resolv::DNS::Query) typeclass) { (Resolv::DNS::Message, Resolv::DNS::Name) -> void } -> void
153
231
 
232
+ # <!--
233
+ # rdoc-file=lib/resolv.rb
234
+ # - getaddress(name)
235
+ # -->
154
236
  # Gets the IP address of `name` from the DNS resolver.
155
237
  #
156
238
  # `name` can be a Resolv::DNS::Name or a String. Retrieved address will be a
@@ -158,6 +240,10 @@ class Resolv::DNS
158
240
  #
159
241
  def getaddress: (dns_name name) -> ip_address
160
242
 
243
+ # <!--
244
+ # rdoc-file=lib/resolv.rb
245
+ # - getaddresses(name)
246
+ # -->
161
247
  # Gets all IP addresses for `name` from the DNS resolver.
162
248
  #
163
249
  # `name` can be a Resolv::DNS::Name or a String. Retrieved addresses will be a
@@ -165,6 +251,10 @@ class Resolv::DNS
165
251
  #
166
252
  def getaddresses: (dns_name name) -> Array[ip_address]
167
253
 
254
+ # <!--
255
+ # rdoc-file=lib/resolv.rb
256
+ # - getname(address)
257
+ # -->
168
258
  # Gets the hostname for `address` from the DNS resolver.
169
259
  #
170
260
  # `address` must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved name
@@ -172,6 +262,10 @@ class Resolv::DNS
172
262
  #
173
263
  def getname: (ip_address | dns_name address) -> Resolv::DNS::Name
174
264
 
265
+ # <!--
266
+ # rdoc-file=lib/resolv.rb
267
+ # - getnames(address)
268
+ # -->
175
269
  # Gets all hostnames for `address` from the DNS resolver.
176
270
  #
177
271
  # `address` must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved names
@@ -179,6 +273,10 @@ class Resolv::DNS
179
273
  #
180
274
  def getnames: (ip_address | dns_name address) -> Array[Resolv::DNS::Name]
181
275
 
276
+ # <!--
277
+ # rdoc-file=lib/resolv.rb
278
+ # - getresource(name, typeclass)
279
+ # -->
182
280
  # Look up the `typeclass` DNS resource of `name`.
183
281
  #
184
282
  # `name` must be a Resolv::DNS::Name or a String.
@@ -204,6 +302,10 @@ class Resolv::DNS
204
302
  #
205
303
  def getresource: (dns_name name, singleton(Resolv::DNS::Query) typeclass) -> Resolv::DNS::Resource
206
304
 
305
+ # <!--
306
+ # rdoc-file=lib/resolv.rb
307
+ # - getresources(name, typeclass)
308
+ # -->
207
309
  # Looks up all `typeclass` DNS resources for `name`. See #getresource for
208
310
  # argument details.
209
311
  #
@@ -215,6 +317,10 @@ class Resolv::DNS
215
317
 
216
318
  def make_udp_requester: () -> (Requester::ConnectedUDP | Requester::UnconnectedUDP)
217
319
 
320
+ # <!--
321
+ # rdoc-file=lib/resolv.rb
322
+ # - timeouts=(values)
323
+ # -->
218
324
  # Sets the resolver timeouts. This may be a single positive number or an array
219
325
  # of positive numbers representing timeouts in seconds. If an array is
220
326
  # specified, a DNS request will retry and wait for each successive interval in
@@ -225,11 +331,14 @@ class Resolv::DNS
225
331
  #
226
332
  # dns.timeouts = 3
227
333
  #
228
- #
229
334
  def timeouts=: (Integer | Float | Array[Integer | Float] values) -> void
230
335
 
231
336
  private
232
337
 
338
+ # <!--
339
+ # rdoc-file=lib/resolv.rb
340
+ # - new(config_info=nil)
341
+ # -->
233
342
  # Creates a new DNS resolver.
234
343
  #
235
344
  # `config_info` can be:
@@ -260,19 +369,23 @@ class Resolv::DNS
260
369
  # :search => ['ruby-lang.org'],
261
370
  # :ndots => 1)
262
371
  #
263
- def initialize: (?(String | Hash[Symbol, untyped]) config_info) -> untyped
372
+ def initialize: (?String | Hash[Symbol, untyped] config_info) -> untyped
264
373
 
265
374
  def use_ipv6?: () -> untyped
266
375
  end
267
376
 
377
+ # <!-- rdoc-file=lib/resolv.rb -->
268
378
  # Default DNS Port
379
+ #
269
380
  Resolv::DNS::Port: Integer
270
381
 
271
382
  Resolv::DNS::RequestID: Hash[untyped, untyped]
272
383
 
273
384
  Resolv::DNS::RequestIDMutex: Thread::Mutex
274
385
 
386
+ # <!-- rdoc-file=lib/resolv.rb -->
275
387
  # Default DNS UDP packet size
388
+ #
276
389
  Resolv::DNS::UDPSize: Integer
277
390
 
278
391
  class Resolv::DNS::Config
@@ -288,34 +401,42 @@ class Resolv::DNS::Config
288
401
 
289
402
  def lazy_initialize: () -> void
290
403
 
291
- def nameserver_port: () -> Array[[String, Integer]]
404
+ def nameserver_port: () -> Array[[ String, Integer ]]
292
405
 
293
406
  def resolv: (String name) { (Resolv::DNS::Name, Integer, String, Integer) -> void } -> void
294
407
 
295
- def single?: () -> [String, Integer]?
408
+ def single?: () -> [ String, Integer ]?
296
409
 
297
410
  def timeouts=: (Integer | Float | Array[Integer | Float] values) -> void
298
411
 
299
412
  private
300
413
 
301
- def initialize: (?(String | Hash[Symbol, untyped]) config_info) -> untyped
414
+ def initialize: (?String | Hash[Symbol, untyped] config_info) -> untyped
302
415
  end
303
416
 
304
417
  Resolv::DNS::Config::InitialTimeout: Integer
305
418
 
419
+ # <!-- rdoc-file=lib/resolv.rb -->
306
420
  # Indicates no such domain was found.
421
+ #
307
422
  class Resolv::DNS::Config::NXDomain < Resolv::ResolvError
308
423
  end
309
424
 
425
+ # <!-- rdoc-file=lib/resolv.rb -->
310
426
  # Indicates some other unhandled resolver error was encountered.
427
+ #
311
428
  class Resolv::DNS::Config::OtherResolvError < Resolv::ResolvError
312
429
  end
313
430
 
431
+ # <!-- rdoc-file=lib/resolv.rb -->
314
432
  # Indicates that the DNS response was unable to be decoded.
433
+ #
315
434
  class Resolv::DNS::DecodeError < StandardError
316
435
  end
317
436
 
437
+ # <!-- rdoc-file=lib/resolv.rb -->
318
438
  # Indicates that the DNS request was unable to be encoded.
439
+ #
319
440
  class Resolv::DNS::EncodeError < StandardError
320
441
  end
321
442
 
@@ -364,11 +485,11 @@ class Resolv::DNS::Message
364
485
 
365
486
  def add_question: (String name, singleton(Resolv::DNS::Query) typeclass) -> void
366
487
 
367
- def additional: () -> Array[[Resolv::DNS::Name, Integer, Resolv::DNS::Resource]]
488
+ def additional: () -> Array[[ Resolv::DNS::Name, Integer, Resolv::DNS::Resource ]]
368
489
 
369
- def answer: () -> Array[[Resolv::DNS::Name, Integer, Resolv::DNS::Resource]]
490
+ def answer: () -> Array[[ Resolv::DNS::Name, Integer, Resolv::DNS::Resource ]]
370
491
 
371
- def authority: () -> Array[[Resolv::DNS::Name, Integer, Resolv::DNS::Resource]]
492
+ def authority: () -> Array[[ Resolv::DNS::Name, Integer, Resolv::DNS::Resource ]]
372
493
 
373
494
  def each_additional: () { (Resolv::DNS::Name, Integer, Resolv::DNS::Resource) -> void } -> void
374
495
 
@@ -394,7 +515,7 @@ class Resolv::DNS::Message
394
515
 
395
516
  def qr=: (Integer) -> void
396
517
 
397
- def question: () -> Array[[Resolv::DNS::Name, singleton(Resolv::DNS::Resource)]]
518
+ def question: () -> Array[[ Resolv::DNS::Name, singleton(Resolv::DNS::Resource) ]]
398
519
 
399
520
  def ra: () -> Integer
400
521
 
@@ -432,7 +553,7 @@ class Resolv::DNS::Message::MessageDecoder
432
553
 
433
554
  def get_question: () -> Resolv::DNS::Query
434
555
 
435
- def get_rr: () -> [Resolv::DNS::Name, Integer, Resolv::DNS::Resource]
556
+ def get_rr: () -> [ Resolv::DNS::Name, Integer, Resolv::DNS::Resource ]
436
557
 
437
558
  def get_string: () -> String
438
559
 
@@ -473,8 +594,14 @@ class Resolv::DNS::Message::MessageEncoder
473
594
  def initialize: () -> untyped
474
595
  end
475
596
 
597
+ # <!-- rdoc-file=lib/resolv.rb -->
476
598
  # A representation of a DNS name.
599
+ #
477
600
  class Resolv::DNS::Name
601
+ # <!--
602
+ # rdoc-file=lib/resolv.rb
603
+ # - create(arg)
604
+ # -->
478
605
  # Creates a new DNS name from `arg`. `arg` can be:
479
606
  #
480
607
  # Name
@@ -482,7 +609,6 @@ class Resolv::DNS::Name
482
609
  # String
483
610
  # : Creates a new Name.
484
611
  #
485
- #
486
612
  def self.create: (Resolv::DNS::dns_name arg) -> untyped
487
613
 
488
614
  public
@@ -491,6 +617,10 @@ class Resolv::DNS::Name
491
617
 
492
618
  def []: (Integer i) -> Resolv::DNS::Label::Str?
493
619
 
620
+ # <!--
621
+ # rdoc-file=lib/resolv.rb
622
+ # - absolute?()
623
+ # -->
494
624
  # True if this name is absolute.
495
625
  #
496
626
  def absolute?: () -> bool
@@ -503,6 +633,10 @@ class Resolv::DNS::Name
503
633
 
504
634
  def length: () -> Integer
505
635
 
636
+ # <!--
637
+ # rdoc-file=lib/resolv.rb
638
+ # - subdomain_of?(other)
639
+ # -->
506
640
  # Returns true if `other` is a subdomain.
507
641
  #
508
642
  # Example:
@@ -519,6 +653,10 @@ class Resolv::DNS::Name
519
653
 
520
654
  def to_a: () -> Array[Resolv::DNS::Label::Str]
521
655
 
656
+ # <!--
657
+ # rdoc-file=lib/resolv.rb
658
+ # - to_s()
659
+ # -->
522
660
  # returns the domain name as a string.
523
661
  #
524
662
  # The domain name doesn't have a trailing dot even if the name object is
@@ -549,7 +687,9 @@ Resolv::DNS::OpCode::Status: Integer
549
687
 
550
688
  Resolv::DNS::OpCode::Update: Integer
551
689
 
690
+ # <!-- rdoc-file=lib/resolv.rb -->
552
691
  # A DNS query abstract class.
692
+ #
553
693
  class Resolv::DNS::Query
554
694
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
555
695
 
@@ -602,7 +742,7 @@ class Resolv::DNS::Requester
602
742
 
603
743
  def close: () -> void
604
744
 
605
- def request: (Resolv::DNS::Requester::Sender sender, Numeric tout) -> [Resolv::DNS::Message, String]
745
+ def request: (Resolv::DNS::Requester::Sender sender, Numeric tout) -> [ Resolv::DNS::Message, String ]
606
746
 
607
747
  def sender_for: (String addr, Resolv::DNS::Message msg) -> Resolv::DNS::Requester::Sender
608
748
 
@@ -618,7 +758,7 @@ class Resolv::DNS::Requester::ConnectedUDP < Resolv::DNS::Requester
618
758
 
619
759
  def lazy_initialize: () -> void
620
760
 
621
- def recv_reply: (Array[UDPSocket] readable_socks) -> [String, String]
761
+ def recv_reply: (Array[UDPSocket] readable_socks) -> [ String, String ]
622
762
 
623
763
  def sender: (Resolv::DNS::Message msg, String data, ?String host, ?Integer port) -> Resolv::DNS::Requester::Sender
624
764
 
@@ -640,10 +780,12 @@ class Resolv::DNS::Requester::MDNSOneShot < Resolv::DNS::Requester::UnconnectedU
640
780
 
641
781
  def sender: (Resolv::DNS::Message msg, String data, ?String host, ?Integer port) -> Resolv::DNS::Requester::Sender
642
782
 
643
- def recv_reply: (Array[UDPSocket] readable_socks) -> [String, String]
783
+ def recv_reply: (Array[UDPSocket] readable_socks) -> [ String, String ]
644
784
  end
645
785
 
786
+ # <!-- rdoc-file=lib/resolv.rb -->
646
787
  # Indicates a problem with the DNS request.
788
+ #
647
789
  class Resolv::DNS::Requester::RequestError < StandardError
648
790
  end
649
791
 
@@ -658,7 +800,7 @@ class Resolv::DNS::Requester::TCP < Resolv::DNS::Requester
658
800
 
659
801
  def close: () -> untyped
660
802
 
661
- def recv_reply: (Array[TCPSocket] readable_socks) -> [String, String]
803
+ def recv_reply: (Array[TCPSocket] readable_socks) -> [ String, String ]
662
804
 
663
805
  def sender: (Resolv::DNS::Message msg, String data, ?String host, ?Integer port) -> Resolv::DNS::Requester::Sender
664
806
 
@@ -682,13 +824,13 @@ class Resolv::DNS::Requester::UnconnectedUDP < Resolv::DNS::Requester
682
824
 
683
825
  def lazy_initialize: () -> void
684
826
 
685
- def recv_reply: (Array[UDPSocket] readable_socks) -> [String, String]
827
+ def recv_reply: (Array[UDPSocket] readable_socks) -> [ String, String ]
686
828
 
687
829
  def sender: (Resolv::DNS::Message msg, String data, ?String host, ?Integer port) -> Resolv::DNS::Requester::Sender
688
830
 
689
831
  private
690
832
 
691
- def initialize: (*[String, Integer] nameserver_port) -> untyped
833
+ def initialize: (*[ String, Integer ] nameserver_port) -> untyped
692
834
  end
693
835
 
694
836
  class Resolv::DNS::Requester::UnconnectedUDP::Sender < Resolv::DNS::Requester::Sender
@@ -703,7 +845,9 @@ class Resolv::DNS::Requester::UnconnectedUDP::Sender < Resolv::DNS::Requester::S
703
845
  def initialize: (Resolv::DNS::Message msg, String data, UDPSocket sock, String host, Integer port) -> untyped
704
846
  end
705
847
 
848
+ # <!-- rdoc-file=lib/resolv.rb -->
706
849
  # A DNS resource abstract class.
850
+ #
707
851
  class Resolv::DNS::Resource < Resolv::DNS::Query
708
852
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
709
853
 
@@ -719,30 +863,37 @@ class Resolv::DNS::Resource < Resolv::DNS::Query
719
863
 
720
864
  def hash: () -> Integer
721
865
 
866
+ # <!-- rdoc-file=lib/resolv.rb -->
722
867
  # Remaining Time To Live for this Resource.
723
868
  #
724
869
  def ttl: () -> Integer
725
870
  end
726
871
 
727
- Resolv::DNS::Resource::ClassHash: Hash[[Integer, Integer], singleton(Resolv::DNS::Resource)]
872
+ Resolv::DNS::Resource::ClassHash: Hash[[ Integer, Integer ], singleton(Resolv::DNS::Resource)]
728
873
 
729
874
  Resolv::DNS::Resource::ClassInsensitiveTypes: Array[singleton(Resolv::DNS::Resource)]
730
875
 
731
876
  Resolv::DNS::Resource::ClassValue: Integer?
732
877
 
878
+ # <!-- rdoc-file=lib/resolv.rb -->
733
879
  # A Query type requesting any RR.
880
+ #
734
881
  class Resolv::DNS::Resource::ANY < Resolv::DNS::Query
735
882
  end
736
883
 
737
884
  Resolv::DNS::Resource::ANY::TypeValue: Integer
738
885
 
886
+ # <!-- rdoc-file=lib/resolv.rb -->
739
887
  # The canonical name for an alias.
888
+ #
740
889
  class Resolv::DNS::Resource::CNAME < Resolv::DNS::Resource::DomainName
741
890
  end
742
891
 
743
892
  Resolv::DNS::Resource::CNAME::TypeValue: Integer
744
893
 
894
+ # <!-- rdoc-file=lib/resolv.rb -->
745
895
  # Domain Name resource abstract class.
896
+ #
746
897
  class Resolv::DNS::Resource::DomainName < Resolv::DNS::Resource
747
898
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
748
899
 
@@ -750,18 +901,25 @@ class Resolv::DNS::Resource::DomainName < Resolv::DNS::Resource
750
901
 
751
902
  def encode_rdata: (Resolv::DNS::Message::MessageEncoder msg) -> void
752
903
 
904
+ # <!-- rdoc-file=lib/resolv.rb -->
753
905
  # The name of this DomainName.
754
906
  #
755
907
  def name: () -> String
756
908
 
757
909
  private
758
910
 
911
+ # <!--
912
+ # rdoc-file=lib/resolv.rb
913
+ # - new(name)
914
+ # -->
759
915
  # Creates a new DomainName from `name`.
760
916
  #
761
917
  def initialize: (String name) -> untyped
762
918
  end
763
919
 
920
+ # <!-- rdoc-file=lib/resolv.rb -->
764
921
  # A generic resource abstract class.
922
+ #
765
923
  class Resolv::DNS::Resource::Generic < Resolv::DNS::Resource
766
924
  def self.create: (Integer type_value, Integer class_value) -> instance
767
925
 
@@ -769,6 +927,7 @@ class Resolv::DNS::Resource::Generic < Resolv::DNS::Resource
769
927
 
770
928
  public
771
929
 
930
+ # <!-- rdoc-file=lib/resolv.rb -->
772
931
  # Data for this generic resource.
773
932
  #
774
933
  def data: () -> String
@@ -777,29 +936,41 @@ class Resolv::DNS::Resource::Generic < Resolv::DNS::Resource
777
936
 
778
937
  private
779
938
 
939
+ # <!--
940
+ # rdoc-file=lib/resolv.rb
941
+ # - new(data)
942
+ # -->
780
943
  # Creates a new generic resource.
781
944
  #
782
945
  def initialize: (String data) -> untyped
783
946
  end
784
947
 
948
+ # <!-- rdoc-file=lib/resolv.rb -->
785
949
  # Host Information resource.
950
+ #
786
951
  class Resolv::DNS::Resource::HINFO < Resolv::DNS::Resource
787
952
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
788
953
 
789
954
  public
790
955
 
956
+ # <!-- rdoc-file=lib/resolv.rb -->
791
957
  # CPU architecture for this resource.
792
958
  #
793
959
  def cpu: () -> String
794
960
 
795
961
  def encode_rdata: (Resolv::DNS::Message::MessageEncoder msg) -> void
796
962
 
963
+ # <!-- rdoc-file=lib/resolv.rb -->
797
964
  # Operating system for this resource.
798
965
  #
799
966
  def os: () -> String
800
967
 
801
968
  private
802
969
 
970
+ # <!--
971
+ # rdoc-file=lib/resolv.rb
972
+ # - new(cpu, os)
973
+ # -->
803
974
  # Creates a new HINFO running `os` on `cpu`.
804
975
  #
805
976
  def initialize: (String cpu, String os) -> untyped
@@ -807,18 +978,23 @@ end
807
978
 
808
979
  Resolv::DNS::Resource::HINFO::TypeValue: Integer
809
980
 
981
+ # <!-- rdoc-file=lib/resolv.rb -->
810
982
  # module IN contains ARPA Internet specific RRs.
983
+ #
811
984
  module Resolv::DNS::Resource::IN
812
985
  end
813
986
 
814
987
  Resolv::DNS::Resource::IN::ClassValue: Integer
815
988
 
989
+ # <!-- rdoc-file=lib/resolv.rb -->
816
990
  # IPv4 Address resource
991
+ #
817
992
  class Resolv::DNS::Resource::IN::A < Resolv::DNS::Resource
818
993
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
819
994
 
820
995
  public
821
996
 
997
+ # <!-- rdoc-file=lib/resolv.rb -->
822
998
  # The Resolv::IPv4 address for this A.
823
999
  #
824
1000
  def address: () -> Resolv::IPv4
@@ -827,6 +1003,10 @@ class Resolv::DNS::Resource::IN::A < Resolv::DNS::Resource
827
1003
 
828
1004
  private
829
1005
 
1006
+ # <!--
1007
+ # rdoc-file=lib/resolv.rb
1008
+ # - new(address)
1009
+ # -->
830
1010
  # Creates a new A for `address`.
831
1011
  #
832
1012
  def initialize: (String | Resolv::IPv4 address) -> untyped
@@ -836,12 +1016,15 @@ Resolv::DNS::Resource::IN::A::ClassValue: Integer
836
1016
 
837
1017
  Resolv::DNS::Resource::IN::A::TypeValue: Integer
838
1018
 
1019
+ # <!-- rdoc-file=lib/resolv.rb -->
839
1020
  # An IPv6 address record.
1021
+ #
840
1022
  class Resolv::DNS::Resource::IN::AAAA < Resolv::DNS::Resource
841
1023
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
842
1024
 
843
1025
  public
844
1026
 
1027
+ # <!-- rdoc-file=lib/resolv.rb -->
845
1028
  # The Resolv::IPv6 address for this AAAA.
846
1029
  #
847
1030
  def address: () -> Resolv::IPv6
@@ -850,6 +1033,10 @@ class Resolv::DNS::Resource::IN::AAAA < Resolv::DNS::Resource
850
1033
 
851
1034
  private
852
1035
 
1036
+ # <!--
1037
+ # rdoc-file=lib/resolv.rb
1038
+ # - new(address)
1039
+ # -->
853
1040
  # Creates a new AAAA for `address`.
854
1041
  #
855
1042
  def initialize: (String | Resolv::IPv6 address) -> untyped
@@ -922,9 +1109,11 @@ Resolv::DNS::Resource::IN::SOA::ClassValue: Integer
922
1109
 
923
1110
  Resolv::DNS::Resource::IN::SOA::TypeValue: Integer
924
1111
 
1112
+ # <!-- rdoc-file=lib/resolv.rb -->
925
1113
  # SRV resource record defined in RFC 2782
926
1114
  #
927
1115
  # These records identify the hostname and port that a service is available at.
1116
+ #
928
1117
  class Resolv::DNS::Resource::IN::SRV < Resolv::DNS::Resource
929
1118
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
930
1119
 
@@ -932,12 +1121,14 @@ class Resolv::DNS::Resource::IN::SRV < Resolv::DNS::Resource
932
1121
 
933
1122
  def encode_rdata: (Resolv::DNS::Message::MessageEncoder msg) -> void
934
1123
 
1124
+ # <!-- rdoc-file=lib/resolv.rb -->
935
1125
  # The port on this target host of this service.
936
1126
  #
937
1127
  # The range is 0-65535.
938
1128
  #
939
1129
  def port: () -> Integer
940
1130
 
1131
+ # <!-- rdoc-file=lib/resolv.rb -->
941
1132
  # The priority of this target host.
942
1133
  #
943
1134
  # A client MUST attempt to contact the target host with the lowest-numbered
@@ -947,6 +1138,7 @@ class Resolv::DNS::Resource::IN::SRV < Resolv::DNS::Resource
947
1138
  #
948
1139
  def priority: () -> Integer
949
1140
 
1141
+ # <!-- rdoc-file=lib/resolv.rb -->
950
1142
  # The domain name of the target host.
951
1143
  #
952
1144
  # A target of "." means that the service is decidedly not available at this
@@ -954,6 +1146,7 @@ class Resolv::DNS::Resource::IN::SRV < Resolv::DNS::Resource
954
1146
  #
955
1147
  def target: () -> String
956
1148
 
1149
+ # <!-- rdoc-file=lib/resolv.rb -->
957
1150
  # A server selection mechanism.
958
1151
  #
959
1152
  # The weight field specifies a relative weight for entries with the same
@@ -967,6 +1160,10 @@ class Resolv::DNS::Resource::IN::SRV < Resolv::DNS::Resource
967
1160
 
968
1161
  private
969
1162
 
1163
+ # <!--
1164
+ # rdoc-file=lib/resolv.rb
1165
+ # - new(priority, weight, port, target)
1166
+ # -->
970
1167
  # Create a SRV resource record.
971
1168
  #
972
1169
  # See the documentation for #priority, #weight, #port and #target for
@@ -986,16 +1183,20 @@ Resolv::DNS::Resource::IN::TXT::ClassValue: Integer
986
1183
 
987
1184
  Resolv::DNS::Resource::IN::TXT::TypeValue: Integer
988
1185
 
1186
+ # <!-- rdoc-file=lib/resolv.rb -->
989
1187
  # Well Known Service resource.
1188
+ #
990
1189
  class Resolv::DNS::Resource::IN::WKS < Resolv::DNS::Resource
991
1190
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
992
1191
 
993
1192
  public
994
1193
 
1194
+ # <!-- rdoc-file=lib/resolv.rb -->
995
1195
  # The host these services run on.
996
1196
  #
997
1197
  def address: () -> Resolv::IPv4
998
1198
 
1199
+ # <!-- rdoc-file=lib/resolv.rb -->
999
1200
  # A bit map of enabled services on this host.
1000
1201
  #
1001
1202
  # If protocol is 6 (TCP) then the 26th bit corresponds to the SMTP service (port
@@ -1006,12 +1207,18 @@ class Resolv::DNS::Resource::IN::WKS < Resolv::DNS::Resource
1006
1207
 
1007
1208
  def encode_rdata: (Resolv::DNS::Message::MessageEncoder msg) -> void
1008
1209
 
1210
+ # <!-- rdoc-file=lib/resolv.rb -->
1009
1211
  # IP protocol number for these services.
1010
1212
  #
1011
1213
  def protocol: () -> Integer
1012
1214
 
1013
1215
  private
1014
1216
 
1217
+ # <!--
1218
+ # rdoc-file=lib/resolv.rb
1219
+ # - new(address, protocol, bitmap)
1220
+ # -->
1221
+ #
1015
1222
  def initialize: (String | Resolv::IPv4 address, Integer protocol, Integer bitmap) -> untyped
1016
1223
  end
1017
1224
 
@@ -1019,12 +1226,15 @@ Resolv::DNS::Resource::IN::WKS::ClassValue: Integer
1019
1226
 
1020
1227
  Resolv::DNS::Resource::IN::WKS::TypeValue: Integer
1021
1228
 
1229
+ # <!-- rdoc-file=lib/resolv.rb -->
1022
1230
  # Location resource
1231
+ #
1023
1232
  class Resolv::DNS::Resource::LOC < Resolv::DNS::Resource
1024
1233
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
1025
1234
 
1026
1235
  public
1027
1236
 
1237
+ # <!-- rdoc-file=lib/resolv.rb -->
1028
1238
  # The altitude of the LOC above a reference sphere whose surface sits 100km
1029
1239
  # below the WGS84 spheroid in centimeters as an unsigned 32bit integer
1030
1240
  #
@@ -1032,30 +1242,36 @@ class Resolv::DNS::Resource::LOC < Resolv::DNS::Resource
1032
1242
 
1033
1243
  def encode_rdata: (Resolv::DNS::Message::MessageEncoder msg) -> void
1034
1244
 
1245
+ # <!-- rdoc-file=lib/resolv.rb -->
1035
1246
  # The horizontal precision using ssize type values in meters using scientific
1036
1247
  # notation as 2 integers of XeY for precision use value/2 e.g. 2m = +/-1m
1037
1248
  #
1038
1249
  def hprecision: () -> Integer
1039
1250
 
1251
+ # <!-- rdoc-file=lib/resolv.rb -->
1040
1252
  # The latitude for this LOC where 2**31 is the equator in thousandths of an arc
1041
1253
  # second as an unsigned 32bit integer
1042
1254
  #
1043
1255
  def latitude: () -> Integer
1044
1256
 
1257
+ # <!-- rdoc-file=lib/resolv.rb -->
1045
1258
  # The longitude for this LOC where 2**31 is the prime meridian in thousandths of
1046
1259
  # an arc second as an unsigned 32bit integer
1047
1260
  #
1048
1261
  def longitude: () -> Integer
1049
1262
 
1263
+ # <!-- rdoc-file=lib/resolv.rb -->
1050
1264
  # The spherical size of this LOC in meters using scientific notation as 2
1051
1265
  # integers of XeY
1052
1266
  #
1053
1267
  def ssize: () -> Integer
1054
1268
 
1269
+ # <!-- rdoc-file=lib/resolv.rb -->
1055
1270
  # Returns the version value for this LOC record which should always be 00
1056
1271
  #
1057
1272
  def version: () -> Integer
1058
1273
 
1274
+ # <!-- rdoc-file=lib/resolv.rb -->
1059
1275
  # The vertical precision using ssize type values in meters using scientific
1060
1276
  # notation as 2 integers of XeY for precision use value/2 e.g. 2m = +/-1m
1061
1277
  #
@@ -1063,35 +1279,51 @@ class Resolv::DNS::Resource::LOC < Resolv::DNS::Resource
1063
1279
 
1064
1280
  private
1065
1281
 
1282
+ # <!--
1283
+ # rdoc-file=lib/resolv.rb
1284
+ # - new(version, ssize, hprecision, vprecision, latitude, longitude, altitude)
1285
+ # -->
1286
+ #
1066
1287
  def initialize: (Integer version, Integer ssize, Integer hprecision, Integer vprecision, Integer latitude, Integer longitude, Integer altitude) -> untyped
1067
1288
  end
1068
1289
 
1069
1290
  Resolv::DNS::Resource::LOC::TypeValue: Integer
1070
1291
 
1292
+ # <!-- rdoc-file=lib/resolv.rb -->
1071
1293
  # Mailing list or mailbox information.
1294
+ #
1072
1295
  class Resolv::DNS::Resource::MINFO < Resolv::DNS::Resource
1073
1296
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
1074
1297
 
1075
1298
  public
1076
1299
 
1300
+ # <!-- rdoc-file=lib/resolv.rb -->
1077
1301
  # Mailbox to use for error messages related to the mail list or mailbox.
1078
1302
  #
1079
1303
  def emailbx: () -> String
1080
1304
 
1081
1305
  def encode_rdata: (Resolv::DNS::Message::MessageEncoder msg) -> void
1082
1306
 
1307
+ # <!-- rdoc-file=lib/resolv.rb -->
1083
1308
  # Domain name responsible for this mail list or mailbox.
1084
1309
  #
1085
1310
  def rmailbx: () -> String
1086
1311
 
1087
1312
  private
1088
1313
 
1314
+ # <!--
1315
+ # rdoc-file=lib/resolv.rb
1316
+ # - new(rmailbx, emailbx)
1317
+ # -->
1318
+ #
1089
1319
  def initialize: (String rmailbx, String emailbx) -> untyped
1090
1320
  end
1091
1321
 
1092
1322
  Resolv::DNS::Resource::MINFO::TypeValue: Integer
1093
1323
 
1324
+ # <!-- rdoc-file=lib/resolv.rb -->
1094
1325
  # Mail Exchanger resource.
1326
+ #
1095
1327
  class Resolv::DNS::Resource::MX < Resolv::DNS::Resource
1096
1328
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
1097
1329
 
@@ -1099,16 +1331,22 @@ class Resolv::DNS::Resource::MX < Resolv::DNS::Resource
1099
1331
 
1100
1332
  def encode_rdata: (Resolv::DNS::Message::MessageEncoder msg) -> void
1101
1333
 
1334
+ # <!-- rdoc-file=lib/resolv.rb -->
1102
1335
  # The host of this MX.
1103
1336
  #
1104
1337
  def exchange: () -> String
1105
1338
 
1339
+ # <!-- rdoc-file=lib/resolv.rb -->
1106
1340
  # The preference for this MX.
1107
1341
  #
1108
1342
  def preference: () -> Integer
1109
1343
 
1110
1344
  private
1111
1345
 
1346
+ # <!--
1347
+ # rdoc-file=lib/resolv.rb
1348
+ # - new(preference, exchange)
1349
+ # -->
1112
1350
  # Creates a new MX record with `preference`, accepting mail at `exchange`.
1113
1351
  #
1114
1352
  def initialize: (Integer preference, String exchange) -> untyped
@@ -1116,19 +1354,25 @@ end
1116
1354
 
1117
1355
  Resolv::DNS::Resource::MX::TypeValue: Integer
1118
1356
 
1357
+ # <!-- rdoc-file=lib/resolv.rb -->
1119
1358
  # An authoritative name server.
1359
+ #
1120
1360
  class Resolv::DNS::Resource::NS < Resolv::DNS::Resource::DomainName
1121
1361
  end
1122
1362
 
1123
1363
  Resolv::DNS::Resource::NS::TypeValue: Integer
1124
1364
 
1365
+ # <!-- rdoc-file=lib/resolv.rb -->
1125
1366
  # A Pointer to another DNS name.
1367
+ #
1126
1368
  class Resolv::DNS::Resource::PTR < Resolv::DNS::Resource::DomainName
1127
1369
  end
1128
1370
 
1129
1371
  Resolv::DNS::Resource::PTR::TypeValue: Integer
1130
1372
 
1373
+ # <!-- rdoc-file=lib/resolv.rb -->
1131
1374
  # Start Of Authority resource.
1375
+ #
1132
1376
  class Resolv::DNS::Resource::SOA < Resolv::DNS::Resource
1133
1377
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
1134
1378
 
@@ -1136,39 +1380,50 @@ class Resolv::DNS::Resource::SOA < Resolv::DNS::Resource
1136
1380
 
1137
1381
  def encode_rdata: (Resolv::DNS::Message::MessageEncoder msg) -> void
1138
1382
 
1383
+ # <!-- rdoc-file=lib/resolv.rb -->
1139
1384
  # Time in seconds that a secondary name server is to use the data before
1140
1385
  # refreshing from the primary name server.
1141
1386
  #
1142
1387
  def expire: () -> Integer
1143
1388
 
1389
+ # <!-- rdoc-file=lib/resolv.rb -->
1144
1390
  # The minimum number of seconds to be used for TTL values in RRs.
1145
1391
  #
1146
1392
  def minimum: () -> Integer
1147
1393
 
1394
+ # <!-- rdoc-file=lib/resolv.rb -->
1148
1395
  # Name of the host where the master zone file for this zone resides.
1149
1396
  #
1150
1397
  def mname: () -> String
1151
1398
 
1399
+ # <!-- rdoc-file=lib/resolv.rb -->
1152
1400
  # How often, in seconds, a secondary name server is to check for updates from
1153
1401
  # the primary name server.
1154
1402
  #
1155
1403
  def refresh: () -> Integer
1156
1404
 
1405
+ # <!-- rdoc-file=lib/resolv.rb -->
1157
1406
  # How often, in seconds, a secondary name server is to retry after a failure to
1158
1407
  # check for a refresh.
1159
1408
  #
1160
1409
  def retry: () -> Integer
1161
1410
 
1411
+ # <!-- rdoc-file=lib/resolv.rb -->
1162
1412
  # The person responsible for this domain name.
1163
1413
  #
1164
1414
  def rname: () -> String
1165
1415
 
1416
+ # <!-- rdoc-file=lib/resolv.rb -->
1166
1417
  # The version number of the zone file.
1167
1418
  #
1168
1419
  def serial: () -> Integer
1169
1420
 
1170
1421
  private
1171
1422
 
1423
+ # <!--
1424
+ # rdoc-file=lib/resolv.rb
1425
+ # - new(mname, rname, serial, refresh, retry_, expire, minimum)
1426
+ # -->
1172
1427
  # Creates a new SOA record. See the attr documentation for the details of each
1173
1428
  # argument.
1174
1429
  #
@@ -1177,53 +1432,91 @@ end
1177
1432
 
1178
1433
  Resolv::DNS::Resource::SOA::TypeValue: Integer
1179
1434
 
1435
+ # <!-- rdoc-file=lib/resolv.rb -->
1180
1436
  # Unstructured text resource.
1437
+ #
1181
1438
  class Resolv::DNS::Resource::TXT < Resolv::DNS::Resource
1182
1439
  def self.decode_rdata: (Resolv::DNS::Message::MessageDecoder msg) -> instance
1183
1440
 
1184
1441
  public
1185
1442
 
1443
+ # <!--
1444
+ # rdoc-file=lib/resolv.rb
1445
+ # - data()
1446
+ # -->
1186
1447
  # Returns the concatenated string from `strings`.
1187
1448
  #
1188
1449
  def data: () -> String
1189
1450
 
1190
1451
  def encode_rdata: (Resolv::DNS::Message::MessageEncoder msg) -> void
1191
1452
 
1453
+ # <!-- rdoc-file=lib/resolv.rb -->
1192
1454
  # Returns an Array of Strings for this TXT record.
1193
1455
  #
1194
1456
  def strings: () -> Array[String]
1195
1457
 
1196
1458
  private
1197
1459
 
1460
+ # <!--
1461
+ # rdoc-file=lib/resolv.rb
1462
+ # - new(first_string, *rest_strings)
1463
+ # -->
1464
+ #
1198
1465
  def initialize: (String first_string, *String rest_strings) -> untyped
1199
1466
  end
1200
1467
 
1201
1468
  Resolv::DNS::Resource::TXT::TypeValue: Integer
1202
1469
 
1470
+ # <!-- rdoc-file=lib/resolv.rb -->
1203
1471
  # Resolv::Hosts is a hostname resolver that uses the system hosts file.
1472
+ #
1204
1473
  class Resolv::Hosts
1205
1474
  public
1206
1475
 
1476
+ # <!--
1477
+ # rdoc-file=lib/resolv.rb
1478
+ # - each_address(name, &proc)
1479
+ # -->
1207
1480
  # Iterates over all IP addresses for `name` retrieved from the hosts file.
1208
1481
  #
1209
1482
  def each_address: (String name) { (String) -> void } -> void
1210
1483
 
1484
+ # <!--
1485
+ # rdoc-file=lib/resolv.rb
1486
+ # - each_name(address, &proc)
1487
+ # -->
1211
1488
  # Iterates over all hostnames for `address` retrieved from the hosts file.
1212
1489
  #
1213
1490
  def each_name: (String address) { (String) -> void } -> void
1214
1491
 
1492
+ # <!--
1493
+ # rdoc-file=lib/resolv.rb
1494
+ # - getaddress(name)
1495
+ # -->
1215
1496
  # Gets the IP address of `name` from the hosts file.
1216
1497
  #
1217
1498
  def getaddress: (String name) -> String
1218
1499
 
1500
+ # <!--
1501
+ # rdoc-file=lib/resolv.rb
1502
+ # - getaddresses(name)
1503
+ # -->
1219
1504
  # Gets all IP addresses for `name` from the hosts file.
1220
1505
  #
1221
1506
  def getaddresses: (String name) -> Array[String]
1222
1507
 
1508
+ # <!--
1509
+ # rdoc-file=lib/resolv.rb
1510
+ # - getname(address)
1511
+ # -->
1223
1512
  # Gets the hostname of `address` from the hosts file.
1224
1513
  #
1225
1514
  def getname: (String address) -> String
1226
1515
 
1516
+ # <!--
1517
+ # rdoc-file=lib/resolv.rb
1518
+ # - getnames(address)
1519
+ # -->
1227
1520
  # Gets all hostnames for `address` from the hosts file.
1228
1521
  #
1229
1522
  def getnames: (String address) -> Array[String]
@@ -1232,6 +1525,10 @@ class Resolv::Hosts
1232
1525
 
1233
1526
  private
1234
1527
 
1528
+ # <!--
1529
+ # rdoc-file=lib/resolv.rb
1530
+ # - new(filename = DefaultFileName)
1531
+ # -->
1235
1532
  # Creates a new Resolv::Hosts, using `filename` for its data source.
1236
1533
  #
1237
1534
  def initialize: (?String filename) -> untyped
@@ -1239,14 +1536,22 @@ end
1239
1536
 
1240
1537
  Resolv::Hosts::DefaultFileName: String
1241
1538
 
1539
+ # <!-- rdoc-file=lib/resolv.rb -->
1242
1540
  # A Resolv::DNS IPv4 address.
1541
+ #
1243
1542
  class Resolv::IPv4
1543
+ # <!--
1544
+ # rdoc-file=lib/resolv.rb
1545
+ # - create(arg)
1546
+ # -->
1547
+ #
1244
1548
  def self.create: (String | instance arg) -> instance
1245
1549
 
1246
1550
  public
1247
1551
 
1248
1552
  def ==: (instance other) -> bool
1249
1553
 
1554
+ # <!-- rdoc-file=lib/resolv.rb -->
1250
1555
  # The raw IPv4 address as a String.
1251
1556
  #
1252
1557
  def address: () -> String
@@ -1257,6 +1562,10 @@ class Resolv::IPv4
1257
1562
 
1258
1563
  def inspect: () -> String
1259
1564
 
1565
+ # <!--
1566
+ # rdoc-file=lib/resolv.rb
1567
+ # - to_name()
1568
+ # -->
1260
1569
  # Turns this IPv4 address into a Resolv::DNS::Name.
1261
1570
  #
1262
1571
  def to_name: () -> Resolv::DNS::Name
@@ -1270,11 +1579,19 @@ end
1270
1579
 
1271
1580
  Resolv::IPv4::Regex: Regexp
1272
1581
 
1582
+ # <!-- rdoc-file=lib/resolv.rb -->
1273
1583
  # Regular expression IPv4 addresses must match.
1584
+ #
1274
1585
  Resolv::IPv4::Regex256: Regexp
1275
1586
 
1587
+ # <!-- rdoc-file=lib/resolv.rb -->
1276
1588
  # A Resolv::DNS IPv6 address.
1589
+ #
1277
1590
  class Resolv::IPv6
1591
+ # <!--
1592
+ # rdoc-file=lib/resolv.rb
1593
+ # - create(arg)
1594
+ # -->
1278
1595
  # Creates a new IPv6 address from `arg` which may be:
1279
1596
  #
1280
1597
  # IPv6
@@ -1282,13 +1599,13 @@ class Resolv::IPv6
1282
1599
  # String
1283
1600
  # : `arg` must match one of the IPv6::Regex* constants
1284
1601
  #
1285
- #
1286
1602
  def self.create: (String | instance arg) -> instance
1287
1603
 
1288
1604
  public
1289
1605
 
1290
1606
  def ==: (instance other) -> bool
1291
1607
 
1608
+ # <!-- rdoc-file=lib/resolv.rb -->
1292
1609
  # The raw IPv6 address as a String.
1293
1610
  #
1294
1611
  def address: () -> String
@@ -1299,6 +1616,10 @@ class Resolv::IPv6
1299
1616
 
1300
1617
  def inspect: () -> String
1301
1618
 
1619
+ # <!--
1620
+ # rdoc-file=lib/resolv.rb
1621
+ # - to_name()
1622
+ # -->
1302
1623
  # Turns this IPv6 address into a Resolv::DNS::Name.
1303
1624
  #
1304
1625
  def to_name: () -> Resolv::DNS::Name
@@ -1310,32 +1631,52 @@ class Resolv::IPv6
1310
1631
  def initialize: (untyped address) -> untyped
1311
1632
  end
1312
1633
 
1634
+ # <!-- rdoc-file=lib/resolv.rb -->
1313
1635
  # A composite IPv6 address Regexp.
1636
+ #
1314
1637
  Resolv::IPv6::Regex: Regexp
1315
1638
 
1639
+ # <!-- rdoc-file=lib/resolv.rb -->
1316
1640
  # IPv4 mapped IPv6 address format a:b:c:d:e:f:w.x.y.z
1641
+ #
1317
1642
  Resolv::IPv6::Regex_6Hex4Dec: Regexp
1318
1643
 
1644
+ # <!-- rdoc-file=lib/resolv.rb -->
1319
1645
  # IPv6 address format a:b:c:d:e:f:g:h
1646
+ #
1320
1647
  Resolv::IPv6::Regex_8Hex: Regexp
1321
1648
 
1649
+ # <!-- rdoc-file=lib/resolv.rb -->
1322
1650
  # IPv6 link local address format fe80:b:c:d:e:f:g:h%em1
1651
+ #
1323
1652
  Resolv::IPv6::Regex_8HexLinkLocal: Regexp
1324
1653
 
1654
+ # <!-- rdoc-file=lib/resolv.rb -->
1325
1655
  # Compressed IPv6 address format a::b
1656
+ #
1326
1657
  Resolv::IPv6::Regex_CompressedHex: Regexp
1327
1658
 
1659
+ # <!-- rdoc-file=lib/resolv.rb -->
1328
1660
  # Compressed IPv4 mapped IPv6 address format a::b:w.x.y.z
1661
+ #
1329
1662
  Resolv::IPv6::Regex_CompressedHex4Dec: Regexp
1330
1663
 
1664
+ # <!-- rdoc-file=lib/resolv.rb -->
1331
1665
  # Compressed IPv6 link local address format fe80::b%em1
1666
+ #
1332
1667
  Resolv::IPv6::Regex_CompressedHexLinkLocal: Regexp
1333
1668
 
1334
1669
  module Resolv::LOC
1335
1670
  end
1336
1671
 
1672
+ # <!-- rdoc-file=lib/resolv.rb -->
1337
1673
  # A Resolv::LOC::Alt
1674
+ #
1338
1675
  class Resolv::LOC::Alt
1676
+ # <!--
1677
+ # rdoc-file=lib/resolv.rb
1678
+ # - create(arg)
1679
+ # -->
1339
1680
  # Creates a new LOC::Alt from `arg` which may be:
1340
1681
  #
1341
1682
  # LOC::Alt
@@ -1343,13 +1684,13 @@ class Resolv::LOC::Alt
1343
1684
  # String
1344
1685
  # : `arg` must match the LOC::Alt::Regex constant
1345
1686
  #
1346
- #
1347
1687
  def self.create: (Resolv::LOC::Alt | String arg) -> instance
1348
1688
 
1349
1689
  public
1350
1690
 
1351
1691
  def eql?: (Resolv::LOC::Alt other) -> bool
1352
1692
 
1693
+ # <!-- rdoc-file=lib/resolv.rb -->
1353
1694
  # The raw altitude
1354
1695
  #
1355
1696
  def altitude: () -> Integer
@@ -1364,15 +1705,26 @@ class Resolv::LOC::Alt
1364
1705
 
1365
1706
  private
1366
1707
 
1708
+ # <!--
1709
+ # rdoc-file=lib/resolv.rb
1710
+ # - new(altitude)
1711
+ # -->
1712
+ #
1367
1713
  def initialize: (Integer altitude) -> untyped
1368
1714
  end
1369
1715
 
1370
1716
  Resolv::LOC::Alt::Regex: Regexp
1371
1717
 
1718
+ # <!-- rdoc-file=lib/resolv.rb -->
1372
1719
  # A Resolv::LOC::Coord
1720
+ #
1373
1721
  class Resolv::LOC::Coord
1374
1722
  type orientation = "lat" | "lon"
1375
1723
 
1724
+ # <!--
1725
+ # rdoc-file=lib/resolv.rb
1726
+ # - create(arg)
1727
+ # -->
1376
1728
  # Creates a new LOC::Coord from `arg` which may be:
1377
1729
  #
1378
1730
  # LOC::Coord
@@ -1380,13 +1732,13 @@ class Resolv::LOC::Coord
1380
1732
  # String
1381
1733
  # : `arg` must match the LOC::Coord::Regex constant
1382
1734
  #
1383
- #
1384
1735
  def self.create: (Resolv::LOC::Coord | String arg) -> instance
1385
1736
 
1386
1737
  public
1387
1738
 
1388
1739
  def eql?: (Resolv::LOC::Coord other) -> bool
1389
1740
 
1741
+ # <!-- rdoc-file=lib/resolv.rb -->
1390
1742
  # The raw coordinates
1391
1743
  #
1392
1744
  def coordinates: () -> String
@@ -1397,6 +1749,7 @@ class Resolv::LOC::Coord
1397
1749
 
1398
1750
  def inspect: () -> String
1399
1751
 
1752
+ # <!-- rdoc-file=lib/resolv.rb -->
1400
1753
  # The orientation of the hemisphere as 'lat' or 'lon'
1401
1754
  #
1402
1755
  def orientation: () -> orientation
@@ -1405,13 +1758,24 @@ class Resolv::LOC::Coord
1405
1758
 
1406
1759
  private
1407
1760
 
1761
+ # <!--
1762
+ # rdoc-file=lib/resolv.rb
1763
+ # - new(coordinates,orientation)
1764
+ # -->
1765
+ #
1408
1766
  def initialize: (String coordinates, orientation orientation) -> untyped
1409
1767
  end
1410
1768
 
1411
1769
  Resolv::LOC::Coord::Regex: Regexp
1412
1770
 
1771
+ # <!-- rdoc-file=lib/resolv.rb -->
1413
1772
  # A Resolv::LOC::Size
1773
+ #
1414
1774
  class Resolv::LOC::Size
1775
+ # <!--
1776
+ # rdoc-file=lib/resolv.rb
1777
+ # - create(arg)
1778
+ # -->
1415
1779
  # Creates a new LOC::Size from `arg` which may be:
1416
1780
  #
1417
1781
  # LOC::Size
@@ -1419,7 +1783,6 @@ class Resolv::LOC::Size
1419
1783
  # String
1420
1784
  # : `arg` must match the LOC::Size::Regex constant
1421
1785
  #
1422
- #
1423
1786
  def self.create: (Resolv::LOC::Size | String arg) -> instance
1424
1787
 
1425
1788
  public
@@ -1432,6 +1795,7 @@ class Resolv::LOC::Size
1432
1795
 
1433
1796
  def inspect: () -> String
1434
1797
 
1798
+ # <!-- rdoc-file=lib/resolv.rb -->
1435
1799
  # The raw size
1436
1800
  #
1437
1801
  def scalar: () -> String
@@ -1440,11 +1804,17 @@ class Resolv::LOC::Size
1440
1804
 
1441
1805
  private
1442
1806
 
1807
+ # <!--
1808
+ # rdoc-file=lib/resolv.rb
1809
+ # - new(scalar)
1810
+ # -->
1811
+ #
1443
1812
  def initialize: (String scalar) -> untyped
1444
1813
  end
1445
1814
 
1446
1815
  Resolv::LOC::Size::Regex: Regexp
1447
1816
 
1817
+ # <!-- rdoc-file=lib/resolv.rb -->
1448
1818
  # Resolv::MDNS is a one-shot Multicast DNS (mDNS) resolver. It blindly makes
1449
1819
  # queries to the mDNS addresses without understanding anything about multicast
1450
1820
  # ports.
@@ -1456,6 +1826,10 @@ Resolv::LOC::Size::Regex: Regexp
1456
1826
  class Resolv::MDNS < Resolv::DNS
1457
1827
  public
1458
1828
 
1829
+ # <!--
1830
+ # rdoc-file=lib/resolv.rb
1831
+ # - each_address(name)
1832
+ # -->
1459
1833
  # Iterates over all IP addresses for `name` retrieved from the mDNS resolver,
1460
1834
  # provided name ends with "local". If the name does not end in "local" no
1461
1835
  # records will be returned.
@@ -1469,6 +1843,10 @@ class Resolv::MDNS < Resolv::DNS
1469
1843
 
1470
1844
  private
1471
1845
 
1846
+ # <!--
1847
+ # rdoc-file=lib/resolv.rb
1848
+ # - new(config_info=nil)
1849
+ # -->
1472
1850
  # Creates a new one-shot Multicast DNS (mDNS) resolver.
1473
1851
  #
1474
1852
  # `config_info` can be:
@@ -1479,26 +1857,37 @@ class Resolv::MDNS < Resolv::DNS
1479
1857
  # Hash
1480
1858
  # : Must contain :nameserver or :nameserver_port like Resolv::DNS#initialize.
1481
1859
  #
1482
- #
1483
- def initialize: (?(String | Hash[Symbol, untyped]) config_info) -> untyped
1860
+ def initialize: (?String | Hash[Symbol, untyped] config_info) -> untyped
1484
1861
  end
1485
1862
 
1863
+ # <!-- rdoc-file=lib/resolv.rb -->
1486
1864
  # Default IPv4 mDNS address
1865
+ #
1487
1866
  Resolv::MDNS::AddressV4: String
1488
1867
 
1868
+ # <!-- rdoc-file=lib/resolv.rb -->
1489
1869
  # Default IPv6 mDNS address
1870
+ #
1490
1871
  Resolv::MDNS::AddressV6: String
1491
1872
 
1873
+ # <!-- rdoc-file=lib/resolv.rb -->
1492
1874
  # Default mDNS addresses
1875
+ #
1493
1876
  Resolv::MDNS::Addresses: Array[untyped]
1494
1877
 
1878
+ # <!-- rdoc-file=lib/resolv.rb -->
1495
1879
  # Default mDNS Port
1880
+ #
1496
1881
  Resolv::MDNS::Port: Integer
1497
1882
 
1883
+ # <!-- rdoc-file=lib/resolv.rb -->
1498
1884
  # Indicates a failure to resolve a name or address.
1885
+ #
1499
1886
  class Resolv::ResolvError < StandardError
1500
1887
  end
1501
1888
 
1889
+ # <!-- rdoc-file=lib/resolv.rb -->
1502
1890
  # Indicates a timeout resolving a name or address.
1891
+ #
1503
1892
  class Resolv::ResolvTimeout < Timeout::Error
1504
1893
  end