esquema 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -1
  3. data/CHANGELOG.md +9 -1
  4. data/README.md +11 -9
  5. data/lib/esquema/builder.rb +73 -28
  6. data/lib/esquema/configuration.rb +2 -1
  7. data/lib/esquema/keyword_validator.rb +98 -0
  8. data/lib/esquema/model.rb +4 -0
  9. data/lib/esquema/property.rb +185 -26
  10. data/lib/esquema/schema_enhancer.rb +55 -30
  11. data/lib/esquema/type_caster.rb +16 -4
  12. data/lib/esquema/version.rb +1 -1
  13. data/lib/esquema/virtual_column.rb +46 -0
  14. data/lib/esquema.rb +7 -1
  15. data/lib/generators/esquema/install/install_generator.rb +1 -0
  16. data/sorbet/config +4 -0
  17. data/sorbet/rbi/annotations/.gitattributes +1 -0
  18. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  19. data/sorbet/rbi/annotations/activerecord.rbi +92 -0
  20. data/sorbet/rbi/annotations/activesupport.rbi +421 -0
  21. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  22. data/sorbet/rbi/gems/.gitattributes +1 -0
  23. data/sorbet/rbi/gems/activemodel@7.1.3.rbi +8 -0
  24. data/sorbet/rbi/gems/activerecord@7.1.3.rbi +8 -0
  25. data/sorbet/rbi/gems/activesupport@7.1.3.rbi +192 -0
  26. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  27. data/sorbet/rbi/gems/base64@0.2.0.rbi +8 -0
  28. data/sorbet/rbi/gems/bigdecimal@3.1.6.rbi +8 -0
  29. data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
  30. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  31. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +8 -0
  32. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
  33. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1130 -0
  34. data/sorbet/rbi/gems/drb@2.2.0.rbi +1272 -0
  35. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  36. data/sorbet/rbi/gems/i18n@1.14.1.rbi +8 -0
  37. data/sorbet/rbi/gems/json@2.7.1.rbi +1553 -0
  38. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  39. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  40. data/sorbet/rbi/gems/minitest@5.22.2.rbi +8 -0
  41. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +8 -0
  42. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  43. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  44. data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
  45. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  46. data/sorbet/rbi/gems/prism@0.24.0.rbi +31040 -0
  47. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
  48. data/sorbet/rbi/gems/pry@0.14.2.rbi +10075 -0
  49. data/sorbet/rbi/gems/racc@1.7.3.rbi +157 -0
  50. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  51. data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
  52. data/sorbet/rbi/gems/rbi@0.1.9.rbi +3006 -0
  53. data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +3771 -0
  54. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
  55. data/sorbet/rbi/gems/rspec-core@3.13.0.rbi +10978 -0
  56. data/sorbet/rbi/gems/rspec-expectations@3.13.0.rbi +8153 -0
  57. data/sorbet/rbi/gems/rspec-mocks@3.13.0.rbi +5340 -0
  58. data/sorbet/rbi/gems/rspec-support@3.13.0.rbi +1629 -0
  59. data/sorbet/rbi/gems/rspec@3.13.0.rbi +82 -0
  60. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7006 -0
  61. data/sorbet/rbi/gems/rubocop@1.60.2.rbi +57383 -0
  62. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  63. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  64. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  65. data/sorbet/rbi/gems/sqlite3@1.7.2.rbi +1691 -0
  66. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23133 -0
  67. data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3510 -0
  68. data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
  69. data/sorbet/rbi/gems/timeout@0.4.1.rbi +142 -0
  70. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +8 -0
  71. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  72. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  73. data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
  74. data/sorbet/rbi/todo.rbi +20 -0
  75. data/sorbet/tapioca/config.yml +13 -0
  76. data/sorbet/tapioca/require.rb +4 -0
  77. metadata +74 -12
  78. data/esquema.gemspec +0 -38
@@ -0,0 +1,3006 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rbi` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rbi`.
6
+
7
+ # source://rbi//lib/rbi/loc.rb#4
8
+ module RBI; end
9
+
10
+ # source://rbi//lib/rbi/model.rb#968
11
+ class RBI::Arg < ::RBI::Node
12
+ # source://rbi//lib/rbi/model.rb#980
13
+ sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void }
14
+ def initialize(value, loc: T.unsafe(nil)); end
15
+
16
+ # source://rbi//lib/rbi/model.rb#986
17
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
18
+ def ==(other); end
19
+
20
+ # source://rbi//lib/rbi/printer.rb#613
21
+ sig { override.params(v: ::RBI::Printer).void }
22
+ def accept_printer(v); end
23
+
24
+ # source://rbi//lib/rbi/model.rb#991
25
+ sig { returns(::String) }
26
+ def to_s; end
27
+
28
+ # source://rbi//lib/rbi/model.rb#972
29
+ sig { returns(::String) }
30
+ def value; end
31
+ end
32
+
33
+ # Attributes
34
+ #
35
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
36
+ #
37
+ # source://rbi//lib/rbi/model.rb#349
38
+ class RBI::Attr < ::RBI::NodeWithComments
39
+ include ::RBI::Indexable
40
+
41
+ abstract!
42
+
43
+ # source://rbi//lib/rbi/model.rb#374
44
+ sig do
45
+ params(
46
+ name: ::Symbol,
47
+ names: T::Array[::Symbol],
48
+ visibility: ::RBI::Visibility,
49
+ sigs: T::Array[::RBI::Sig],
50
+ loc: T.nilable(::RBI::Loc),
51
+ comments: T::Array[::RBI::Comment]
52
+ ).void
53
+ end
54
+ def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
55
+
56
+ # source://rbi//lib/rbi/printer.rb#348
57
+ sig { override.params(v: ::RBI::Printer).void }
58
+ def accept_printer(v); end
59
+
60
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#412
61
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
62
+ def compatible_with?(other); end
63
+
64
+ # @abstract
65
+ #
66
+ # source://rbi//lib/rbi/model.rb#382
67
+ sig { abstract.returns(T::Array[::String]) }
68
+ def fully_qualified_names; end
69
+
70
+ # source://rbi//lib/rbi/index.rb#113
71
+ sig { override.returns(T::Array[::String]) }
72
+ def index_ids; end
73
+
74
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#420
75
+ sig { override.params(other: ::RBI::Node).void }
76
+ def merge_with(other); end
77
+
78
+ # source://rbi//lib/rbi/model.rb#356
79
+ sig { returns(T::Array[::Symbol]) }
80
+ def names; end
81
+
82
+ # source://rbi//lib/rbi/printer.rb#375
83
+ sig { override.returns(T::Boolean) }
84
+ def oneline?; end
85
+
86
+ # source://rbi//lib/rbi/model.rb#362
87
+ sig { returns(T::Array[::RBI::Sig]) }
88
+ def sigs; end
89
+
90
+ # source://rbi//lib/rbi/model.rb#359
91
+ sig { returns(::RBI::Visibility) }
92
+ def visibility; end
93
+
94
+ # @return [Visibility]
95
+ #
96
+ # source://rbi//lib/rbi/model.rb#359
97
+ def visibility=(_arg0); end
98
+ end
99
+
100
+ # source://rbi//lib/rbi/model.rb#385
101
+ class RBI::AttrAccessor < ::RBI::Attr
102
+ # source://rbi//lib/rbi/model.rb#399
103
+ sig do
104
+ params(
105
+ name: ::Symbol,
106
+ names: ::Symbol,
107
+ visibility: ::RBI::Visibility,
108
+ sigs: T::Array[::RBI::Sig],
109
+ loc: T.nilable(::RBI::Loc),
110
+ comments: T::Array[::RBI::Comment],
111
+ block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void)
112
+ ).void
113
+ end
114
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
115
+
116
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#452
117
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
118
+ def compatible_with?(other); end
119
+
120
+ # source://rbi//lib/rbi/model.rb#405
121
+ sig { override.returns(T::Array[::String]) }
122
+ def fully_qualified_names; end
123
+
124
+ # source://rbi//lib/rbi/model.rb#411
125
+ sig { override.returns(::String) }
126
+ def to_s; end
127
+ end
128
+
129
+ # source://rbi//lib/rbi/model.rb#417
130
+ class RBI::AttrReader < ::RBI::Attr
131
+ # source://rbi//lib/rbi/model.rb#431
132
+ sig do
133
+ params(
134
+ name: ::Symbol,
135
+ names: ::Symbol,
136
+ visibility: ::RBI::Visibility,
137
+ sigs: T::Array[::RBI::Sig],
138
+ loc: T.nilable(::RBI::Loc),
139
+ comments: T::Array[::RBI::Comment],
140
+ block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void)
141
+ ).void
142
+ end
143
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
144
+
145
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#434
146
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
147
+ def compatible_with?(other); end
148
+
149
+ # source://rbi//lib/rbi/model.rb#437
150
+ sig { override.returns(T::Array[::String]) }
151
+ def fully_qualified_names; end
152
+
153
+ # source://rbi//lib/rbi/model.rb#443
154
+ sig { override.returns(::String) }
155
+ def to_s; end
156
+ end
157
+
158
+ # source://rbi//lib/rbi/model.rb#449
159
+ class RBI::AttrWriter < ::RBI::Attr
160
+ # source://rbi//lib/rbi/model.rb#463
161
+ sig do
162
+ params(
163
+ name: ::Symbol,
164
+ names: ::Symbol,
165
+ visibility: ::RBI::Visibility,
166
+ sigs: T::Array[::RBI::Sig],
167
+ loc: T.nilable(::RBI::Loc),
168
+ comments: T::Array[::RBI::Comment],
169
+ block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void)
170
+ ).void
171
+ end
172
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
173
+
174
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#443
175
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
176
+ def compatible_with?(other); end
177
+
178
+ # source://rbi//lib/rbi/model.rb#469
179
+ sig { override.returns(T::Array[::String]) }
180
+ def fully_qualified_names; end
181
+
182
+ # source://rbi//lib/rbi/model.rb#475
183
+ sig { override.returns(::String) }
184
+ def to_s; end
185
+ end
186
+
187
+ # An arbitrary blank line that can be added both in trees and comments
188
+ #
189
+ # source://rbi//lib/rbi/model.rb#74
190
+ class RBI::BlankLine < ::RBI::Comment
191
+ # source://rbi//lib/rbi/model.rb#78
192
+ sig { params(loc: T.nilable(::RBI::Loc)).void }
193
+ def initialize(loc: T.unsafe(nil)); end
194
+
195
+ # source://rbi//lib/rbi/printer.rb#217
196
+ sig { override.params(v: ::RBI::Printer).void }
197
+ def accept_printer(v); end
198
+ end
199
+
200
+ # source://rbi//lib/rbi/model.rb#741
201
+ class RBI::BlockParam < ::RBI::Param
202
+ # source://rbi//lib/rbi/model.rb#752
203
+ sig do
204
+ params(
205
+ name: ::String,
206
+ loc: T.nilable(::RBI::Loc),
207
+ comments: T::Array[::RBI::Comment],
208
+ block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void)
209
+ ).void
210
+ end
211
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
212
+
213
+ # source://rbi//lib/rbi/model.rb#763
214
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
215
+ def ==(other); end
216
+
217
+ # source://rbi//lib/rbi/printer.rb#543
218
+ sig { override.params(v: ::RBI::Printer).void }
219
+ def accept_printer(v); end
220
+
221
+ # source://rbi//lib/rbi/printer.rb#548
222
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
223
+ def print_comment_leading_space(v, last:); end
224
+
225
+ # source://rbi//lib/rbi/model.rb#758
226
+ sig { override.returns(::String) }
227
+ def to_s; end
228
+ end
229
+
230
+ # source://rbi//lib/rbi/model.rb#218
231
+ class RBI::Class < ::RBI::Scope
232
+ # source://rbi//lib/rbi/model.rb#236
233
+ sig do
234
+ params(
235
+ name: ::String,
236
+ superclass_name: T.nilable(::String),
237
+ loc: T.nilable(::RBI::Loc),
238
+ comments: T::Array[::RBI::Comment],
239
+ block: T.nilable(T.proc.params(node: ::RBI::Class).void)
240
+ ).void
241
+ end
242
+ def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
243
+
244
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#376
245
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
246
+ def compatible_with?(other); end
247
+
248
+ # source://rbi//lib/rbi/model.rb#244
249
+ sig { override.returns(::String) }
250
+ def fully_qualified_name; end
251
+
252
+ # source://rbi//lib/rbi/model.rb#222
253
+ sig { returns(::String) }
254
+ def name; end
255
+
256
+ # @return [String]
257
+ #
258
+ # source://rbi//lib/rbi/model.rb#222
259
+ def name=(_arg0); end
260
+
261
+ # source://rbi//lib/rbi/printer.rb#284
262
+ sig { override.params(v: ::RBI::Printer).void }
263
+ def print_header(v); end
264
+
265
+ # source://rbi//lib/rbi/model.rb#225
266
+ sig { returns(T.nilable(::String)) }
267
+ def superclass_name; end
268
+
269
+ # @return [String, nil]
270
+ #
271
+ # source://rbi//lib/rbi/model.rb#225
272
+ def superclass_name=(_arg0); end
273
+ end
274
+
275
+ # source://rbi//lib/rbi/model.rb#53
276
+ class RBI::Comment < ::RBI::Node
277
+ # source://rbi//lib/rbi/model.rb#60
278
+ sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void }
279
+ def initialize(text, loc: T.unsafe(nil)); end
280
+
281
+ # source://rbi//lib/rbi/model.rb#66
282
+ sig { params(other: ::Object).returns(T::Boolean) }
283
+ def ==(other); end
284
+
285
+ # source://rbi//lib/rbi/printer.rb#197
286
+ sig { override.params(v: ::RBI::Printer).void }
287
+ def accept_printer(v); end
288
+
289
+ # source://rbi//lib/rbi/model.rb#57
290
+ sig { returns(::String) }
291
+ def text; end
292
+
293
+ # @return [String]
294
+ #
295
+ # source://rbi//lib/rbi/model.rb#57
296
+ def text=(_arg0); end
297
+ end
298
+
299
+ # A tree showing incompatibles nodes
300
+ #
301
+ # Is rendered as a merge conflict between `left` and` right`:
302
+ # ~~~rb
303
+ # class Foo
304
+ # <<<<<<< left
305
+ # def m1; end
306
+ # def m2(a); end
307
+ # =======
308
+ # def m1(a); end
309
+ # def m2; end
310
+ # >>>>>>> right
311
+ # end
312
+ # ~~~
313
+ #
314
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#589
315
+ class RBI::ConflictTree < ::RBI::Tree
316
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#596
317
+ sig { params(left_name: ::String, right_name: ::String).void }
318
+ def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
319
+
320
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#607
321
+ sig { override.params(v: ::RBI::Printer).void }
322
+ def accept_printer(v); end
323
+
324
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#593
325
+ sig { returns(::RBI::Tree) }
326
+ def left; end
327
+
328
+ # @return [Tree]
329
+ #
330
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#593
331
+ def right; end
332
+ end
333
+
334
+ # Consts
335
+ #
336
+ # source://rbi//lib/rbi/model.rb#312
337
+ class RBI::Const < ::RBI::NodeWithComments
338
+ include ::RBI::Indexable
339
+
340
+ # source://rbi//lib/rbi/model.rb#327
341
+ sig do
342
+ params(
343
+ name: ::String,
344
+ value: ::String,
345
+ loc: T.nilable(::RBI::Loc),
346
+ comments: T::Array[::RBI::Comment],
347
+ block: T.nilable(T.proc.params(node: ::RBI::Const).void)
348
+ ).void
349
+ end
350
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
351
+
352
+ # source://rbi//lib/rbi/printer.rb#335
353
+ sig { override.params(v: ::RBI::Printer).void }
354
+ def accept_printer(v); end
355
+
356
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#403
357
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
358
+ def compatible_with?(other); end
359
+
360
+ # source://rbi//lib/rbi/model.rb#335
361
+ sig { returns(::String) }
362
+ def fully_qualified_name; end
363
+
364
+ # source://rbi//lib/rbi/index.rb#103
365
+ sig { override.returns(T::Array[::String]) }
366
+ def index_ids; end
367
+
368
+ # source://rbi//lib/rbi/model.rb#316
369
+ sig { returns(::String) }
370
+ def name; end
371
+
372
+ # source://rbi//lib/rbi/model.rb#342
373
+ sig { override.returns(::String) }
374
+ def to_s; end
375
+
376
+ # @return [String]
377
+ #
378
+ # source://rbi//lib/rbi/model.rb#316
379
+ def value; end
380
+ end
381
+
382
+ # source://rbi//lib/rbi/model.rb#816
383
+ class RBI::Extend < ::RBI::Mixin
384
+ include ::RBI::Indexable
385
+
386
+ # source://rbi//lib/rbi/model.rb#828
387
+ sig do
388
+ params(
389
+ name: ::String,
390
+ names: ::String,
391
+ loc: T.nilable(::RBI::Loc),
392
+ comments: T::Array[::RBI::Comment],
393
+ block: T.nilable(T.proc.params(node: ::RBI::Extend).void)
394
+ ).void
395
+ end
396
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
397
+
398
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#502
399
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
400
+ def compatible_with?(other); end
401
+
402
+ # source://rbi//lib/rbi/index.rb#143
403
+ sig { override.returns(T::Array[::String]) }
404
+ def index_ids; end
405
+
406
+ # source://rbi//lib/rbi/model.rb#834
407
+ sig { override.returns(::String) }
408
+ def to_s; end
409
+ end
410
+
411
+ # source://rbi//lib/rbi/model.rb#137
412
+ class RBI::File
413
+ # source://rbi//lib/rbi/model.rb#156
414
+ sig do
415
+ params(
416
+ strictness: T.nilable(::String),
417
+ comments: T::Array[::RBI::Comment],
418
+ block: T.nilable(T.proc.params(file: ::RBI::File).void)
419
+ ).void
420
+ end
421
+ def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end
422
+
423
+ # source://rbi//lib/rbi/model.rb#164
424
+ sig { params(node: ::RBI::Node).void }
425
+ def <<(node); end
426
+
427
+ # source://rbi//lib/rbi/printer.rb#105
428
+ sig { params(v: ::RBI::Printer).void }
429
+ def accept_printer(v); end
430
+
431
+ # source://rbi//lib/rbi/model.rb#147
432
+ sig { returns(T::Array[::RBI::Comment]) }
433
+ def comments; end
434
+
435
+ # @return [Array<Comment>]
436
+ #
437
+ # source://rbi//lib/rbi/model.rb#147
438
+ def comments=(_arg0); end
439
+
440
+ # source://rbi//lib/rbi/model.rb#169
441
+ sig { returns(T::Boolean) }
442
+ def empty?; end
443
+
444
+ # source://rbi//lib/rbi/printer.rb#129
445
+ sig do
446
+ params(
447
+ out: T.any(::IO, ::StringIO),
448
+ indent: ::Integer,
449
+ print_locs: T::Boolean,
450
+ max_line_length: T.nilable(::Integer)
451
+ ).void
452
+ end
453
+ def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
454
+
455
+ # source://rbi//lib/rbi/model.rb#141
456
+ sig { returns(::RBI::Tree) }
457
+ def root; end
458
+
459
+ # @return [Tree]
460
+ #
461
+ # source://rbi//lib/rbi/model.rb#141
462
+ def root=(_arg0); end
463
+
464
+ # source://rbi//lib/rbi/model.rb#144
465
+ sig { returns(T.nilable(::String)) }
466
+ def strictness; end
467
+
468
+ # @return [String, nil]
469
+ #
470
+ # source://rbi//lib/rbi/model.rb#144
471
+ def strictness=(_arg0); end
472
+
473
+ # source://rbi//lib/rbi/printer.rb#135
474
+ sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
475
+ def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
476
+ end
477
+
478
+ # source://rbi//lib/rbi/formatter.rb#5
479
+ class RBI::Formatter
480
+ # source://rbi//lib/rbi/formatter.rb#36
481
+ sig do
482
+ params(
483
+ add_sig_templates: T::Boolean,
484
+ group_nodes: T::Boolean,
485
+ max_line_length: T.nilable(::Integer),
486
+ nest_singleton_methods: T::Boolean,
487
+ nest_non_public_methods: T::Boolean,
488
+ sort_nodes: T::Boolean
489
+ ).void
490
+ end
491
+ def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end
492
+
493
+ # source://rbi//lib/rbi/formatter.rb#15
494
+ sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) }
495
+ def add_sig_templates=(add_sig_templates); end
496
+
497
+ # source://rbi//lib/rbi/formatter.rb#59
498
+ sig { params(file: ::RBI::File).void }
499
+ def format_file(file); end
500
+
501
+ # source://rbi//lib/rbi/formatter.rb#64
502
+ sig { params(tree: ::RBI::Tree).void }
503
+ def format_tree(tree); end
504
+
505
+ # source://rbi//lib/rbi/formatter.rb#18
506
+ sig { params(group_nodes: T::Boolean).returns(T::Boolean) }
507
+ def group_nodes=(group_nodes); end
508
+
509
+ # source://rbi//lib/rbi/formatter.rb#24
510
+ sig { returns(T.nilable(::Integer)) }
511
+ def max_line_length; end
512
+
513
+ # @return [Integer, nil]
514
+ #
515
+ # source://rbi//lib/rbi/formatter.rb#24
516
+ def max_line_length=(_arg0); end
517
+
518
+ # source://rbi//lib/rbi/formatter.rb#21
519
+ sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) }
520
+ def nest_non_public_methods=(nest_non_public_methods); end
521
+
522
+ # source://rbi//lib/rbi/formatter.rb#12
523
+ sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) }
524
+ def nest_singleton_methods=(nest_singleton_methods); end
525
+
526
+ # source://rbi//lib/rbi/formatter.rb#53
527
+ sig { params(file: ::RBI::File).returns(::String) }
528
+ def print_file(file); end
529
+
530
+ # source://rbi//lib/rbi/formatter.rb#9
531
+ sig { params(sort_nodes: T::Boolean).returns(T::Boolean) }
532
+ def sort_nodes=(sort_nodes); end
533
+ end
534
+
535
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#88
536
+ class RBI::Group < ::RBI::Tree
537
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#95
538
+ sig { params(kind: ::RBI::Group::Kind).void }
539
+ def initialize(kind); end
540
+
541
+ # source://rbi//lib/rbi/printer.rb#838
542
+ sig { override.params(v: ::RBI::Printer).void }
543
+ def accept_printer(v); end
544
+
545
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#92
546
+ sig { returns(::RBI::Group::Kind) }
547
+ def kind; end
548
+ end
549
+
550
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#100
551
+ class RBI::Group::Kind < ::T::Enum
552
+ enums do
553
+ Mixins = new
554
+ RequiredAncestors = new
555
+ Helpers = new
556
+ TypeMembers = new
557
+ MixesInClassMethods = new
558
+ Sends = new
559
+ Attrs = new
560
+ TStructFields = new
561
+ TEnums = new
562
+ Inits = new
563
+ Methods = new
564
+ SingletonClasses = new
565
+ Consts = new
566
+ end
567
+ end
568
+
569
+ # Sorbet's misc.
570
+ #
571
+ # source://rbi//lib/rbi/model.rb#1294
572
+ class RBI::Helper < ::RBI::NodeWithComments
573
+ include ::RBI::Indexable
574
+
575
+ # source://rbi//lib/rbi/model.rb#1308
576
+ sig do
577
+ params(
578
+ name: ::String,
579
+ loc: T.nilable(::RBI::Loc),
580
+ comments: T::Array[::RBI::Comment],
581
+ block: T.nilable(T.proc.params(node: ::RBI::Helper).void)
582
+ ).void
583
+ end
584
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
585
+
586
+ # source://rbi//lib/rbi/printer.rb#825
587
+ sig { override.params(v: ::RBI::Printer).void }
588
+ def accept_printer(v); end
589
+
590
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#520
591
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
592
+ def compatible_with?(other); end
593
+
594
+ # source://rbi//lib/rbi/index.rb#173
595
+ sig { override.returns(T::Array[::String]) }
596
+ def index_ids; end
597
+
598
+ # source://rbi//lib/rbi/model.rb#1298
599
+ sig { returns(::String) }
600
+ def name; end
601
+
602
+ # source://rbi//lib/rbi/model.rb#1315
603
+ sig { override.returns(::String) }
604
+ def to_s; end
605
+ end
606
+
607
+ # source://rbi//lib/rbi/model.rb#793
608
+ class RBI::Include < ::RBI::Mixin
609
+ include ::RBI::Indexable
610
+
611
+ # source://rbi//lib/rbi/model.rb#805
612
+ sig do
613
+ params(
614
+ name: ::String,
615
+ names: ::String,
616
+ loc: T.nilable(::RBI::Loc),
617
+ comments: T::Array[::RBI::Comment],
618
+ block: T.nilable(T.proc.params(node: ::RBI::Include).void)
619
+ ).void
620
+ end
621
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
622
+
623
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#493
624
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
625
+ def compatible_with?(other); end
626
+
627
+ # source://rbi//lib/rbi/index.rb#133
628
+ sig { override.returns(T::Array[::String]) }
629
+ def index_ids; end
630
+
631
+ # source://rbi//lib/rbi/model.rb#811
632
+ sig { override.returns(::String) }
633
+ def to_s; end
634
+ end
635
+
636
+ # source://rbi//lib/rbi/index.rb#5
637
+ class RBI::Index < ::RBI::Visitor
638
+ # source://rbi//lib/rbi/index.rb#21
639
+ sig { void }
640
+ def initialize; end
641
+
642
+ # source://rbi//lib/rbi/index.rb#32
643
+ sig { params(id: ::String).returns(T::Array[::RBI::Node]) }
644
+ def [](id); end
645
+
646
+ # source://rbi//lib/rbi/index.rb#37
647
+ sig { params(nodes: ::RBI::Node).void }
648
+ def index(*nodes); end
649
+
650
+ # source://rbi//lib/rbi/index.rb#27
651
+ sig { returns(T::Array[::String]) }
652
+ def keys; end
653
+
654
+ # source://rbi//lib/rbi/index.rb#42
655
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
656
+ def visit(node); end
657
+
658
+ private
659
+
660
+ # source://rbi//lib/rbi/index.rb#59
661
+ sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void }
662
+ def index_node(node); end
663
+
664
+ class << self
665
+ # source://rbi//lib/rbi/index.rb#13
666
+ sig { params(node: ::RBI::Node).returns(::RBI::Index) }
667
+ def index(*node); end
668
+ end
669
+ end
670
+
671
+ # A Node that can be refered to by a unique ID inside an index
672
+ #
673
+ # @abstract Subclasses must implement the `abstract` methods below.
674
+ #
675
+ # source://rbi//lib/rbi/index.rb#74
676
+ module RBI::Indexable
677
+ interface!
678
+
679
+ # Unique IDs that refer to this node.
680
+ #
681
+ # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the
682
+ # getter and the setter.
683
+ #
684
+ # @abstract
685
+ #
686
+ # source://rbi//lib/rbi/index.rb#85
687
+ sig { abstract.returns(T::Array[::String]) }
688
+ def index_ids; end
689
+ end
690
+
691
+ # source://rbi//lib/rbi/model.rb#996
692
+ class RBI::KwArg < ::RBI::Arg
693
+ # source://rbi//lib/rbi/model.rb#1009
694
+ sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void }
695
+ def initialize(keyword, value, loc: T.unsafe(nil)); end
696
+
697
+ # source://rbi//lib/rbi/model.rb#1015
698
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
699
+ def ==(other); end
700
+
701
+ # source://rbi//lib/rbi/printer.rb#622
702
+ sig { override.params(v: ::RBI::Printer).void }
703
+ def accept_printer(v); end
704
+
705
+ # source://rbi//lib/rbi/model.rb#1000
706
+ sig { returns(::String) }
707
+ def keyword; end
708
+
709
+ # source://rbi//lib/rbi/model.rb#1020
710
+ sig { returns(::String) }
711
+ def to_s; end
712
+ end
713
+
714
+ # source://rbi//lib/rbi/model.rb#682
715
+ class RBI::KwOptParam < ::RBI::Param
716
+ # source://rbi//lib/rbi/model.rb#697
717
+ sig do
718
+ params(
719
+ name: ::String,
720
+ value: ::String,
721
+ loc: T.nilable(::RBI::Loc),
722
+ comments: T::Array[::RBI::Comment],
723
+ block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void)
724
+ ).void
725
+ end
726
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
727
+
728
+ # source://rbi//lib/rbi/model.rb#709
729
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
730
+ def ==(other); end
731
+
732
+ # source://rbi//lib/rbi/printer.rb#513
733
+ sig { override.params(v: ::RBI::Printer).void }
734
+ def accept_printer(v); end
735
+
736
+ # source://rbi//lib/rbi/printer.rb#518
737
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
738
+ def print_comment_leading_space(v, last:); end
739
+
740
+ # source://rbi//lib/rbi/model.rb#704
741
+ sig { override.returns(::String) }
742
+ def to_s; end
743
+
744
+ # source://rbi//lib/rbi/model.rb#686
745
+ sig { returns(::String) }
746
+ def value; end
747
+ end
748
+
749
+ # source://rbi//lib/rbi/model.rb#655
750
+ class RBI::KwParam < ::RBI::Param
751
+ # source://rbi//lib/rbi/model.rb#666
752
+ sig do
753
+ params(
754
+ name: ::String,
755
+ loc: T.nilable(::RBI::Loc),
756
+ comments: T::Array[::RBI::Comment],
757
+ block: T.nilable(T.proc.params(node: ::RBI::KwParam).void)
758
+ ).void
759
+ end
760
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
761
+
762
+ # source://rbi//lib/rbi/model.rb#677
763
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
764
+ def ==(other); end
765
+
766
+ # source://rbi//lib/rbi/printer.rb#498
767
+ sig { override.params(v: ::RBI::Printer).void }
768
+ def accept_printer(v); end
769
+
770
+ # source://rbi//lib/rbi/printer.rb#503
771
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
772
+ def print_comment_leading_space(v, last:); end
773
+
774
+ # source://rbi//lib/rbi/model.rb#672
775
+ sig { override.returns(::String) }
776
+ def to_s; end
777
+ end
778
+
779
+ # source://rbi//lib/rbi/model.rb#714
780
+ class RBI::KwRestParam < ::RBI::Param
781
+ # source://rbi//lib/rbi/model.rb#725
782
+ sig do
783
+ params(
784
+ name: ::String,
785
+ loc: T.nilable(::RBI::Loc),
786
+ comments: T::Array[::RBI::Comment],
787
+ block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void)
788
+ ).void
789
+ end
790
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
791
+
792
+ # source://rbi//lib/rbi/model.rb#736
793
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
794
+ def ==(other); end
795
+
796
+ # source://rbi//lib/rbi/printer.rb#528
797
+ sig { override.params(v: ::RBI::Printer).void }
798
+ def accept_printer(v); end
799
+
800
+ # source://rbi//lib/rbi/printer.rb#533
801
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
802
+ def print_comment_leading_space(v, last:); end
803
+
804
+ # source://rbi//lib/rbi/model.rb#731
805
+ sig { override.returns(::String) }
806
+ def to_s; end
807
+ end
808
+
809
+ # source://rbi//lib/rbi/loc.rb#5
810
+ class RBI::Loc
811
+ # source://rbi//lib/rbi/loc.rb#38
812
+ sig do
813
+ params(
814
+ file: T.nilable(::String),
815
+ begin_line: T.nilable(::Integer),
816
+ end_line: T.nilable(::Integer),
817
+ begin_column: T.nilable(::Integer),
818
+ end_column: T.nilable(::Integer)
819
+ ).void
820
+ end
821
+ def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end
822
+
823
+ # @return [Integer, nil]
824
+ #
825
+ # source://rbi//lib/rbi/loc.rb#27
826
+ def begin_column; end
827
+
828
+ # source://rbi//lib/rbi/loc.rb#27
829
+ sig { returns(T.nilable(::Integer)) }
830
+ def begin_line; end
831
+
832
+ # @return [Integer, nil]
833
+ #
834
+ # source://rbi//lib/rbi/loc.rb#27
835
+ def end_column; end
836
+
837
+ # @return [Integer, nil]
838
+ #
839
+ # source://rbi//lib/rbi/loc.rb#27
840
+ def end_line; end
841
+
842
+ # source://rbi//lib/rbi/loc.rb#24
843
+ sig { returns(T.nilable(::String)) }
844
+ def file; end
845
+
846
+ # source://rbi//lib/rbi/loc.rb#56
847
+ sig { returns(T.nilable(::String)) }
848
+ def source; end
849
+
850
+ # source://rbi//lib/rbi/loc.rb#47
851
+ sig { returns(::String) }
852
+ def to_s; end
853
+
854
+ class << self
855
+ # source://rbi//lib/rbi/loc.rb#12
856
+ sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) }
857
+ def from_prism(file, prism_location); end
858
+ end
859
+ end
860
+
861
+ # A tree that _might_ contain conflicts
862
+ #
863
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#330
864
+ class RBI::MergeTree < ::RBI::Tree
865
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#344
866
+ sig do
867
+ params(
868
+ loc: T.nilable(::RBI::Loc),
869
+ comments: T::Array[::RBI::Comment],
870
+ conflicts: T::Array[::RBI::Rewriters::Merge::Conflict],
871
+ block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
872
+ ).void
873
+ end
874
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end
875
+
876
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#334
877
+ sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
878
+ def conflicts; end
879
+ end
880
+
881
+ # Methods and args
882
+ #
883
+ # source://rbi//lib/rbi/model.rb#483
884
+ class RBI::Method < ::RBI::NodeWithComments
885
+ include ::RBI::Indexable
886
+
887
+ # source://rbi//lib/rbi/model.rb#513
888
+ sig do
889
+ params(
890
+ name: ::String,
891
+ params: T::Array[::RBI::Param],
892
+ is_singleton: T::Boolean,
893
+ visibility: ::RBI::Visibility,
894
+ sigs: T::Array[::RBI::Sig],
895
+ loc: T.nilable(::RBI::Loc),
896
+ comments: T::Array[::RBI::Comment],
897
+ block: T.nilable(T.proc.params(node: ::RBI::Method).void)
898
+ ).void
899
+ end
900
+ def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
901
+
902
+ # source://rbi//lib/rbi/model.rb#533
903
+ sig { params(param: ::RBI::Param).void }
904
+ def <<(param); end
905
+
906
+ # source://rbi//lib/rbi/printer.rb#384
907
+ sig { override.params(v: ::RBI::Printer).void }
908
+ def accept_printer(v); end
909
+
910
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#461
911
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
912
+ def compatible_with?(other); end
913
+
914
+ # source://rbi//lib/rbi/model.rb#538
915
+ sig { returns(::String) }
916
+ def fully_qualified_name; end
917
+
918
+ # source://rbi//lib/rbi/index.rb#123
919
+ sig { override.returns(T::Array[::String]) }
920
+ def index_ids; end
921
+
922
+ # source://rbi//lib/rbi/printer.rb#437
923
+ sig { returns(T::Boolean) }
924
+ def inline_params?; end
925
+
926
+ # source://rbi//lib/rbi/model.rb#493
927
+ sig { returns(T::Boolean) }
928
+ def is_singleton; end
929
+
930
+ # @return [Boolean]
931
+ #
932
+ # source://rbi//lib/rbi/model.rb#493
933
+ def is_singleton=(_arg0); end
934
+
935
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#470
936
+ sig { override.params(other: ::RBI::Node).void }
937
+ def merge_with(other); end
938
+
939
+ # source://rbi//lib/rbi/model.rb#487
940
+ sig { returns(::String) }
941
+ def name; end
942
+
943
+ # @return [String]
944
+ #
945
+ # source://rbi//lib/rbi/model.rb#487
946
+ def name=(_arg0); end
947
+
948
+ # source://rbi//lib/rbi/printer.rb#432
949
+ sig { override.returns(T::Boolean) }
950
+ def oneline?; end
951
+
952
+ # source://rbi//lib/rbi/model.rb#490
953
+ sig { returns(T::Array[::RBI::Param]) }
954
+ def params; end
955
+
956
+ # source://rbi//lib/rbi/model.rb#499
957
+ sig { returns(T::Array[::RBI::Sig]) }
958
+ def sigs; end
959
+
960
+ # @return [Array<Sig>]
961
+ #
962
+ # source://rbi//lib/rbi/model.rb#499
963
+ def sigs=(_arg0); end
964
+
965
+ # source://rbi//lib/rbi/model.rb#547
966
+ sig { override.returns(::String) }
967
+ def to_s; end
968
+
969
+ # source://rbi//lib/rbi/model.rb#496
970
+ sig { returns(::RBI::Visibility) }
971
+ def visibility; end
972
+
973
+ # @return [Visibility]
974
+ #
975
+ # source://rbi//lib/rbi/model.rb#496
976
+ def visibility=(_arg0); end
977
+ end
978
+
979
+ # source://rbi//lib/rbi/model.rb#1355
980
+ class RBI::MixesInClassMethods < ::RBI::Mixin
981
+ include ::RBI::Indexable
982
+
983
+ # source://rbi//lib/rbi/model.rb#1367
984
+ sig do
985
+ params(
986
+ name: ::String,
987
+ names: ::String,
988
+ loc: T.nilable(::RBI::Loc),
989
+ comments: T::Array[::RBI::Comment],
990
+ block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void)
991
+ ).void
992
+ end
993
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
994
+
995
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#511
996
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
997
+ def compatible_with?(other); end
998
+
999
+ # source://rbi//lib/rbi/index.rb#153
1000
+ sig { override.returns(T::Array[::String]) }
1001
+ def index_ids; end
1002
+
1003
+ # source://rbi//lib/rbi/model.rb#1373
1004
+ sig { override.returns(::String) }
1005
+ def to_s; end
1006
+ end
1007
+
1008
+ # Mixins
1009
+ #
1010
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1011
+ #
1012
+ # source://rbi//lib/rbi/model.rb#770
1013
+ class RBI::Mixin < ::RBI::NodeWithComments
1014
+ abstract!
1015
+
1016
+ # source://rbi//lib/rbi/model.rb#787
1017
+ sig do
1018
+ params(
1019
+ name: ::String,
1020
+ names: T::Array[::String],
1021
+ loc: T.nilable(::RBI::Loc),
1022
+ comments: T::Array[::RBI::Comment]
1023
+ ).void
1024
+ end
1025
+ def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1026
+
1027
+ # source://rbi//lib/rbi/printer.rb#558
1028
+ sig { override.params(v: ::RBI::Printer).void }
1029
+ def accept_printer(v); end
1030
+
1031
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#484
1032
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
1033
+ def compatible_with?(other); end
1034
+
1035
+ # source://rbi//lib/rbi/model.rb#777
1036
+ sig { returns(T::Array[::String]) }
1037
+ def names; end
1038
+ end
1039
+
1040
+ # source://rbi//lib/rbi/model.rb#190
1041
+ class RBI::Module < ::RBI::Scope
1042
+ # source://rbi//lib/rbi/model.rb#204
1043
+ sig do
1044
+ params(
1045
+ name: ::String,
1046
+ loc: T.nilable(::RBI::Loc),
1047
+ comments: T::Array[::RBI::Comment],
1048
+ block: T.nilable(T.proc.params(node: ::RBI::Module).void)
1049
+ ).void
1050
+ end
1051
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1052
+
1053
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#385
1054
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
1055
+ def compatible_with?(other); end
1056
+
1057
+ # source://rbi//lib/rbi/model.rb#211
1058
+ sig { override.returns(::String) }
1059
+ def fully_qualified_name; end
1060
+
1061
+ # source://rbi//lib/rbi/model.rb#194
1062
+ sig { returns(::String) }
1063
+ def name; end
1064
+
1065
+ # @return [String]
1066
+ #
1067
+ # source://rbi//lib/rbi/model.rb#194
1068
+ def name=(_arg0); end
1069
+
1070
+ # source://rbi//lib/rbi/printer.rb#270
1071
+ sig { override.params(v: ::RBI::Printer).void }
1072
+ def print_header(v); end
1073
+ end
1074
+
1075
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1076
+ #
1077
+ # source://rbi//lib/rbi/model.rb#5
1078
+ class RBI::Node
1079
+ abstract!
1080
+
1081
+ # source://rbi//lib/rbi/model.rb#18
1082
+ sig { params(loc: T.nilable(::RBI::Loc)).void }
1083
+ def initialize(loc: T.unsafe(nil)); end
1084
+
1085
+ # @abstract
1086
+ #
1087
+ # source://rbi//lib/rbi/printer.rb#146
1088
+ sig { abstract.params(v: ::RBI::Printer).void }
1089
+ def accept_printer(v); end
1090
+
1091
+ # Can `self` and `_other` be merged into a single definition?
1092
+ #
1093
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#287
1094
+ sig { params(_other: ::RBI::Node).returns(T::Boolean) }
1095
+ def compatible_with?(_other); end
1096
+
1097
+ # source://rbi//lib/rbi/model.rb#24
1098
+ sig { void }
1099
+ def detach; end
1100
+
1101
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#48
1102
+ sig { returns(::RBI::Group::Kind) }
1103
+ def group_kind; end
1104
+
1105
+ # source://rbi//lib/rbi/model.rb#15
1106
+ sig { returns(T.nilable(::RBI::Loc)) }
1107
+ def loc; end
1108
+
1109
+ # @return [Loc, nil]
1110
+ #
1111
+ # source://rbi//lib/rbi/model.rb#15
1112
+ def loc=(_arg0); end
1113
+
1114
+ # Merge `self` and `other` into a single definition
1115
+ #
1116
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#293
1117
+ sig { params(other: ::RBI::Node).void }
1118
+ def merge_with(other); end
1119
+
1120
+ # source://rbi//lib/rbi/printer.rb#179
1121
+ sig { returns(T::Boolean) }
1122
+ def oneline?; end
1123
+
1124
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#296
1125
+ sig { returns(T.nilable(::RBI::ConflictTree)) }
1126
+ def parent_conflict_tree; end
1127
+
1128
+ # source://rbi//lib/rbi/model.rb#46
1129
+ sig { returns(T.nilable(::RBI::Scope)) }
1130
+ def parent_scope; end
1131
+
1132
+ # source://rbi//lib/rbi/model.rb#12
1133
+ sig { returns(T.nilable(::RBI::Tree)) }
1134
+ def parent_tree; end
1135
+
1136
+ # @return [Tree, nil]
1137
+ #
1138
+ # source://rbi//lib/rbi/model.rb#12
1139
+ def parent_tree=(_arg0); end
1140
+
1141
+ # source://rbi//lib/rbi/printer.rb#156
1142
+ sig do
1143
+ params(
1144
+ out: T.any(::IO, ::StringIO),
1145
+ indent: ::Integer,
1146
+ print_locs: T::Boolean,
1147
+ max_line_length: T.nilable(::Integer)
1148
+ ).void
1149
+ end
1150
+ def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
1151
+
1152
+ # source://rbi//lib/rbi/printer.rb#169
1153
+ sig { params(v: ::RBI::Printer).void }
1154
+ def print_blank_line_before(v); end
1155
+
1156
+ # source://rbi//lib/rbi/model.rb#33
1157
+ sig { params(node: ::RBI::Node).void }
1158
+ def replace(node); end
1159
+
1160
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#94
1161
+ sig { params(version: ::Gem::Version).returns(T::Boolean) }
1162
+ def satisfies_version?(version); end
1163
+
1164
+ # source://rbi//lib/rbi/printer.rb#162
1165
+ sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
1166
+ def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
1167
+ end
1168
+
1169
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1170
+ #
1171
+ # source://rbi//lib/rbi/model.rb#83
1172
+ class RBI::NodeWithComments < ::RBI::Node
1173
+ abstract!
1174
+
1175
+ # source://rbi//lib/rbi/model.rb#93
1176
+ sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
1177
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1178
+
1179
+ # source://rbi//lib/rbi/model.rb#99
1180
+ sig { returns(T::Array[::String]) }
1181
+ def annotations; end
1182
+
1183
+ # source://rbi//lib/rbi/model.rb#90
1184
+ sig { returns(T::Array[::RBI::Comment]) }
1185
+ def comments; end
1186
+
1187
+ # @return [Array<Comment>]
1188
+ #
1189
+ # source://rbi//lib/rbi/model.rb#90
1190
+ def comments=(_arg0); end
1191
+
1192
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#311
1193
+ sig { override.params(other: ::RBI::Node).void }
1194
+ def merge_with(other); end
1195
+
1196
+ # source://rbi//lib/rbi/printer.rb#188
1197
+ sig { override.returns(T::Boolean) }
1198
+ def oneline?; end
1199
+
1200
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#104
1201
+ sig { returns(T::Array[::Gem::Requirement]) }
1202
+ def version_requirements; end
1203
+ end
1204
+
1205
+ # source://rbi//lib/rbi/model.rb#601
1206
+ class RBI::OptParam < ::RBI::Param
1207
+ # source://rbi//lib/rbi/model.rb#616
1208
+ sig do
1209
+ params(
1210
+ name: ::String,
1211
+ value: ::String,
1212
+ loc: T.nilable(::RBI::Loc),
1213
+ comments: T::Array[::RBI::Comment],
1214
+ block: T.nilable(T.proc.params(node: ::RBI::OptParam).void)
1215
+ ).void
1216
+ end
1217
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1218
+
1219
+ # source://rbi//lib/rbi/model.rb#623
1220
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
1221
+ def ==(other); end
1222
+
1223
+ # source://rbi//lib/rbi/printer.rb#468
1224
+ sig { override.params(v: ::RBI::Printer).void }
1225
+ def accept_printer(v); end
1226
+
1227
+ # source://rbi//lib/rbi/printer.rb#473
1228
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
1229
+ def print_comment_leading_space(v, last:); end
1230
+
1231
+ # source://rbi//lib/rbi/model.rb#605
1232
+ sig { returns(::String) }
1233
+ def value; end
1234
+ end
1235
+
1236
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1237
+ #
1238
+ # source://rbi//lib/rbi/model.rb#552
1239
+ class RBI::Param < ::RBI::NodeWithComments
1240
+ abstract!
1241
+
1242
+ # source://rbi//lib/rbi/model.rb#568
1243
+ sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
1244
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1245
+
1246
+ # source://rbi//lib/rbi/printer.rb#446
1247
+ sig { override.params(v: ::RBI::Printer).void }
1248
+ def accept_printer(v); end
1249
+
1250
+ # source://rbi//lib/rbi/printer.rb#459
1251
+ sig { returns(T::Array[::String]) }
1252
+ def comments_lines; end
1253
+
1254
+ # source://rbi//lib/rbi/model.rb#559
1255
+ sig { returns(::String) }
1256
+ def name; end
1257
+
1258
+ # source://rbi//lib/rbi/printer.rb#451
1259
+ sig { params(v: ::RBI::Printer, last: T::Boolean).void }
1260
+ def print_comment_leading_space(v, last:); end
1261
+
1262
+ # source://rbi//lib/rbi/model.rb#574
1263
+ sig { override.returns(::String) }
1264
+ def to_s; end
1265
+ end
1266
+
1267
+ # source://rbi//lib/rbi/parser.rb#7
1268
+ class RBI::ParseError < ::StandardError
1269
+ # source://rbi//lib/rbi/parser.rb#14
1270
+ sig { params(message: ::String, location: ::RBI::Loc).void }
1271
+ def initialize(message, location); end
1272
+
1273
+ # source://rbi//lib/rbi/parser.rb#11
1274
+ sig { returns(::RBI::Loc) }
1275
+ def location; end
1276
+ end
1277
+
1278
+ # source://rbi//lib/rbi/parser.rb#53
1279
+ class RBI::Parser
1280
+ # source://rbi//lib/rbi/parser.rb#88
1281
+ sig { params(path: ::String).returns(::RBI::Tree) }
1282
+ def parse_file(path); end
1283
+
1284
+ # source://rbi//lib/rbi/parser.rb#83
1285
+ sig { params(string: ::String).returns(::RBI::Tree) }
1286
+ def parse_string(string); end
1287
+
1288
+ private
1289
+
1290
+ # source://rbi//lib/rbi/parser.rb#95
1291
+ sig { params(source: ::String, file: ::String).returns(::RBI::Tree) }
1292
+ def parse(source, file:); end
1293
+
1294
+ class << self
1295
+ # source://rbi//lib/rbi/parser.rb#65
1296
+ sig { params(path: ::String).returns(::RBI::Tree) }
1297
+ def parse_file(path); end
1298
+
1299
+ # source://rbi//lib/rbi/parser.rb#70
1300
+ sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
1301
+ def parse_files(paths); end
1302
+
1303
+ # source://rbi//lib/rbi/parser.rb#60
1304
+ sig { params(string: ::String).returns(::RBI::Tree) }
1305
+ def parse_string(string); end
1306
+
1307
+ # source://rbi//lib/rbi/parser.rb#76
1308
+ sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
1309
+ def parse_strings(strings); end
1310
+ end
1311
+ end
1312
+
1313
+ # source://rbi//lib/rbi/parser.rb#791
1314
+ class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor
1315
+ # source://rbi//lib/rbi/parser.rb#798
1316
+ sig { params(content: ::String, file: ::String).void }
1317
+ def initialize(content, file:); end
1318
+
1319
+ # source://rbi//lib/rbi/parser.rb#795
1320
+ sig { returns(::RBI::Sig) }
1321
+ def current; end
1322
+
1323
+ # source://rbi//lib/rbi/parser.rb#850
1324
+ sig { override.params(node: ::Prism::AssocNode).void }
1325
+ def visit_assoc_node(node); end
1326
+
1327
+ # source://rbi//lib/rbi/parser.rb#805
1328
+ sig { override.params(node: ::Prism::CallNode).void }
1329
+ def visit_call_node(node); end
1330
+ end
1331
+
1332
+ # source://rbi//lib/rbi/parser.rb#153
1333
+ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor
1334
+ # source://rbi//lib/rbi/parser.rb#163
1335
+ sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void }
1336
+ def initialize(source, comments:, file:); end
1337
+
1338
+ # source://rbi//lib/rbi/parser.rb#160
1339
+ sig { returns(T.nilable(::Prism::Node)) }
1340
+ def last_node; end
1341
+
1342
+ # source://rbi//lib/rbi/parser.rb#157
1343
+ sig { returns(::RBI::Tree) }
1344
+ def tree; end
1345
+
1346
+ # source://rbi//lib/rbi/parser.rb#299
1347
+ sig { params(node: ::Prism::CallNode).void }
1348
+ def visit_call_node(node); end
1349
+
1350
+ # source://rbi//lib/rbi/parser.rb#176
1351
+ sig { override.params(node: ::Prism::ClassNode).void }
1352
+ def visit_class_node(node); end
1353
+
1354
+ # source://rbi//lib/rbi/parser.rb#208
1355
+ sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void }
1356
+ def visit_constant_assign(node); end
1357
+
1358
+ # source://rbi//lib/rbi/parser.rb#201
1359
+ sig { override.params(node: ::Prism::ConstantPathWriteNode).void }
1360
+ def visit_constant_path_write_node(node); end
1361
+
1362
+ # source://rbi//lib/rbi/parser.rb#194
1363
+ sig { override.params(node: ::Prism::ConstantWriteNode).void }
1364
+ def visit_constant_write_node(node); end
1365
+
1366
+ # source://rbi//lib/rbi/parser.rb#241
1367
+ sig { override.params(node: ::Prism::DefNode).void }
1368
+ def visit_def_node(node); end
1369
+
1370
+ # source://rbi//lib/rbi/parser.rb#255
1371
+ sig { override.params(node: ::Prism::ModuleNode).void }
1372
+ def visit_module_node(node); end
1373
+
1374
+ # source://rbi//lib/rbi/parser.rb#272
1375
+ sig { override.params(node: ::Prism::ProgramNode).void }
1376
+ def visit_program_node(node); end
1377
+
1378
+ # source://rbi//lib/rbi/parser.rb#283
1379
+ sig { override.params(node: ::Prism::SingletonClassNode).void }
1380
+ def visit_singleton_class_node(node); end
1381
+
1382
+ private
1383
+
1384
+ # Collect all the remaining comments within a node
1385
+ #
1386
+ # source://rbi//lib/rbi/parser.rb#467
1387
+ sig { params(node: ::Prism::Node).void }
1388
+ def collect_dangling_comments(node); end
1389
+
1390
+ # Collect all the remaining comments after visiting the tree
1391
+ #
1392
+ # source://rbi//lib/rbi/parser.rb#485
1393
+ sig { void }
1394
+ def collect_orphan_comments; end
1395
+
1396
+ # source://rbi//lib/rbi/parser.rb#508
1397
+ sig { returns(::RBI::Tree) }
1398
+ def current_scope; end
1399
+
1400
+ # source://rbi//lib/rbi/parser.rb#513
1401
+ sig { returns(T::Array[::RBI::Sig]) }
1402
+ def current_sigs; end
1403
+
1404
+ # source://rbi//lib/rbi/parser.rb#520
1405
+ sig { returns(T::Array[::RBI::Comment]) }
1406
+ def current_sigs_comments; end
1407
+
1408
+ # source://rbi//lib/rbi/parser.rb#527
1409
+ sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) }
1410
+ def node_comments(node); end
1411
+
1412
+ # source://rbi//lib/rbi/parser.rb#545
1413
+ sig { params(node: ::Prism::Comment).returns(::RBI::Comment) }
1414
+ def parse_comment(node); end
1415
+
1416
+ # source://rbi//lib/rbi/parser.rb#574
1417
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) }
1418
+ def parse_params(node); end
1419
+
1420
+ # source://rbi//lib/rbi/parser.rb#550
1421
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) }
1422
+ def parse_send_args(node); end
1423
+
1424
+ # source://rbi//lib/rbi/parser.rb#648
1425
+ sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) }
1426
+ def parse_sig(node); end
1427
+
1428
+ # source://rbi//lib/rbi/parser.rb#658
1429
+ sig do
1430
+ params(
1431
+ node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)
1432
+ ).returns(T.nilable(::RBI::Struct))
1433
+ end
1434
+ def parse_struct(node); end
1435
+
1436
+ # source://rbi//lib/rbi/parser.rb#708
1437
+ sig { params(send: ::Prism::CallNode).void }
1438
+ def parse_tstruct_field(send); end
1439
+
1440
+ # source://rbi//lib/rbi/parser.rb#745
1441
+ sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) }
1442
+ def parse_visibility(name, node); end
1443
+
1444
+ # source://rbi//lib/rbi/parser.rb#759
1445
+ sig { void }
1446
+ def separate_header_comments; end
1447
+
1448
+ # source://rbi//lib/rbi/parser.rb#769
1449
+ sig { void }
1450
+ def set_root_tree_loc; end
1451
+
1452
+ # source://rbi//lib/rbi/parser.rb#783
1453
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
1454
+ def type_variable_definition?(node); end
1455
+ end
1456
+
1457
+ # source://rbi//lib/rbi/parser.rb#122
1458
+ class RBI::Parser::Visitor < ::Prism::Visitor
1459
+ # source://rbi//lib/rbi/parser.rb#126
1460
+ sig { params(source: ::String, file: ::String).void }
1461
+ def initialize(source, file:); end
1462
+
1463
+ private
1464
+
1465
+ # source://rbi//lib/rbi/parser.rb#136
1466
+ sig { params(node: ::Prism::Node).returns(::RBI::Loc) }
1467
+ def node_loc(node); end
1468
+
1469
+ # source://rbi//lib/rbi/parser.rb#141
1470
+ sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) }
1471
+ def node_string(node); end
1472
+
1473
+ # source://rbi//lib/rbi/parser.rb#148
1474
+ sig { params(node: ::Prism::Node).returns(::String) }
1475
+ def node_string!(node); end
1476
+ end
1477
+
1478
+ # source://rbi//lib/rbi/printer.rb#5
1479
+ class RBI::Printer < ::RBI::Visitor
1480
+ # source://rbi//lib/rbi/printer.rb#28
1481
+ sig do
1482
+ params(
1483
+ out: T.any(::IO, ::StringIO),
1484
+ indent: ::Integer,
1485
+ print_locs: T::Boolean,
1486
+ max_line_length: T.nilable(::Integer)
1487
+ ).void
1488
+ end
1489
+ def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
1490
+
1491
+ # source://rbi//lib/rbi/printer.rb#15
1492
+ sig { returns(::Integer) }
1493
+ def current_indent; end
1494
+
1495
+ # source://rbi//lib/rbi/printer.rb#46
1496
+ sig { void }
1497
+ def dedent; end
1498
+
1499
+ # @return [Boolean]
1500
+ #
1501
+ # source://rbi//lib/rbi/printer.rb#9
1502
+ def in_visibility_group; end
1503
+
1504
+ # @return [Boolean]
1505
+ #
1506
+ # source://rbi//lib/rbi/printer.rb#9
1507
+ def in_visibility_group=(_arg0); end
1508
+
1509
+ # Printing
1510
+ #
1511
+ # source://rbi//lib/rbi/printer.rb#41
1512
+ sig { void }
1513
+ def indent; end
1514
+
1515
+ # source://rbi//lib/rbi/printer.rb#18
1516
+ sig { returns(T.nilable(::Integer)) }
1517
+ def max_line_length; end
1518
+
1519
+ # source://rbi//lib/rbi/printer.rb#12
1520
+ sig { returns(T.nilable(::RBI::Node)) }
1521
+ def previous_node; end
1522
+
1523
+ # Print a string without indentation nor `\n` at the end.
1524
+ #
1525
+ # source://rbi//lib/rbi/printer.rb#52
1526
+ sig { params(string: ::String).void }
1527
+ def print(string); end
1528
+
1529
+ # source://rbi//lib/rbi/printer.rb#9
1530
+ sig { returns(T::Boolean) }
1531
+ def print_locs; end
1532
+
1533
+ # @return [Boolean]
1534
+ #
1535
+ # source://rbi//lib/rbi/printer.rb#9
1536
+ def print_locs=(_arg0); end
1537
+
1538
+ # Print a string with indentation and `\n` at the end.
1539
+ #
1540
+ # source://rbi//lib/rbi/printer.rb#72
1541
+ sig { params(string: ::String).void }
1542
+ def printl(string); end
1543
+
1544
+ # Print a string without indentation but with a `\n` at the end.
1545
+ #
1546
+ # source://rbi//lib/rbi/printer.rb#58
1547
+ sig { params(string: T.nilable(::String)).void }
1548
+ def printn(string = T.unsafe(nil)); end
1549
+
1550
+ # Print a string with indentation but without a `\n` at the end.
1551
+ #
1552
+ # source://rbi//lib/rbi/printer.rb#65
1553
+ sig { params(string: T.nilable(::String)).void }
1554
+ def printt(string = T.unsafe(nil)); end
1555
+
1556
+ # source://rbi//lib/rbi/printer.rb#83
1557
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1558
+ def visit(node); end
1559
+
1560
+ # source://rbi//lib/rbi/printer.rb#90
1561
+ sig { override.params(nodes: T::Array[::RBI::Node]).void }
1562
+ def visit_all(nodes); end
1563
+
1564
+ # source://rbi//lib/rbi/printer.rb#78
1565
+ sig { params(file: ::RBI::File).void }
1566
+ def visit_file(file); end
1567
+ end
1568
+
1569
+ # source://rbi//lib/rbi/model.rb#909
1570
+ class RBI::Private < ::RBI::Visibility
1571
+ # source://rbi//lib/rbi/model.rb#919
1572
+ sig do
1573
+ params(
1574
+ loc: T.nilable(::RBI::Loc),
1575
+ comments: T::Array[::RBI::Comment],
1576
+ block: T.nilable(T.proc.params(node: ::RBI::Private).void)
1577
+ ).void
1578
+ end
1579
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1580
+ end
1581
+
1582
+ # source://rbi//lib/rbi/model.rb#893
1583
+ class RBI::Protected < ::RBI::Visibility
1584
+ # source://rbi//lib/rbi/model.rb#903
1585
+ sig do
1586
+ params(
1587
+ loc: T.nilable(::RBI::Loc),
1588
+ comments: T::Array[::RBI::Comment],
1589
+ block: T.nilable(T.proc.params(node: ::RBI::Protected).void)
1590
+ ).void
1591
+ end
1592
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1593
+ end
1594
+
1595
+ # source://rbi//lib/rbi/model.rb#877
1596
+ class RBI::Public < ::RBI::Visibility
1597
+ # source://rbi//lib/rbi/model.rb#887
1598
+ sig do
1599
+ params(
1600
+ loc: T.nilable(::RBI::Loc),
1601
+ comments: T::Array[::RBI::Comment],
1602
+ block: T.nilable(T.proc.params(node: ::RBI::Public).void)
1603
+ ).void
1604
+ end
1605
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1606
+ end
1607
+
1608
+ # source://rbi//lib/rbi/model.rb#579
1609
+ class RBI::ReqParam < ::RBI::Param
1610
+ # source://rbi//lib/rbi/model.rb#590
1611
+ sig do
1612
+ params(
1613
+ name: ::String,
1614
+ loc: T.nilable(::RBI::Loc),
1615
+ comments: T::Array[::RBI::Comment],
1616
+ block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void)
1617
+ ).void
1618
+ end
1619
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1620
+
1621
+ # source://rbi//lib/rbi/model.rb#596
1622
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
1623
+ def ==(other); end
1624
+ end
1625
+
1626
+ # source://rbi//lib/rbi/model.rb#1378
1627
+ class RBI::RequiresAncestor < ::RBI::NodeWithComments
1628
+ include ::RBI::Indexable
1629
+
1630
+ # source://rbi//lib/rbi/model.rb#1391
1631
+ sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
1632
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1633
+
1634
+ # source://rbi//lib/rbi/printer.rb#870
1635
+ sig { override.params(v: ::RBI::Printer).void }
1636
+ def accept_printer(v); end
1637
+
1638
+ # source://rbi//lib/rbi/index.rb#163
1639
+ sig { override.returns(T::Array[::String]) }
1640
+ def index_ids; end
1641
+
1642
+ # source://rbi//lib/rbi/model.rb#1382
1643
+ sig { returns(::String) }
1644
+ def name; end
1645
+
1646
+ # source://rbi//lib/rbi/model.rb#1397
1647
+ sig { override.returns(::String) }
1648
+ def to_s; end
1649
+ end
1650
+
1651
+ # source://rbi//lib/rbi/model.rb#628
1652
+ class RBI::RestParam < ::RBI::Param
1653
+ # source://rbi//lib/rbi/model.rb#639
1654
+ sig do
1655
+ params(
1656
+ name: ::String,
1657
+ loc: T.nilable(::RBI::Loc),
1658
+ comments: T::Array[::RBI::Comment],
1659
+ block: T.nilable(T.proc.params(node: ::RBI::RestParam).void)
1660
+ ).void
1661
+ end
1662
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1663
+
1664
+ # source://rbi//lib/rbi/model.rb#650
1665
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
1666
+ def ==(other); end
1667
+
1668
+ # source://rbi//lib/rbi/printer.rb#483
1669
+ sig { override.params(v: ::RBI::Printer).void }
1670
+ def accept_printer(v); end
1671
+
1672
+ # source://rbi//lib/rbi/printer.rb#488
1673
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
1674
+ def print_comment_leading_space(v, last:); end
1675
+
1676
+ # source://rbi//lib/rbi/model.rb#645
1677
+ sig { override.returns(::String) }
1678
+ def to_s; end
1679
+ end
1680
+
1681
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5
1682
+ module RBI::Rewriters; end
1683
+
1684
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6
1685
+ class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor
1686
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10
1687
+ sig { params(with_todo_comment: T::Boolean).void }
1688
+ def initialize(with_todo_comment: T.unsafe(nil)); end
1689
+
1690
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16
1691
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1692
+ def visit(node); end
1693
+
1694
+ private
1695
+
1696
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30
1697
+ sig { params(attr: ::RBI::Attr).void }
1698
+ def add_attr_sig(attr); end
1699
+
1700
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45
1701
+ sig { params(method: ::RBI::Method).void }
1702
+ def add_method_sig(method); end
1703
+
1704
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56
1705
+ sig { params(node: ::RBI::NodeWithComments).void }
1706
+ def add_todo_comment(node); end
1707
+ end
1708
+
1709
+ # source://rbi//lib/rbi/rewriters/annotate.rb#6
1710
+ class RBI::Rewriters::Annotate < ::RBI::Visitor
1711
+ # source://rbi//lib/rbi/rewriters/annotate.rb#10
1712
+ sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
1713
+ def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
1714
+
1715
+ # source://rbi//lib/rbi/rewriters/annotate.rb#18
1716
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1717
+ def visit(node); end
1718
+
1719
+ private
1720
+
1721
+ # source://rbi//lib/rbi/rewriters/annotate.rb#31
1722
+ sig { params(node: ::RBI::NodeWithComments).void }
1723
+ def annotate_node(node); end
1724
+
1725
+ # source://rbi//lib/rbi/rewriters/annotate.rb#38
1726
+ sig { params(node: ::RBI::Node).returns(T::Boolean) }
1727
+ def root?(node); end
1728
+ end
1729
+
1730
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#6
1731
+ class RBI::Rewriters::Deannotate < ::RBI::Visitor
1732
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#10
1733
+ sig { params(annotation: ::String).void }
1734
+ def initialize(annotation); end
1735
+
1736
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#16
1737
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1738
+ def visit(node); end
1739
+
1740
+ private
1741
+
1742
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#27
1743
+ sig { params(node: ::RBI::NodeWithComments).void }
1744
+ def deannotate_node(node); end
1745
+ end
1746
+
1747
+ # Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations
1748
+ # in comments. As an example:
1749
+ #
1750
+ # ~~~rb
1751
+ # tree = Parser.parse_string(<<~RBI)
1752
+ # class Foo
1753
+ # # @version > 0.3.0
1754
+ # def bar
1755
+ # end
1756
+ #
1757
+ # # @version <= 0.3.0
1758
+ # def bar(arg1)
1759
+ # end
1760
+ # end
1761
+ # RBI
1762
+ #
1763
+ # Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1"))
1764
+ #
1765
+ # assert_equal(<<~RBI, tree.string)
1766
+ # class Foo
1767
+ # # @version > 0.3.0
1768
+ # def bar
1769
+ # end
1770
+ # end
1771
+ # RBI
1772
+ # ~~~
1773
+ #
1774
+ # Supported operators:
1775
+ # - equals `=`
1776
+ # - not equals `!=`
1777
+ # - greater than `>`
1778
+ # - greater than or equal to `>=`
1779
+ # - less than `<`
1780
+ # - less than or equal to `<=`
1781
+ # - pessimistic or twiddle-wakka`~>`
1782
+ #
1783
+ # And/or logic:
1784
+ # - "And" logic: put multiple versions on the same line
1785
+ # - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0
1786
+ # - "Or" logic: put multiple versions on subsequent lines
1787
+ # - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0
1788
+ # ```
1789
+ # # @version < 0.3.0
1790
+ # # @version > 1.0.0
1791
+ # ```
1792
+ # Prerelease versions:
1793
+ # - Prerelease versions are considered less than their non-prerelease counterparts
1794
+ # - e.g. `0.4.0-prerelease` is less than `0.4.0`
1795
+ #
1796
+ # RBI with no versions:
1797
+ # - RBI with no version annotations are automatically counted towards ALL versions
1798
+ #
1799
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#57
1800
+ class RBI::Rewriters::FilterVersions < ::RBI::Visitor
1801
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#73
1802
+ sig { params(version: ::Gem::Version).void }
1803
+ def initialize(version); end
1804
+
1805
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#79
1806
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1807
+ def visit(node); end
1808
+
1809
+ class << self
1810
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#66
1811
+ sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void }
1812
+ def filter(tree, version); end
1813
+ end
1814
+ end
1815
+
1816
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#60
1817
+ RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String)
1818
+
1819
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#6
1820
+ class RBI::Rewriters::GroupNodes < ::RBI::Visitor
1821
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#10
1822
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1823
+ def visit(node); end
1824
+ end
1825
+
1826
+ # Merge two RBI trees together
1827
+ #
1828
+ # Be this `Tree`:
1829
+ # ~~~rb
1830
+ # class Foo
1831
+ # attr_accessor :a
1832
+ # def m; end
1833
+ # C = 10
1834
+ # end
1835
+ # ~~~
1836
+ #
1837
+ # Merged with this one:
1838
+ # ~~~rb
1839
+ # class Foo
1840
+ # attr_reader :a
1841
+ # def m(x); end
1842
+ # C = 10
1843
+ # end
1844
+ # ~~~
1845
+ #
1846
+ # Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`:
1847
+ # ~~~rb
1848
+ # class Foo
1849
+ # <<<<<<< left
1850
+ # attr_accessor :a
1851
+ # def m; end
1852
+ # =======
1853
+ # attr_reader :a
1854
+ # def m(x); end
1855
+ # >>>>>>> right
1856
+ # C = 10
1857
+ # end
1858
+ # ~~~
1859
+ #
1860
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#39
1861
+ class RBI::Rewriters::Merge
1862
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#70
1863
+ sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void }
1864
+ def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
1865
+
1866
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#79
1867
+ sig { params(tree: ::RBI::Tree).void }
1868
+ def merge(tree); end
1869
+
1870
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#67
1871
+ sig { returns(::RBI::MergeTree) }
1872
+ def tree; end
1873
+
1874
+ class << self
1875
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#54
1876
+ sig do
1877
+ params(
1878
+ left: ::RBI::Tree,
1879
+ right: ::RBI::Tree,
1880
+ left_name: ::String,
1881
+ right_name: ::String,
1882
+ keep: ::RBI::Rewriters::Merge::Keep
1883
+ ).returns(::RBI::MergeTree)
1884
+ end
1885
+ def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
1886
+ end
1887
+ end
1888
+
1889
+ # Used for logging / error displaying purpose
1890
+ #
1891
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#86
1892
+ class RBI::Rewriters::Merge::Conflict < ::T::Struct
1893
+ const :left, ::RBI::Node
1894
+ const :right, ::RBI::Node
1895
+ const :left_name, ::String
1896
+ const :right_name, ::String
1897
+
1898
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#95
1899
+ sig { returns(::String) }
1900
+ def to_s; end
1901
+
1902
+ class << self
1903
+ # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
1904
+ def inherited(s); end
1905
+ end
1906
+ end
1907
+
1908
+ # Merge adjacent conflict trees
1909
+ #
1910
+ # Transform this:
1911
+ # ~~~rb
1912
+ # class Foo
1913
+ # <<<<<<< left
1914
+ # def m1; end
1915
+ # =======
1916
+ # def m1(a); end
1917
+ # >>>>>>> right
1918
+ # <<<<<<< left
1919
+ # def m2(a); end
1920
+ # =======
1921
+ # def m2; end
1922
+ # >>>>>>> right
1923
+ # end
1924
+ # ~~~
1925
+ #
1926
+ # Into this:
1927
+ # ~~~rb
1928
+ # class Foo
1929
+ # <<<<<<< left
1930
+ # def m1; end
1931
+ # def m2(a); end
1932
+ # =======
1933
+ # def m1(a); end
1934
+ # def m2; end
1935
+ # >>>>>>> right
1936
+ # end
1937
+ # ~~~
1938
+ #
1939
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#245
1940
+ class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor
1941
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#247
1942
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1943
+ def visit(node); end
1944
+
1945
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#252
1946
+ sig { override.params(nodes: T::Array[::RBI::Node]).void }
1947
+ def visit_all(nodes); end
1948
+
1949
+ private
1950
+
1951
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#273
1952
+ sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void }
1953
+ def merge_conflict_trees(left, right); end
1954
+ end
1955
+
1956
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#42
1957
+ class RBI::Rewriters::Merge::Keep < ::T::Enum
1958
+ enums do
1959
+ NONE = new
1960
+ LEFT = new
1961
+ RIGHT = new
1962
+ end
1963
+ end
1964
+
1965
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#100
1966
+ class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor
1967
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#107
1968
+ sig do
1969
+ params(
1970
+ output: ::RBI::Tree,
1971
+ left_name: ::String,
1972
+ right_name: ::String,
1973
+ keep: ::RBI::Rewriters::Merge::Keep
1974
+ ).void
1975
+ end
1976
+ def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
1977
+
1978
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#104
1979
+ sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
1980
+ def conflicts; end
1981
+
1982
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#119
1983
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
1984
+ def visit(node); end
1985
+
1986
+ private
1987
+
1988
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#168
1989
+ sig { returns(::RBI::Tree) }
1990
+ def current_scope; end
1991
+
1992
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#185
1993
+ sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void }
1994
+ def make_conflict_scope(left, right); end
1995
+
1996
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#192
1997
+ sig { params(left: ::RBI::Node, right: ::RBI::Node).void }
1998
+ def make_conflict_tree(left, right); end
1999
+
2000
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#173
2001
+ sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) }
2002
+ def previous_definition(node); end
2003
+
2004
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#204
2005
+ sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) }
2006
+ def replace_scope_header(left, right); end
2007
+ end
2008
+
2009
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6
2010
+ class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor
2011
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10
2012
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
2013
+ def visit(node); end
2014
+ end
2015
+
2016
+ # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6
2017
+ class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor
2018
+ # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10
2019
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
2020
+ def visit(node); end
2021
+ end
2022
+
2023
+ # Remove all definitions existing in the index from the current tree
2024
+ #
2025
+ # Let's create an `Index` from two different `Tree`s:
2026
+ # ~~~rb
2027
+ # tree1 = Parse.parse_string(<<~RBI)
2028
+ # class Foo
2029
+ # def foo; end
2030
+ # end
2031
+ # RBI
2032
+ #
2033
+ # tree2 = Parse.parse_string(<<~RBI)
2034
+ # FOO = 10
2035
+ # RBI
2036
+ #
2037
+ # index = Index.index(tree1, tree2)
2038
+ # ~~~
2039
+ #
2040
+ # We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean:
2041
+ # ~~~rb
2042
+ # tree_to_clean = Parser.parse_string(<<~RBI)
2043
+ # class Foo
2044
+ # def foo; end
2045
+ # def bar; end
2046
+ # end
2047
+ # FOO = 10
2048
+ # BAR = 42
2049
+ # RBI
2050
+ #
2051
+ # cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index)
2052
+ #
2053
+ # assert_equal(<<~RBI, cleaned_tree)
2054
+ # class Foo
2055
+ # def bar; end
2056
+ # end
2057
+ # BAR = 42
2058
+ # RBI
2059
+ #
2060
+ # assert_equal(<<~OPERATIONS, operations.join("\n"))
2061
+ # Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16)
2062
+ # Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8)
2063
+ # OPERATIONS
2064
+ # ~~~
2065
+ #
2066
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48
2067
+ class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor
2068
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55
2069
+ sig { params(index: ::RBI::Index).void }
2070
+ def initialize(index); end
2071
+
2072
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52
2073
+ sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) }
2074
+ def operations; end
2075
+
2076
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83
2077
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
2078
+ def visit(node); end
2079
+
2080
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78
2081
+ sig { params(nodes: T::Array[::RBI::Node]).void }
2082
+ def visit_all(nodes); end
2083
+
2084
+ private
2085
+
2086
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111
2087
+ sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) }
2088
+ def can_delete_node?(node, previous); end
2089
+
2090
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129
2091
+ sig { params(node: ::RBI::Node, previous: ::RBI::Node).void }
2092
+ def delete_node(node, previous); end
2093
+
2094
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102
2095
+ sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) }
2096
+ def previous_definition_for(node); end
2097
+
2098
+ class << self
2099
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70
2100
+ sig do
2101
+ params(
2102
+ tree: ::RBI::Tree,
2103
+ index: ::RBI::Index
2104
+ ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]])
2105
+ end
2106
+ def remove(tree, index); end
2107
+ end
2108
+ end
2109
+
2110
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134
2111
+ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
2112
+ const :deleted_node, ::RBI::Node
2113
+ const :duplicate_of, ::RBI::Node
2114
+
2115
+ # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141
2116
+ sig { returns(::String) }
2117
+ def to_s; end
2118
+
2119
+ class << self
2120
+ # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
2121
+ def inherited(s); end
2122
+ end
2123
+ end
2124
+
2125
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#6
2126
+ class RBI::Rewriters::SortNodes < ::RBI::Visitor
2127
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10
2128
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
2129
+ def visit(node); end
2130
+
2131
+ private
2132
+
2133
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73
2134
+ sig { params(kind: ::RBI::Group::Kind).returns(::Integer) }
2135
+ def group_rank(kind); end
2136
+
2137
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94
2138
+ sig { params(node: ::RBI::Node).returns(T.nilable(::String)) }
2139
+ def node_name(node); end
2140
+
2141
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45
2142
+ sig { params(node: ::RBI::Node).returns(::Integer) }
2143
+ def node_rank(node); end
2144
+
2145
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106
2146
+ sig { params(node: ::RBI::Node).void }
2147
+ def sort_node_names!(node); end
2148
+ end
2149
+
2150
+ # Scopes
2151
+ #
2152
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
2153
+ #
2154
+ # source://rbi//lib/rbi/model.rb#176
2155
+ class RBI::Scope < ::RBI::Tree
2156
+ include ::RBI::Indexable
2157
+
2158
+ abstract!
2159
+
2160
+ # source://rbi//lib/rbi/printer.rb#242
2161
+ sig { override.params(v: ::RBI::Printer).void }
2162
+ def accept_printer(v); end
2163
+
2164
+ # Duplicate `self` scope without its body
2165
+ #
2166
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#356
2167
+ sig { returns(T.self_type) }
2168
+ def dup_empty; end
2169
+
2170
+ # @abstract
2171
+ #
2172
+ # source://rbi//lib/rbi/model.rb#182
2173
+ sig { abstract.returns(::String) }
2174
+ def fully_qualified_name; end
2175
+
2176
+ # source://rbi//lib/rbi/index.rb#93
2177
+ sig { override.returns(T::Array[::String]) }
2178
+ def index_ids; end
2179
+
2180
+ # source://rbi//lib/rbi/printer.rb#256
2181
+ sig { params(v: ::RBI::Printer).void }
2182
+ def print_body(v); end
2183
+
2184
+ # @abstract
2185
+ #
2186
+ # source://rbi//lib/rbi/printer.rb#253
2187
+ sig { abstract.params(v: ::RBI::Printer).void }
2188
+ def print_header(v); end
2189
+
2190
+ # source://rbi//lib/rbi/model.rb#185
2191
+ sig { override.returns(::String) }
2192
+ def to_s; end
2193
+ end
2194
+
2195
+ # A conflict between two scope headers
2196
+ #
2197
+ # Is rendered as a merge conflict between `left` and` right` for scope definitions:
2198
+ # ~~~rb
2199
+ # <<<<<<< left
2200
+ # class Foo
2201
+ # =======
2202
+ # module Foo
2203
+ # >>>>>>> right
2204
+ # def m1; end
2205
+ # end
2206
+ # ~~~
2207
+ #
2208
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#628
2209
+ class RBI::ScopeConflict < ::RBI::Tree
2210
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#642
2211
+ sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void }
2212
+ def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
2213
+
2214
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#651
2215
+ sig { override.params(v: ::RBI::Printer).void }
2216
+ def accept_printer(v); end
2217
+
2218
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#632
2219
+ sig { returns(::RBI::Scope) }
2220
+ def left; end
2221
+
2222
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#667
2223
+ sig { override.returns(T::Boolean) }
2224
+ def oneline?; end
2225
+
2226
+ # @return [Scope]
2227
+ #
2228
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#632
2229
+ def right; end
2230
+ end
2231
+
2232
+ # Sends
2233
+ #
2234
+ # source://rbi//lib/rbi/model.rb#927
2235
+ class RBI::Send < ::RBI::NodeWithComments
2236
+ include ::RBI::Indexable
2237
+
2238
+ # source://rbi//lib/rbi/model.rb#945
2239
+ sig do
2240
+ params(
2241
+ method: ::String,
2242
+ args: T::Array[::RBI::Arg],
2243
+ loc: T.nilable(::RBI::Loc),
2244
+ comments: T::Array[::RBI::Comment],
2245
+ block: T.nilable(T.proc.params(node: ::RBI::Send).void)
2246
+ ).void
2247
+ end
2248
+ def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2249
+
2250
+ # source://rbi//lib/rbi/model.rb#953
2251
+ sig { params(arg: ::RBI::Arg).void }
2252
+ def <<(arg); end
2253
+
2254
+ # source://rbi//lib/rbi/model.rb#958
2255
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
2256
+ def ==(other); end
2257
+
2258
+ # source://rbi//lib/rbi/printer.rb#592
2259
+ sig { override.params(v: ::RBI::Printer).void }
2260
+ def accept_printer(v); end
2261
+
2262
+ # source://rbi//lib/rbi/model.rb#934
2263
+ sig { returns(T::Array[::RBI::Arg]) }
2264
+ def args; end
2265
+
2266
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#529
2267
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2268
+ def compatible_with?(other); end
2269
+
2270
+ # source://rbi//lib/rbi/index.rb#193
2271
+ sig { override.returns(T::Array[::String]) }
2272
+ def index_ids; end
2273
+
2274
+ # source://rbi//lib/rbi/model.rb#931
2275
+ sig { returns(::String) }
2276
+ def method; end
2277
+
2278
+ # source://rbi//lib/rbi/model.rb#963
2279
+ sig { returns(::String) }
2280
+ def to_s; end
2281
+ end
2282
+
2283
+ # Sorbet's sigs
2284
+ #
2285
+ # source://rbi//lib/rbi/model.rb#1027
2286
+ class RBI::Sig < ::RBI::Node
2287
+ # source://rbi//lib/rbi/model.rb#1059
2288
+ sig do
2289
+ params(
2290
+ params: T::Array[::RBI::SigParam],
2291
+ return_type: T.nilable(::String),
2292
+ is_abstract: T::Boolean,
2293
+ is_override: T::Boolean,
2294
+ is_overridable: T::Boolean,
2295
+ is_final: T::Boolean,
2296
+ type_params: T::Array[::String],
2297
+ checked: T.nilable(::Symbol),
2298
+ loc: T.nilable(::RBI::Loc),
2299
+ block: T.nilable(T.proc.params(node: ::RBI::Sig).void)
2300
+ ).void
2301
+ end
2302
+ def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end
2303
+
2304
+ # source://rbi//lib/rbi/model.rb#1084
2305
+ sig { params(param: ::RBI::SigParam).void }
2306
+ def <<(param); end
2307
+
2308
+ # source://rbi//lib/rbi/model.rb#1089
2309
+ sig { params(other: ::Object).returns(T::Boolean) }
2310
+ def ==(other); end
2311
+
2312
+ # source://rbi//lib/rbi/printer.rb#633
2313
+ sig { override.params(v: ::RBI::Printer).void }
2314
+ def accept_printer(v); end
2315
+
2316
+ # source://rbi//lib/rbi/model.rb#1043
2317
+ sig { returns(T.nilable(::Symbol)) }
2318
+ def checked; end
2319
+
2320
+ # @return [Symbol, nil]
2321
+ #
2322
+ # source://rbi//lib/rbi/model.rb#1043
2323
+ def checked=(_arg0); end
2324
+
2325
+ # source://rbi//lib/rbi/printer.rb#656
2326
+ sig { returns(T::Boolean) }
2327
+ def inline_params?; end
2328
+
2329
+ # source://rbi//lib/rbi/model.rb#1037
2330
+ sig { returns(T::Boolean) }
2331
+ def is_abstract; end
2332
+
2333
+ # @return [Boolean]
2334
+ #
2335
+ # source://rbi//lib/rbi/model.rb#1037
2336
+ def is_abstract=(_arg0); end
2337
+
2338
+ # @return [Boolean]
2339
+ #
2340
+ # source://rbi//lib/rbi/model.rb#1037
2341
+ def is_final; end
2342
+
2343
+ # @return [Boolean]
2344
+ #
2345
+ # source://rbi//lib/rbi/model.rb#1037
2346
+ def is_final=(_arg0); end
2347
+
2348
+ # @return [Boolean]
2349
+ #
2350
+ # source://rbi//lib/rbi/model.rb#1037
2351
+ def is_overridable; end
2352
+
2353
+ # @return [Boolean]
2354
+ #
2355
+ # source://rbi//lib/rbi/model.rb#1037
2356
+ def is_overridable=(_arg0); end
2357
+
2358
+ # @return [Boolean]
2359
+ #
2360
+ # source://rbi//lib/rbi/model.rb#1037
2361
+ def is_override; end
2362
+
2363
+ # @return [Boolean]
2364
+ #
2365
+ # source://rbi//lib/rbi/model.rb#1037
2366
+ def is_override=(_arg0); end
2367
+
2368
+ # source://rbi//lib/rbi/printer.rb#651
2369
+ sig { override.returns(T::Boolean) }
2370
+ def oneline?; end
2371
+
2372
+ # source://rbi//lib/rbi/model.rb#1031
2373
+ sig { returns(T::Array[::RBI::SigParam]) }
2374
+ def params; end
2375
+
2376
+ # source://rbi//lib/rbi/model.rb#1034
2377
+ sig { returns(T.nilable(::String)) }
2378
+ def return_type; end
2379
+
2380
+ # @return [String, nil]
2381
+ #
2382
+ # source://rbi//lib/rbi/model.rb#1034
2383
+ def return_type=(_arg0); end
2384
+
2385
+ # source://rbi//lib/rbi/model.rb#1040
2386
+ sig { returns(T::Array[::String]) }
2387
+ def type_params; end
2388
+
2389
+ private
2390
+
2391
+ # source://rbi//lib/rbi/printer.rb#698
2392
+ sig { params(v: ::RBI::Printer).void }
2393
+ def print_as_block(v); end
2394
+
2395
+ # source://rbi//lib/rbi/printer.rb#674
2396
+ sig { params(v: ::RBI::Printer).void }
2397
+ def print_as_line(v); end
2398
+
2399
+ # source://rbi//lib/rbi/printer.rb#663
2400
+ sig { returns(T::Array[::String]) }
2401
+ def sig_modifiers; end
2402
+ end
2403
+
2404
+ # source://rbi//lib/rbi/model.rb#1098
2405
+ class RBI::SigParam < ::RBI::NodeWithComments
2406
+ # source://rbi//lib/rbi/model.rb#1113
2407
+ sig do
2408
+ params(
2409
+ name: ::String,
2410
+ type: ::String,
2411
+ loc: T.nilable(::RBI::Loc),
2412
+ comments: T::Array[::RBI::Comment],
2413
+ block: T.nilable(T.proc.params(node: ::RBI::SigParam).void)
2414
+ ).void
2415
+ end
2416
+ def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2417
+
2418
+ # source://rbi//lib/rbi/model.rb#1121
2419
+ sig { params(other: ::Object).returns(T::Boolean) }
2420
+ def ==(other); end
2421
+
2422
+ # source://rbi//lib/rbi/printer.rb#751
2423
+ sig { override.params(v: ::RBI::Printer).void }
2424
+ def accept_printer(v); end
2425
+
2426
+ # source://rbi//lib/rbi/printer.rb#764
2427
+ sig { returns(T::Array[::String]) }
2428
+ def comments_lines; end
2429
+
2430
+ # source://rbi//lib/rbi/model.rb#1102
2431
+ sig { returns(::String) }
2432
+ def name; end
2433
+
2434
+ # source://rbi//lib/rbi/printer.rb#756
2435
+ sig { params(v: ::RBI::Printer, last: T::Boolean).void }
2436
+ def print_comment_leading_space(v, last:); end
2437
+
2438
+ # @return [String]
2439
+ #
2440
+ # source://rbi//lib/rbi/model.rb#1102
2441
+ def type; end
2442
+ end
2443
+
2444
+ # source://rbi//lib/rbi/model.rb#251
2445
+ class RBI::SingletonClass < ::RBI::Scope
2446
+ # source://rbi//lib/rbi/model.rb#261
2447
+ sig do
2448
+ params(
2449
+ loc: T.nilable(::RBI::Loc),
2450
+ comments: T::Array[::RBI::Comment],
2451
+ block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void)
2452
+ ).void
2453
+ end
2454
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2455
+
2456
+ # source://rbi//lib/rbi/model.rb#267
2457
+ sig { override.returns(::String) }
2458
+ def fully_qualified_name; end
2459
+
2460
+ # source://rbi//lib/rbi/printer.rb#321
2461
+ sig { override.params(v: ::RBI::Printer).void }
2462
+ def print_header(v); end
2463
+ end
2464
+
2465
+ # source://rbi//lib/rbi/model.rb#272
2466
+ class RBI::Struct < ::RBI::Scope
2467
+ # source://rbi//lib/rbi/model.rb#294
2468
+ sig do
2469
+ params(
2470
+ name: ::String,
2471
+ members: T::Array[::Symbol],
2472
+ keyword_init: T::Boolean,
2473
+ loc: T.nilable(::RBI::Loc),
2474
+ comments: T::Array[::RBI::Comment],
2475
+ block: T.nilable(T.proc.params(struct: ::RBI::Struct).void)
2476
+ ).void
2477
+ end
2478
+ def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2479
+
2480
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#394
2481
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2482
+ def compatible_with?(other); end
2483
+
2484
+ # source://rbi//lib/rbi/model.rb#303
2485
+ sig { override.returns(::String) }
2486
+ def fully_qualified_name; end
2487
+
2488
+ # source://rbi//lib/rbi/model.rb#282
2489
+ sig { returns(T::Boolean) }
2490
+ def keyword_init; end
2491
+
2492
+ # @return [Boolean]
2493
+ #
2494
+ # source://rbi//lib/rbi/model.rb#282
2495
+ def keyword_init=(_arg0); end
2496
+
2497
+ # source://rbi//lib/rbi/model.rb#279
2498
+ sig { returns(T::Array[::Symbol]) }
2499
+ def members; end
2500
+
2501
+ # @return [Array<Symbol>]
2502
+ #
2503
+ # source://rbi//lib/rbi/model.rb#279
2504
+ def members=(_arg0); end
2505
+
2506
+ # source://rbi//lib/rbi/model.rb#276
2507
+ sig { returns(::String) }
2508
+ def name; end
2509
+
2510
+ # @return [String]
2511
+ #
2512
+ # source://rbi//lib/rbi/model.rb#276
2513
+ def name=(_arg0); end
2514
+
2515
+ # source://rbi//lib/rbi/printer.rb#300
2516
+ sig { override.params(v: ::RBI::Printer).void }
2517
+ def print_header(v); end
2518
+ end
2519
+
2520
+ # Sorbet's T::Enum
2521
+ #
2522
+ # source://rbi//lib/rbi/model.rb#1239
2523
+ class RBI::TEnum < ::RBI::Class
2524
+ # source://rbi//lib/rbi/model.rb#1250
2525
+ sig do
2526
+ params(
2527
+ name: ::String,
2528
+ loc: T.nilable(::RBI::Loc),
2529
+ comments: T::Array[::RBI::Comment],
2530
+ block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void)
2531
+ ).void
2532
+ end
2533
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2534
+ end
2535
+
2536
+ # source://rbi//lib/rbi/model.rb#1256
2537
+ class RBI::TEnumBlock < ::RBI::NodeWithComments
2538
+ include ::RBI::Indexable
2539
+
2540
+ # source://rbi//lib/rbi/model.rb#1270
2541
+ sig do
2542
+ params(
2543
+ names: T::Array[::String],
2544
+ loc: T.nilable(::RBI::Loc),
2545
+ comments: T::Array[::RBI::Comment],
2546
+ block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void)
2547
+ ).void
2548
+ end
2549
+ def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2550
+
2551
+ # source://rbi//lib/rbi/model.rb#1282
2552
+ sig { params(name: ::String).void }
2553
+ def <<(name); end
2554
+
2555
+ # source://rbi//lib/rbi/printer.rb#795
2556
+ sig { override.params(v: ::RBI::Printer).void }
2557
+ def accept_printer(v); end
2558
+
2559
+ # source://rbi//lib/rbi/model.rb#1277
2560
+ sig { returns(T::Boolean) }
2561
+ def empty?; end
2562
+
2563
+ # source://rbi//lib/rbi/index.rb#223
2564
+ sig { override.returns(T::Array[::String]) }
2565
+ def index_ids; end
2566
+
2567
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#556
2568
+ sig { override.params(other: ::RBI::Node).void }
2569
+ def merge_with(other); end
2570
+
2571
+ # source://rbi//lib/rbi/model.rb#1260
2572
+ sig { returns(T::Array[::String]) }
2573
+ def names; end
2574
+
2575
+ # source://rbi//lib/rbi/model.rb#1287
2576
+ sig { override.returns(::String) }
2577
+ def to_s; end
2578
+ end
2579
+
2580
+ # Sorbet's T::Struct
2581
+ #
2582
+ # source://rbi//lib/rbi/model.rb#1128
2583
+ class RBI::TStruct < ::RBI::Class
2584
+ # source://rbi//lib/rbi/model.rb#1139
2585
+ sig do
2586
+ params(
2587
+ name: ::String,
2588
+ loc: T.nilable(::RBI::Loc),
2589
+ comments: T::Array[::RBI::Comment],
2590
+ block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void)
2591
+ ).void
2592
+ end
2593
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2594
+ end
2595
+
2596
+ # source://rbi//lib/rbi/model.rb#1177
2597
+ class RBI::TStructConst < ::RBI::TStructField
2598
+ include ::RBI::Indexable
2599
+
2600
+ # source://rbi//lib/rbi/model.rb#1190
2601
+ sig do
2602
+ params(
2603
+ name: ::String,
2604
+ type: ::String,
2605
+ default: T.nilable(::String),
2606
+ loc: T.nilable(::RBI::Loc),
2607
+ comments: T::Array[::RBI::Comment],
2608
+ block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void)
2609
+ ).void
2610
+ end
2611
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2612
+
2613
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#547
2614
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2615
+ def compatible_with?(other); end
2616
+
2617
+ # source://rbi//lib/rbi/model.rb#1196
2618
+ sig { override.returns(T::Array[::String]) }
2619
+ def fully_qualified_names; end
2620
+
2621
+ # source://rbi//lib/rbi/index.rb#203
2622
+ sig { override.returns(T::Array[::String]) }
2623
+ def index_ids; end
2624
+
2625
+ # source://rbi//lib/rbi/model.rb#1202
2626
+ sig { override.returns(::String) }
2627
+ def to_s; end
2628
+ end
2629
+
2630
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
2631
+ #
2632
+ # source://rbi//lib/rbi/model.rb#1145
2633
+ class RBI::TStructField < ::RBI::NodeWithComments
2634
+ abstract!
2635
+
2636
+ # source://rbi//lib/rbi/model.rb#1166
2637
+ sig do
2638
+ params(
2639
+ name: ::String,
2640
+ type: ::String,
2641
+ default: T.nilable(::String),
2642
+ loc: T.nilable(::RBI::Loc),
2643
+ comments: T::Array[::RBI::Comment]
2644
+ ).void
2645
+ end
2646
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
2647
+
2648
+ # source://rbi//lib/rbi/printer.rb#773
2649
+ sig { override.params(v: ::RBI::Printer).void }
2650
+ def accept_printer(v); end
2651
+
2652
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#538
2653
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2654
+ def compatible_with?(other); end
2655
+
2656
+ # source://rbi//lib/rbi/model.rb#1155
2657
+ sig { returns(T.nilable(::String)) }
2658
+ def default; end
2659
+
2660
+ # @return [String, nil]
2661
+ #
2662
+ # source://rbi//lib/rbi/model.rb#1155
2663
+ def default=(_arg0); end
2664
+
2665
+ # @abstract
2666
+ #
2667
+ # source://rbi//lib/rbi/model.rb#1174
2668
+ sig { abstract.returns(T::Array[::String]) }
2669
+ def fully_qualified_names; end
2670
+
2671
+ # source://rbi//lib/rbi/model.rb#1152
2672
+ sig { returns(::String) }
2673
+ def name; end
2674
+
2675
+ # @return [String]
2676
+ #
2677
+ # source://rbi//lib/rbi/model.rb#1152
2678
+ def name=(_arg0); end
2679
+
2680
+ # @return [String]
2681
+ #
2682
+ # source://rbi//lib/rbi/model.rb#1152
2683
+ def type; end
2684
+
2685
+ # @return [String]
2686
+ #
2687
+ # source://rbi//lib/rbi/model.rb#1152
2688
+ def type=(_arg0); end
2689
+ end
2690
+
2691
+ # source://rbi//lib/rbi/model.rb#1207
2692
+ class RBI::TStructProp < ::RBI::TStructField
2693
+ include ::RBI::Indexable
2694
+
2695
+ # source://rbi//lib/rbi/model.rb#1220
2696
+ sig do
2697
+ params(
2698
+ name: ::String,
2699
+ type: ::String,
2700
+ default: T.nilable(::String),
2701
+ loc: T.nilable(::RBI::Loc),
2702
+ comments: T::Array[::RBI::Comment],
2703
+ block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void)
2704
+ ).void
2705
+ end
2706
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2707
+
2708
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#570
2709
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
2710
+ def compatible_with?(other); end
2711
+
2712
+ # source://rbi//lib/rbi/model.rb#1226
2713
+ sig { override.returns(T::Array[::String]) }
2714
+ def fully_qualified_names; end
2715
+
2716
+ # source://rbi//lib/rbi/index.rb#213
2717
+ sig { override.returns(T::Array[::String]) }
2718
+ def index_ids; end
2719
+
2720
+ # source://rbi//lib/rbi/model.rb#1232
2721
+ sig { override.returns(::String) }
2722
+ def to_s; end
2723
+ end
2724
+
2725
+ # source://rbi//lib/rbi/model.rb#106
2726
+ class RBI::Tree < ::RBI::NodeWithComments
2727
+ # source://rbi//lib/rbi/model.rb#119
2728
+ sig do
2729
+ params(
2730
+ loc: T.nilable(::RBI::Loc),
2731
+ comments: T::Array[::RBI::Comment],
2732
+ block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
2733
+ ).void
2734
+ end
2735
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2736
+
2737
+ # source://rbi//lib/rbi/model.rb#126
2738
+ sig { params(node: ::RBI::Node).void }
2739
+ def <<(node); end
2740
+
2741
+ # source://rbi//lib/rbi/printer.rb#226
2742
+ sig { override.params(v: ::RBI::Printer).void }
2743
+ def accept_printer(v); end
2744
+
2745
+ # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66
2746
+ sig { params(with_todo_comment: T::Boolean).void }
2747
+ def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
2748
+
2749
+ # source://rbi//lib/rbi/rewriters/annotate.rb#49
2750
+ sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
2751
+ def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
2752
+
2753
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#38
2754
+ sig do
2755
+ params(
2756
+ name: ::String,
2757
+ superclass_name: T.nilable(::String),
2758
+ block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)
2759
+ ).returns(::RBI::Scope)
2760
+ end
2761
+ def create_class(name, superclass_name: T.unsafe(nil), &block); end
2762
+
2763
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#45
2764
+ sig { params(name: ::String, value: ::String).void }
2765
+ def create_constant(name, value:); end
2766
+
2767
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#55
2768
+ sig { params(name: ::String).void }
2769
+ def create_extend(name); end
2770
+
2771
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#50
2772
+ sig { params(name: ::String).void }
2773
+ def create_include(name); end
2774
+
2775
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#89
2776
+ sig do
2777
+ params(
2778
+ name: ::String,
2779
+ parameters: T::Array[::RBI::TypedParam],
2780
+ return_type: ::String,
2781
+ class_method: T::Boolean,
2782
+ visibility: ::RBI::Visibility,
2783
+ comments: T::Array[::RBI::Comment]
2784
+ ).void
2785
+ end
2786
+ def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end
2787
+
2788
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#60
2789
+ sig { params(name: ::String).void }
2790
+ def create_mixes_in_class_methods(name); end
2791
+
2792
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#25
2793
+ sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
2794
+ def create_module(name, &block); end
2795
+
2796
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#9
2797
+ sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
2798
+ def create_path(constant, &block); end
2799
+
2800
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#74
2801
+ sig do
2802
+ params(
2803
+ name: ::String,
2804
+ type: ::String,
2805
+ variance: ::Symbol,
2806
+ fixed: T.nilable(::String),
2807
+ upper: T.nilable(::String),
2808
+ lower: T.nilable(::String)
2809
+ ).void
2810
+ end
2811
+ def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end
2812
+
2813
+ # source://rbi//lib/rbi/rewriters/deannotate.rb#41
2814
+ sig { params(annotation: ::String).void }
2815
+ def deannotate!(annotation); end
2816
+
2817
+ # source://rbi//lib/rbi/model.rb#132
2818
+ sig { returns(T::Boolean) }
2819
+ def empty?; end
2820
+
2821
+ # source://rbi//lib/rbi/rewriters/filter_versions.rb#118
2822
+ sig { params(version: ::Gem::Version).void }
2823
+ def filter_versions!(version); end
2824
+
2825
+ # source://rbi//lib/rbi/rewriters/group_nodes.rb#38
2826
+ sig { void }
2827
+ def group_nodes!; end
2828
+
2829
+ # source://rbi//lib/rbi/index.rb#68
2830
+ sig { returns(::RBI::Index) }
2831
+ def index; end
2832
+
2833
+ # source://rbi//lib/rbi/rewriters/merge_trees.rb#324
2834
+ sig do
2835
+ params(
2836
+ other: ::RBI::Tree,
2837
+ left_name: ::String,
2838
+ right_name: ::String,
2839
+ keep: ::RBI::Rewriters::Merge::Keep
2840
+ ).returns(::RBI::MergeTree)
2841
+ end
2842
+ def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
2843
+
2844
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46
2845
+ sig { void }
2846
+ def nest_non_public_methods!; end
2847
+
2848
+ # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36
2849
+ sig { void }
2850
+ def nest_singleton_methods!; end
2851
+
2852
+ # source://rbi//lib/rbi/model.rb#110
2853
+ sig { returns(T::Array[::RBI::Node]) }
2854
+ def nodes; end
2855
+
2856
+ # source://rbi//lib/rbi/printer.rb#233
2857
+ sig { override.returns(T::Boolean) }
2858
+ def oneline?; end
2859
+
2860
+ # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119
2861
+ sig { void }
2862
+ def sort_nodes!; end
2863
+
2864
+ private
2865
+
2866
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#116
2867
+ sig { params(node: ::RBI::Node).returns(::RBI::Node) }
2868
+ def create_node(node); end
2869
+
2870
+ # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#111
2871
+ sig { returns(T::Hash[::String, ::RBI::Node]) }
2872
+ def nodes_cache; end
2873
+ end
2874
+
2875
+ # source://rbi//lib/rbi/model.rb#1320
2876
+ class RBI::TypeMember < ::RBI::NodeWithComments
2877
+ include ::RBI::Indexable
2878
+
2879
+ # source://rbi//lib/rbi/model.rb#1335
2880
+ sig do
2881
+ params(
2882
+ name: ::String,
2883
+ value: ::String,
2884
+ loc: T.nilable(::RBI::Loc),
2885
+ comments: T::Array[::RBI::Comment],
2886
+ block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void)
2887
+ ).void
2888
+ end
2889
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
2890
+
2891
+ # source://rbi//lib/rbi/printer.rb#812
2892
+ sig { override.params(v: ::RBI::Printer).void }
2893
+ def accept_printer(v); end
2894
+
2895
+ # source://rbi//lib/rbi/model.rb#1343
2896
+ sig { returns(::String) }
2897
+ def fully_qualified_name; end
2898
+
2899
+ # source://rbi//lib/rbi/index.rb#183
2900
+ sig { override.returns(T::Array[::String]) }
2901
+ def index_ids; end
2902
+
2903
+ # source://rbi//lib/rbi/model.rb#1324
2904
+ sig { returns(::String) }
2905
+ def name; end
2906
+
2907
+ # source://rbi//lib/rbi/model.rb#1350
2908
+ sig { override.returns(::String) }
2909
+ def to_s; end
2910
+
2911
+ # @return [String]
2912
+ #
2913
+ # source://rbi//lib/rbi/model.rb#1324
2914
+ def value; end
2915
+ end
2916
+
2917
+ # source://rbi//lib/rbi/parser.rb#20
2918
+ class RBI::UnexpectedParserError < ::StandardError
2919
+ # source://rbi//lib/rbi/parser.rb#27
2920
+ sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void }
2921
+ def initialize(parent_exception, last_location); end
2922
+
2923
+ # source://rbi//lib/rbi/parser.rb#24
2924
+ sig { returns(::RBI::Loc) }
2925
+ def last_location; end
2926
+
2927
+ # source://rbi//lib/rbi/parser.rb#34
2928
+ sig { params(io: T.any(::IO, ::StringIO)).void }
2929
+ def print_debug(io: T.unsafe(nil)); end
2930
+ end
2931
+
2932
+ # source://rbi//lib/rbi/version.rb#5
2933
+ RBI::VERSION = T.let(T.unsafe(nil), String)
2934
+
2935
+ # Visibility
2936
+ #
2937
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
2938
+ #
2939
+ # source://rbi//lib/rbi/model.rb#841
2940
+ class RBI::Visibility < ::RBI::NodeWithComments
2941
+ abstract!
2942
+
2943
+ # source://rbi//lib/rbi/model.rb#851
2944
+ sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
2945
+ def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
2946
+
2947
+ # source://rbi//lib/rbi/model.rb#857
2948
+ sig { params(other: ::RBI::Visibility).returns(T::Boolean) }
2949
+ def ==(other); end
2950
+
2951
+ # source://rbi//lib/rbi/printer.rb#579
2952
+ sig { override.params(v: ::RBI::Printer).void }
2953
+ def accept_printer(v); end
2954
+
2955
+ # source://rbi//lib/rbi/model.rb#872
2956
+ sig { returns(T::Boolean) }
2957
+ def private?; end
2958
+
2959
+ # source://rbi//lib/rbi/model.rb#867
2960
+ sig { returns(T::Boolean) }
2961
+ def protected?; end
2962
+
2963
+ # source://rbi//lib/rbi/model.rb#862
2964
+ sig { returns(T::Boolean) }
2965
+ def public?; end
2966
+
2967
+ # source://rbi//lib/rbi/model.rb#848
2968
+ sig { returns(::Symbol) }
2969
+ def visibility; end
2970
+ end
2971
+
2972
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52
2973
+ class RBI::VisibilityGroup < ::RBI::Tree
2974
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59
2975
+ sig { params(visibility: ::RBI::Visibility).void }
2976
+ def initialize(visibility); end
2977
+
2978
+ # source://rbi//lib/rbi/printer.rb#848
2979
+ sig { override.params(v: ::RBI::Printer).void }
2980
+ def accept_printer(v); end
2981
+
2982
+ # source://rbi//lib/rbi/printer.rb#861
2983
+ sig { override.returns(T::Boolean) }
2984
+ def oneline?; end
2985
+
2986
+ # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56
2987
+ sig { returns(::RBI::Visibility) }
2988
+ def visibility; end
2989
+ end
2990
+
2991
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
2992
+ #
2993
+ # source://rbi//lib/rbi/visitor.rb#5
2994
+ class RBI::Visitor
2995
+ abstract!
2996
+
2997
+ # @abstract
2998
+ #
2999
+ # source://rbi//lib/rbi/visitor.rb#12
3000
+ sig { abstract.params(node: T.nilable(::RBI::Node)).void }
3001
+ def visit(node); end
3002
+
3003
+ # source://rbi//lib/rbi/visitor.rb#15
3004
+ sig { params(nodes: T::Array[::RBI::Node]).void }
3005
+ def visit_all(nodes); end
3006
+ end