u-struct 0.11.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +5 -5
  3. data/.rubocop.yml +129 -0
  4. data/.rubocop_todo.yml +10 -0
  5. data/.tool-versions +1 -0
  6. data/CHANGELOG.md +558 -13
  7. data/Gemfile +14 -3
  8. data/README.md +682 -16
  9. data/Rakefile +5 -5
  10. data/bin/console +3 -3
  11. data/bin/prepare_coverage +7 -9
  12. data/bin/run_ci +17 -0
  13. data/bin/tapioca +28 -0
  14. data/examples/rgb/number.rb +1 -1
  15. data/examples/rgb_1.rb +7 -6
  16. data/examples/rgb_2.rb +2 -2
  17. data/examples/rgb_3.rb +1 -1
  18. data/lib/micro/struct/factory/create_struct.rb +95 -69
  19. data/lib/micro/struct/factory/members.rb +1 -0
  20. data/lib/micro/struct/factory.rb +13 -4
  21. data/lib/micro/struct/features.rb +35 -16
  22. data/lib/micro/struct/normalize_names.rb +4 -3
  23. data/lib/micro/struct/version.rb +2 -1
  24. data/lib/micro/struct.rb +37 -5
  25. data/lib/u-struct.rb +2 -0
  26. data/rbi/micro/struct/factory/create_struct.rbi +60 -0
  27. data/rbi/micro/struct/factory/members.rbi +67 -0
  28. data/rbi/micro/struct/factory.rbi +41 -0
  29. data/rbi/micro/struct/features.rbi +41 -0
  30. data/rbi/micro/struct/normalize_names.rbi +20 -0
  31. data/rbi/micro/struct/version.rbi +3 -0
  32. data/rbi/micro/struct.rbi +68 -0
  33. data/sorbet/config +8 -0
  34. data/sorbet/rbi/gems/ast@2.4.2.rbi +54 -0
  35. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  36. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +11 -0
  37. data/sorbet/rbi/gems/docile@1.4.0.rbi +54 -0
  38. data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
  39. data/sorbet/rbi/gems/minitest@5.15.0.rbi +345 -0
  40. data/sorbet/rbi/gems/parser@3.1.0.0.rbi +1196 -0
  41. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  42. data/sorbet/rbi/gems/rake@13.0.6.rbi +806 -0
  43. data/sorbet/rbi/gems/rbi@0.0.9.rbi +1602 -0
  44. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +89 -0
  45. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +577 -0
  46. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +8 -0
  47. data/sorbet/rbi/gems/spoom@1.1.8.rbi +1252 -0
  48. data/sorbet/rbi/gems/tapioca@0.6.2.rbi +1232 -0
  49. data/sorbet/rbi/gems/thor@1.2.1.rbi +844 -0
  50. data/sorbet/rbi/gems/unparser@0.6.3.rbi +8 -0
  51. data/sorbet/rbi/gems/webrick@1.7.0.rbi +601 -0
  52. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +199 -0
  53. data/sorbet/rbi/gems/yard@0.9.27.rbi +4112 -0
  54. data/sorbet/tapioca/config.yml +13 -0
  55. data/sorbet/tapioca/require.rb +4 -0
  56. data/u-struct.gemspec +3 -3
  57. metadata +38 -4
  58. data/bin/test +0 -8
@@ -0,0 +1,1602 @@
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
+ module RBI; end
8
+
9
+ class RBI::ASTVisitor
10
+ abstract!
11
+
12
+ def initialize(*args, &blk); end
13
+
14
+ sig { abstract.params(node: T.nilable(AST::Node)).void }
15
+ def visit(node); end
16
+
17
+ sig { params(nodes: T::Array[AST::Node]).void }
18
+ def visit_all(nodes); end
19
+
20
+ private
21
+
22
+ sig { params(node: AST::Node).returns(String) }
23
+ def parse_expr(node); end
24
+
25
+ sig { params(node: AST::Node).returns(String) }
26
+ def parse_name(node); end
27
+ end
28
+
29
+ class RBI::Arg < ::RBI::Node
30
+ sig { params(value: String, loc: T.nilable(RBI::Loc)).void }
31
+ def initialize(value, loc: T.unsafe(nil)); end
32
+
33
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
34
+ def ==(other); end
35
+
36
+ sig { override.params(v: RBI::Printer).void }
37
+ def accept_printer(v); end
38
+
39
+ sig { returns(String) }
40
+ def to_s; end
41
+
42
+ sig { returns(String) }
43
+ def value; end
44
+ end
45
+
46
+ class RBI::Attr < ::RBI::NodeWithComments
47
+ include ::RBI::Indexable
48
+
49
+ abstract!
50
+
51
+ sig { params(name: Symbol, names: T::Array[Symbol], visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
52
+ def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
53
+
54
+ sig { override.params(v: RBI::Printer).void }
55
+ def accept_printer(v); end
56
+
57
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
58
+ def compatible_with?(other); end
59
+
60
+ sig { abstract.returns(T::Array[String]) }
61
+ def fully_qualified_names; end
62
+
63
+ sig { override.returns(T::Array[String]) }
64
+ def index_ids; end
65
+
66
+ sig { override.params(other: RBI::Node).void }
67
+ def merge_with(other); end
68
+
69
+ sig { returns(T::Array[Symbol]) }
70
+ def names; end
71
+
72
+ def names=(_arg0); end
73
+
74
+ sig { override.returns(T::Boolean) }
75
+ def oneline?; end
76
+
77
+ sig { returns(T::Array[RBI::Sig]) }
78
+ def sigs; end
79
+
80
+ sig { returns(RBI::Visibility) }
81
+ def visibility; end
82
+
83
+ def visibility=(_arg0); end
84
+ end
85
+
86
+ class RBI::AttrAccessor < ::RBI::Attr
87
+ sig { params(name: Symbol, names: Symbol, visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::AttrAccessor).void)).void }
88
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
89
+
90
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
91
+ def compatible_with?(other); end
92
+
93
+ sig { override.returns(T::Array[String]) }
94
+ def fully_qualified_names; end
95
+
96
+ sig { override.returns(String) }
97
+ def to_s; end
98
+ end
99
+
100
+ class RBI::AttrReader < ::RBI::Attr
101
+ sig { params(name: Symbol, names: Symbol, visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::AttrReader).void)).void }
102
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
103
+
104
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
105
+ def compatible_with?(other); end
106
+
107
+ sig { override.returns(T::Array[String]) }
108
+ def fully_qualified_names; end
109
+
110
+ sig { override.returns(String) }
111
+ def to_s; end
112
+ end
113
+
114
+ class RBI::AttrWriter < ::RBI::Attr
115
+ sig { params(name: Symbol, names: Symbol, visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::AttrWriter).void)).void }
116
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
117
+
118
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
119
+ def compatible_with?(other); end
120
+
121
+ sig { override.returns(T::Array[String]) }
122
+ def fully_qualified_names; end
123
+
124
+ sig { override.returns(String) }
125
+ def to_s; end
126
+ end
127
+
128
+ class RBI::BlankLine < ::RBI::Comment
129
+ sig { params(loc: T.nilable(RBI::Loc)).void }
130
+ def initialize(loc: T.unsafe(nil)); end
131
+
132
+ sig { override.params(v: RBI::Printer).void }
133
+ def accept_printer(v); end
134
+ end
135
+
136
+ class RBI::BlockParam < ::RBI::Param
137
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::BlockParam).void)).void }
138
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
139
+
140
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
141
+ def ==(other); end
142
+
143
+ sig { override.params(v: RBI::Printer).void }
144
+ def accept_printer(v); end
145
+
146
+ sig { override.params(v: RBI::Printer, last: T::Boolean).void }
147
+ def print_comment_leading_space(v, last:); end
148
+
149
+ sig { override.returns(String) }
150
+ def to_s; end
151
+ end
152
+
153
+ class RBI::Class < ::RBI::Scope
154
+ sig { params(name: String, superclass_name: T.nilable(String), loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Class).void)).void }
155
+ def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
156
+
157
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
158
+ def compatible_with?(other); end
159
+
160
+ sig { override.returns(String) }
161
+ def fully_qualified_name; end
162
+
163
+ sig { returns(String) }
164
+ def name; end
165
+
166
+ def name=(_arg0); end
167
+
168
+ sig { override.params(v: RBI::Printer).void }
169
+ def print_header(v); end
170
+
171
+ sig { returns(T.nilable(String)) }
172
+ def superclass_name; end
173
+
174
+ def superclass_name=(_arg0); end
175
+ end
176
+
177
+ class RBI::Comment < ::RBI::Node
178
+ sig { params(text: String, loc: T.nilable(RBI::Loc)).void }
179
+ def initialize(text, loc: T.unsafe(nil)); end
180
+
181
+ sig { params(other: Object).returns(T::Boolean) }
182
+ def ==(other); end
183
+
184
+ sig { override.params(v: RBI::Printer).void }
185
+ def accept_printer(v); end
186
+
187
+ sig { returns(String) }
188
+ def text; end
189
+
190
+ def text=(_arg0); end
191
+ end
192
+
193
+ class RBI::ConflictTree < ::RBI::Tree
194
+ sig { params(left_name: String, right_name: String).void }
195
+ def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
196
+
197
+ sig { override.params(v: RBI::Printer).void }
198
+ def accept_printer(v); end
199
+
200
+ sig { returns(RBI::Tree) }
201
+ def left; end
202
+
203
+ def right; end
204
+ end
205
+
206
+ class RBI::Const < ::RBI::NodeWithComments
207
+ include ::RBI::Indexable
208
+
209
+ sig { params(name: String, value: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Const).void)).void }
210
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
211
+
212
+ sig { override.params(v: RBI::Printer).void }
213
+ def accept_printer(v); end
214
+
215
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
216
+ def compatible_with?(other); end
217
+
218
+ sig { returns(String) }
219
+ def fully_qualified_name; end
220
+
221
+ sig { override.returns(T::Array[String]) }
222
+ def index_ids; end
223
+
224
+ sig { returns(String) }
225
+ def name; end
226
+
227
+ sig { override.returns(String) }
228
+ def to_s; end
229
+
230
+ def value; end
231
+ end
232
+
233
+ class RBI::ConstBuilder < ::RBI::ASTVisitor
234
+ sig { void }
235
+ def initialize; end
236
+
237
+ sig { returns(T::Array[String]) }
238
+ def names; end
239
+
240
+ def names=(_arg0); end
241
+
242
+ sig { override.params(node: T.nilable(AST::Node)).void }
243
+ def visit(node); end
244
+
245
+ class << self
246
+ sig { params(node: T.nilable(AST::Node)).returns(T.nilable(String)) }
247
+ def visit(node); end
248
+ end
249
+ end
250
+
251
+ class RBI::Error < ::StandardError; end
252
+
253
+ class RBI::Extend < ::RBI::Mixin
254
+ include ::RBI::Indexable
255
+
256
+ sig { params(name: String, names: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Extend).void)).void }
257
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
258
+
259
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
260
+ def compatible_with?(other); end
261
+
262
+ sig { override.returns(T::Array[String]) }
263
+ def index_ids; end
264
+
265
+ sig { override.returns(String) }
266
+ def to_s; end
267
+ end
268
+
269
+ class RBI::File
270
+ sig { params(strictness: T.nilable(String), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(file: RBI::File).void)).void }
271
+ def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end
272
+
273
+ sig { params(node: RBI::Node).void }
274
+ def <<(node); end
275
+
276
+ sig { params(v: RBI::Printer).void }
277
+ def accept_printer(v); end
278
+
279
+ sig { returns(T::Array[RBI::Comment]) }
280
+ def comments; end
281
+
282
+ def comments=(_arg0); end
283
+
284
+ sig { returns(T::Boolean) }
285
+ def empty?; end
286
+
287
+ sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean).void }
288
+ def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
289
+
290
+ sig { returns(RBI::Tree) }
291
+ def root; end
292
+
293
+ def root=(_arg0); end
294
+
295
+ sig { void }
296
+ def set_empty_body_content; end
297
+
298
+ sig { params(command: String, reason: T.nilable(String), display_heading: T::Boolean).void }
299
+ def set_file_header(command, reason: T.unsafe(nil), display_heading: T.unsafe(nil)); end
300
+
301
+ sig { returns(T.nilable(String)) }
302
+ def strictness; end
303
+
304
+ def strictness=(_arg0); end
305
+
306
+ sig { params(indent: Integer, print_locs: T::Boolean).returns(String) }
307
+ def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
308
+
309
+ sig { void }
310
+ def transform_rbi!; end
311
+
312
+ sig { returns(String) }
313
+ def transformed_string; end
314
+ end
315
+
316
+ class RBI::Group < ::RBI::Tree
317
+ sig { params(kind: RBI::Group::Kind).void }
318
+ def initialize(kind); end
319
+
320
+ sig { override.params(v: RBI::Printer).void }
321
+ def accept_printer(v); end
322
+
323
+ sig { returns(RBI::Group::Kind) }
324
+ def kind; end
325
+ end
326
+
327
+ class RBI::Group::Kind < ::T::Enum
328
+ enums do
329
+ Mixins = new
330
+ Helpers = new
331
+ TypeMembers = new
332
+ MixesInClassMethods = new
333
+ Sends = new
334
+ TStructFields = new
335
+ TEnums = new
336
+ Inits = new
337
+ Methods = new
338
+ SingletonClasses = new
339
+ Consts = new
340
+ end
341
+ end
342
+
343
+ class RBI::Helper < ::RBI::NodeWithComments
344
+ include ::RBI::Indexable
345
+
346
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Helper).void)).void }
347
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
348
+
349
+ sig { override.params(v: RBI::Printer).void }
350
+ def accept_printer(v); end
351
+
352
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
353
+ def compatible_with?(other); end
354
+
355
+ sig { override.returns(T::Array[String]) }
356
+ def index_ids; end
357
+
358
+ sig { returns(String) }
359
+ def name; end
360
+
361
+ sig { override.returns(String) }
362
+ def to_s; end
363
+ end
364
+
365
+ class RBI::Include < ::RBI::Mixin
366
+ include ::RBI::Indexable
367
+
368
+ sig { params(name: String, names: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Include).void)).void }
369
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
370
+
371
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
372
+ def compatible_with?(other); end
373
+
374
+ sig { override.returns(T::Array[String]) }
375
+ def index_ids; end
376
+
377
+ sig { override.returns(String) }
378
+ def to_s; end
379
+ end
380
+
381
+ class RBI::Index < ::RBI::Visitor
382
+ sig { void }
383
+ def initialize; end
384
+
385
+ sig { params(id: String).returns(T::Array[RBI::Node]) }
386
+ def [](id); end
387
+
388
+ sig { params(nodes: RBI::Node).void }
389
+ def index(*nodes); end
390
+
391
+ sig { returns(T::Array[String]) }
392
+ def keys; end
393
+
394
+ sig { override.params(node: T.nilable(RBI::Node)).void }
395
+ def visit(node); end
396
+
397
+ private
398
+
399
+ sig { params(node: T.all(RBI::Indexable, RBI::Node)).void }
400
+ def index_node(node); end
401
+
402
+ class << self
403
+ sig { params(node: RBI::Node).returns(RBI::Index) }
404
+ def index(*node); end
405
+ end
406
+ end
407
+
408
+ module RBI::Indexable
409
+ interface!
410
+
411
+ sig { abstract.returns(T::Array[String]) }
412
+ def index_ids; end
413
+ end
414
+
415
+ class RBI::KwArg < ::RBI::Arg
416
+ sig { params(keyword: String, value: String, loc: T.nilable(RBI::Loc)).void }
417
+ def initialize(keyword, value, loc: T.unsafe(nil)); end
418
+
419
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
420
+ def ==(other); end
421
+
422
+ sig { override.params(v: RBI::Printer).void }
423
+ def accept_printer(v); end
424
+
425
+ sig { returns(String) }
426
+ def keyword; end
427
+
428
+ sig { returns(String) }
429
+ def to_s; end
430
+ end
431
+
432
+ class RBI::KwOptParam < ::RBI::Param
433
+ sig { params(name: String, value: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::KwOptParam).void)).void }
434
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
435
+
436
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
437
+ def ==(other); end
438
+
439
+ sig { override.params(v: RBI::Printer).void }
440
+ def accept_printer(v); end
441
+
442
+ sig { override.params(v: RBI::Printer, last: T::Boolean).void }
443
+ def print_comment_leading_space(v, last:); end
444
+
445
+ sig { override.returns(String) }
446
+ def to_s; end
447
+
448
+ sig { returns(String) }
449
+ def value; end
450
+ end
451
+
452
+ class RBI::KwParam < ::RBI::Param
453
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::KwParam).void)).void }
454
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
455
+
456
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
457
+ def ==(other); end
458
+
459
+ sig { override.params(v: RBI::Printer).void }
460
+ def accept_printer(v); end
461
+
462
+ sig { override.params(v: RBI::Printer, last: T::Boolean).void }
463
+ def print_comment_leading_space(v, last:); end
464
+
465
+ sig { override.returns(String) }
466
+ def to_s; end
467
+ end
468
+
469
+ class RBI::KwRestParam < ::RBI::Param
470
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::KwRestParam).void)).void }
471
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
472
+
473
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
474
+ def ==(other); end
475
+
476
+ sig { override.params(v: RBI::Printer).void }
477
+ def accept_printer(v); end
478
+
479
+ sig { override.params(v: RBI::Printer, last: T::Boolean).void }
480
+ def print_comment_leading_space(v, last:); end
481
+
482
+ sig { override.returns(String) }
483
+ def to_s; end
484
+ end
485
+
486
+ class RBI::Loc
487
+ sig { params(file: T.nilable(String), begin_line: T.nilable(Integer), end_line: T.nilable(Integer), begin_column: T.nilable(Integer), end_column: T.nilable(Integer)).void }
488
+ 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
489
+
490
+ def begin_column; end
491
+
492
+ sig { returns(T.nilable(Integer)) }
493
+ def begin_line; end
494
+
495
+ def end_column; end
496
+ def end_line; end
497
+
498
+ sig { returns(T.nilable(String)) }
499
+ def file; end
500
+
501
+ sig { returns(String) }
502
+ def to_s; end
503
+
504
+ class << self
505
+ sig { params(file: String, ast_loc: T.any(Parser::Source::Map, Parser::Source::Range)).returns(RBI::Loc) }
506
+ def from_ast_loc(file, ast_loc); end
507
+ end
508
+ end
509
+
510
+ class RBI::MergeTree < ::RBI::Tree
511
+ sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], conflicts: T::Array[RBI::Rewriters::Merge::Conflict], block: T.nilable(T.proc.params(node: RBI::Tree).void)).void }
512
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end
513
+
514
+ sig { returns(T::Array[RBI::Rewriters::Merge::Conflict]) }
515
+ def conflicts; end
516
+ end
517
+
518
+ class RBI::Method < ::RBI::NodeWithComments
519
+ include ::RBI::Indexable
520
+
521
+ sig { params(name: String, params: T::Array[RBI::Param], is_singleton: T::Boolean, visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Method).void)).void }
522
+ 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
523
+
524
+ sig { params(param: RBI::Param).void }
525
+ def <<(param); end
526
+
527
+ sig { override.params(v: RBI::Printer).void }
528
+ def accept_printer(v); end
529
+
530
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
531
+ def compatible_with?(other); end
532
+
533
+ sig { returns(String) }
534
+ def fully_qualified_name; end
535
+
536
+ sig { override.returns(T::Array[String]) }
537
+ def index_ids; end
538
+
539
+ sig { returns(T::Boolean) }
540
+ def inline_params?; end
541
+
542
+ sig { returns(T::Boolean) }
543
+ def is_singleton; end
544
+
545
+ def is_singleton=(_arg0); end
546
+
547
+ sig { override.params(other: RBI::Node).void }
548
+ def merge_with(other); end
549
+
550
+ sig { returns(String) }
551
+ def name; end
552
+
553
+ def name=(_arg0); end
554
+
555
+ sig { override.returns(T::Boolean) }
556
+ def oneline?; end
557
+
558
+ sig { returns(T::Array[RBI::Param]) }
559
+ def params; end
560
+
561
+ sig { returns(T::Array[RBI::Sig]) }
562
+ def sigs; end
563
+
564
+ def sigs=(_arg0); end
565
+
566
+ sig { override.returns(String) }
567
+ def to_s; end
568
+
569
+ sig { returns(RBI::Visibility) }
570
+ def visibility; end
571
+
572
+ def visibility=(_arg0); end
573
+ end
574
+
575
+ class RBI::MixesInClassMethods < ::RBI::Mixin
576
+ include ::RBI::Indexable
577
+
578
+ sig { params(name: String, names: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::MixesInClassMethods).void)).void }
579
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
580
+
581
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
582
+ def compatible_with?(other); end
583
+
584
+ sig { override.returns(T::Array[String]) }
585
+ def index_ids; end
586
+
587
+ sig { override.returns(String) }
588
+ def to_s; end
589
+ end
590
+
591
+ class RBI::Mixin < ::RBI::NodeWithComments
592
+ abstract!
593
+
594
+ sig { params(name: String, names: T::Array[String], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
595
+ def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
596
+
597
+ sig { override.params(v: RBI::Printer).void }
598
+ def accept_printer(v); end
599
+
600
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
601
+ def compatible_with?(other); end
602
+
603
+ sig { returns(T::Array[String]) }
604
+ def names; end
605
+
606
+ def names=(_arg0); end
607
+ end
608
+
609
+ class RBI::Module < ::RBI::Scope
610
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Module).void)).void }
611
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
612
+
613
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
614
+ def compatible_with?(other); end
615
+
616
+ sig { override.returns(String) }
617
+ def fully_qualified_name; end
618
+
619
+ sig { returns(String) }
620
+ def name; end
621
+
622
+ def name=(_arg0); end
623
+
624
+ sig { override.params(v: RBI::Printer).void }
625
+ def print_header(v); end
626
+ end
627
+
628
+ class RBI::Node
629
+ abstract!
630
+
631
+ sig { params(loc: T.nilable(RBI::Loc)).void }
632
+ def initialize(loc: T.unsafe(nil)); end
633
+
634
+ sig { abstract.params(v: RBI::Printer).void }
635
+ def accept_printer(v); end
636
+
637
+ sig { params(_other: RBI::Node).returns(T::Boolean) }
638
+ def compatible_with?(_other); end
639
+
640
+ sig { void }
641
+ def detach; end
642
+
643
+ sig { returns(RBI::Group::Kind) }
644
+ def group_kind; end
645
+
646
+ sig { returns(T.nilable(RBI::Loc)) }
647
+ def loc; end
648
+
649
+ def loc=(_arg0); end
650
+
651
+ sig { params(other: RBI::Node).void }
652
+ def merge_with(other); end
653
+
654
+ sig { returns(T::Boolean) }
655
+ def oneline?; end
656
+
657
+ sig { returns(T.nilable(RBI::ConflictTree)) }
658
+ def parent_conflict_tree; end
659
+
660
+ sig { returns(T.nilable(RBI::Scope)) }
661
+ def parent_scope; end
662
+
663
+ sig { returns(T.nilable(RBI::Tree)) }
664
+ def parent_tree; end
665
+
666
+ def parent_tree=(_arg0); end
667
+
668
+ sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean).void }
669
+ def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
670
+
671
+ sig { params(v: RBI::Printer).void }
672
+ def print_blank_line_before(v); end
673
+
674
+ sig { params(node: RBI::Node).void }
675
+ def replace(node); end
676
+
677
+ sig { params(indent: Integer, print_locs: T::Boolean).returns(String) }
678
+ def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
679
+ end
680
+
681
+ class RBI::NodeWithComments < ::RBI::Node
682
+ abstract!
683
+
684
+ sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
685
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end
686
+
687
+ sig { returns(T::Array[String]) }
688
+ def annotations; end
689
+
690
+ sig { returns(T::Array[RBI::Comment]) }
691
+ def comments; end
692
+
693
+ def comments=(_arg0); end
694
+
695
+ sig { override.params(other: RBI::Node).void }
696
+ def merge_with(other); end
697
+
698
+ sig { override.returns(T::Boolean) }
699
+ def oneline?; end
700
+ end
701
+
702
+ class RBI::OptParam < ::RBI::Param
703
+ sig { params(name: String, value: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::OptParam).void)).void }
704
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
705
+
706
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
707
+ def ==(other); end
708
+
709
+ sig { override.params(v: RBI::Printer).void }
710
+ def accept_printer(v); end
711
+
712
+ sig { override.params(v: RBI::Printer, last: T::Boolean).void }
713
+ def print_comment_leading_space(v, last:); end
714
+
715
+ sig { returns(String) }
716
+ def value; end
717
+ end
718
+
719
+ class RBI::Param < ::RBI::NodeWithComments
720
+ abstract!
721
+
722
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
723
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
724
+
725
+ sig { override.params(v: RBI::Printer).void }
726
+ def accept_printer(v); end
727
+
728
+ sig { returns(T::Array[String]) }
729
+ def comments_lines; end
730
+
731
+ sig { returns(String) }
732
+ def name; end
733
+
734
+ sig { params(v: RBI::Printer, last: T::Boolean).void }
735
+ def print_comment_leading_space(v, last:); end
736
+
737
+ sig { override.returns(String) }
738
+ def to_s; end
739
+ end
740
+
741
+ class RBI::ParseError < ::StandardError
742
+ sig { params(message: String, location: RBI::Loc).void }
743
+ def initialize(message, location); end
744
+
745
+ sig { returns(RBI::Loc) }
746
+ def location; end
747
+ end
748
+
749
+ class RBI::Parser
750
+ sig { void }
751
+ def initialize; end
752
+
753
+ sig { params(path: String).returns(RBI::Tree) }
754
+ def parse_file(path); end
755
+
756
+ sig { params(string: String).returns(RBI::Tree) }
757
+ def parse_string(string); end
758
+
759
+ private
760
+
761
+ sig { params(content: String, file: String).returns(RBI::Tree) }
762
+ def parse(content, file:); end
763
+
764
+ class << self
765
+ sig { params(path: String).returns(RBI::Tree) }
766
+ def parse_file(path); end
767
+
768
+ sig { params(paths: T::Array[String]).returns(T::Array[RBI::Tree]) }
769
+ def parse_files(paths); end
770
+
771
+ sig { params(string: String).returns(RBI::Tree) }
772
+ def parse_string(string); end
773
+
774
+ sig { params(strings: T::Array[String]).returns(T::Array[RBI::Tree]) }
775
+ def parse_strings(strings); end
776
+ end
777
+ end
778
+
779
+ class RBI::Printer < ::RBI::Visitor
780
+ sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean).void }
781
+ def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
782
+
783
+ sig { void }
784
+ def dedent; end
785
+
786
+ def in_visibility_group; end
787
+ def in_visibility_group=(_arg0); end
788
+
789
+ sig { void }
790
+ def indent; end
791
+
792
+ sig { returns(T.nilable(RBI::Node)) }
793
+ def previous_node; end
794
+
795
+ sig { params(string: String).void }
796
+ def print(string); end
797
+
798
+ sig { returns(T::Boolean) }
799
+ def print_locs; end
800
+
801
+ def print_locs=(_arg0); end
802
+
803
+ sig { params(string: String).void }
804
+ def printl(string); end
805
+
806
+ sig { params(string: T.nilable(String)).void }
807
+ def printn(string = T.unsafe(nil)); end
808
+
809
+ sig { params(string: T.nilable(String)).void }
810
+ def printt(string = T.unsafe(nil)); end
811
+
812
+ sig { override.params(node: T.nilable(RBI::Node)).void }
813
+ def visit(node); end
814
+
815
+ sig { override.params(nodes: T::Array[RBI::Node]).void }
816
+ def visit_all(nodes); end
817
+
818
+ sig { params(file: RBI::File).void }
819
+ def visit_file(file); end
820
+ end
821
+
822
+ class RBI::Private < ::RBI::Visibility
823
+ sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Private).void)).void }
824
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
825
+ end
826
+
827
+ class RBI::Protected < ::RBI::Visibility
828
+ sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Protected).void)).void }
829
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
830
+ end
831
+
832
+ class RBI::Public < ::RBI::Visibility
833
+ sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Public).void)).void }
834
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
835
+ end
836
+
837
+ class RBI::ReqParam < ::RBI::Param
838
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::ReqParam).void)).void }
839
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
840
+
841
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
842
+ def ==(other); end
843
+ end
844
+
845
+ class RBI::RestParam < ::RBI::Param
846
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::RestParam).void)).void }
847
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
848
+
849
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
850
+ def ==(other); end
851
+
852
+ sig { override.params(v: RBI::Printer).void }
853
+ def accept_printer(v); end
854
+
855
+ sig { override.params(v: RBI::Printer, last: T::Boolean).void }
856
+ def print_comment_leading_space(v, last:); end
857
+
858
+ sig { override.returns(String) }
859
+ def to_s; end
860
+ end
861
+
862
+ module RBI::Rewriters; end
863
+
864
+ class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor
865
+ sig { params(with_todo_comment: T::Boolean).void }
866
+ def initialize(with_todo_comment: T.unsafe(nil)); end
867
+
868
+ sig { override.params(node: T.nilable(RBI::Node)).void }
869
+ def visit(node); end
870
+
871
+ private
872
+
873
+ sig { params(attr: RBI::Attr).void }
874
+ def add_attr_sig(attr); end
875
+
876
+ sig { params(method: RBI::Method).void }
877
+ def add_method_sig(method); end
878
+
879
+ sig { params(node: RBI::NodeWithComments).void }
880
+ def add_todo_comment(node); end
881
+ end
882
+
883
+ class RBI::Rewriters::Annotate < ::RBI::Visitor
884
+ sig { params(annotation: String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
885
+ def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
886
+
887
+ sig { override.params(node: T.nilable(RBI::Node)).void }
888
+ def visit(node); end
889
+
890
+ private
891
+
892
+ sig { params(node: RBI::NodeWithComments).void }
893
+ def annotate_node(node); end
894
+
895
+ sig { params(node: RBI::Node).returns(T::Boolean) }
896
+ def root?(node); end
897
+ end
898
+
899
+ class RBI::Rewriters::Deannotate < ::RBI::Visitor
900
+ sig { params(annotation: String).void }
901
+ def initialize(annotation); end
902
+
903
+ sig { override.params(node: T.nilable(RBI::Node)).void }
904
+ def visit(node); end
905
+
906
+ private
907
+
908
+ sig { params(node: RBI::NodeWithComments).void }
909
+ def deannotate_node(node); end
910
+ end
911
+
912
+ class RBI::Rewriters::GroupNodes < ::RBI::Visitor
913
+ sig { override.params(node: T.nilable(RBI::Node)).void }
914
+ def visit(node); end
915
+ end
916
+
917
+ class RBI::Rewriters::Merge
918
+ sig { params(left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).void }
919
+ def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
920
+
921
+ sig { params(tree: RBI::Tree).void }
922
+ def merge(tree); end
923
+
924
+ sig { returns(RBI::MergeTree) }
925
+ def tree; end
926
+
927
+ class << self
928
+ sig { params(left: RBI::Tree, right: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).returns(RBI::MergeTree) }
929
+ def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
930
+ end
931
+ end
932
+
933
+ class RBI::Rewriters::Merge::Conflict < ::T::Struct
934
+ const :left, RBI::Node
935
+ const :left_name, String
936
+ const :right, RBI::Node
937
+ const :right_name, String
938
+
939
+ sig { returns(String) }
940
+ def to_s; end
941
+
942
+ class << self
943
+ def inherited(s); end
944
+ end
945
+ end
946
+
947
+ class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor
948
+ sig { override.params(node: T.nilable(RBI::Node)).void }
949
+ def visit(node); end
950
+
951
+ sig { override.params(nodes: T::Array[RBI::Node]).void }
952
+ def visit_all(nodes); end
953
+
954
+ private
955
+
956
+ sig { params(left: RBI::Tree, right: RBI::Tree).void }
957
+ def merge_conflict_trees(left, right); end
958
+ end
959
+
960
+ class RBI::Rewriters::Merge::Keep < ::T::Enum
961
+ enums do
962
+ NONE = new
963
+ LEFT = new
964
+ RIGHT = new
965
+ end
966
+ end
967
+
968
+ class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor
969
+ sig { params(output: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).void }
970
+ def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
971
+
972
+ sig { returns(T::Array[RBI::Rewriters::Merge::Conflict]) }
973
+ def conflicts; end
974
+
975
+ sig { override.params(node: T.nilable(RBI::Node)).void }
976
+ def visit(node); end
977
+
978
+ private
979
+
980
+ sig { returns(RBI::Tree) }
981
+ def current_scope; end
982
+
983
+ sig { params(left: RBI::Scope, right: RBI::Scope).void }
984
+ def make_conflict_scope(left, right); end
985
+
986
+ sig { params(left: RBI::Node, right: RBI::Node).void }
987
+ def make_conflict_tree(left, right); end
988
+
989
+ sig { params(node: RBI::Node).returns(T.nilable(RBI::Node)) }
990
+ def previous_definition(node); end
991
+
992
+ sig { params(left: RBI::Scope, right: RBI::Scope).returns(RBI::Scope) }
993
+ def replace_scope_header(left, right); end
994
+ end
995
+
996
+ class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor
997
+ sig { override.params(node: T.nilable(RBI::Node)).void }
998
+ def visit(node); end
999
+ end
1000
+
1001
+ class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor
1002
+ sig { override.params(node: T.nilable(RBI::Node)).void }
1003
+ def visit(node); end
1004
+ end
1005
+
1006
+ class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor
1007
+ sig { params(index: RBI::Index).void }
1008
+ def initialize(index); end
1009
+
1010
+ sig { returns(T::Array[RBI::Rewriters::RemoveKnownDefinitions::Operation]) }
1011
+ def operations; end
1012
+
1013
+ sig { override.params(node: T.nilable(RBI::Node)).void }
1014
+ def visit(node); end
1015
+
1016
+ sig { params(nodes: T::Array[RBI::Node]).void }
1017
+ def visit_all(nodes); end
1018
+
1019
+ private
1020
+
1021
+ sig { params(node: RBI::Node, previous: RBI::Node).returns(T::Boolean) }
1022
+ def can_delete_node?(node, previous); end
1023
+
1024
+ sig { params(node: RBI::Node, previous: RBI::Node).void }
1025
+ def delete_node(node, previous); end
1026
+
1027
+ sig { params(node: RBI::Indexable).returns(T.nilable(RBI::Node)) }
1028
+ def previous_definition_for(node); end
1029
+
1030
+ class << self
1031
+ sig { params(tree: RBI::Tree, index: RBI::Index).returns([RBI::Tree, T::Array[RBI::Rewriters::RemoveKnownDefinitions::Operation]]) }
1032
+ def remove(tree, index); end
1033
+ end
1034
+ end
1035
+
1036
+ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
1037
+ const :deleted_node, RBI::Node
1038
+ const :duplicate_of, RBI::Node
1039
+
1040
+ sig { returns(String) }
1041
+ def to_s; end
1042
+
1043
+ class << self
1044
+ def inherited(s); end
1045
+ end
1046
+ end
1047
+
1048
+ class RBI::Rewriters::SortNodes < ::RBI::Visitor
1049
+ sig { override.params(node: T.nilable(RBI::Node)).void }
1050
+ def visit(node); end
1051
+
1052
+ private
1053
+
1054
+ sig { params(kind: RBI::Group::Kind).returns(Integer) }
1055
+ def group_rank(kind); end
1056
+
1057
+ sig { params(node: RBI::Node).returns(T.nilable(String)) }
1058
+ def node_name(node); end
1059
+
1060
+ sig { params(node: RBI::Node).returns(Integer) }
1061
+ def node_rank(node); end
1062
+ end
1063
+
1064
+ class RBI::Scope < ::RBI::Tree
1065
+ include ::RBI::Indexable
1066
+
1067
+ abstract!
1068
+
1069
+ def initialize(*args, &blk); end
1070
+
1071
+ sig { override.params(v: RBI::Printer).void }
1072
+ def accept_printer(v); end
1073
+
1074
+ sig { returns(T.self_type) }
1075
+ def dup_empty; end
1076
+
1077
+ sig { abstract.returns(String) }
1078
+ def fully_qualified_name; end
1079
+
1080
+ sig { override.returns(T::Array[String]) }
1081
+ def index_ids; end
1082
+
1083
+ sig { params(v: RBI::Printer).void }
1084
+ def print_body(v); end
1085
+
1086
+ sig { abstract.params(v: RBI::Printer).void }
1087
+ def print_header(v); end
1088
+
1089
+ sig { override.returns(String) }
1090
+ def to_s; end
1091
+ end
1092
+
1093
+ class RBI::ScopeConflict < ::RBI::Tree
1094
+ sig { params(left: RBI::Scope, right: RBI::Scope, left_name: String, right_name: String).void }
1095
+ def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
1096
+
1097
+ sig { override.params(v: RBI::Printer).void }
1098
+ def accept_printer(v); end
1099
+
1100
+ sig { returns(RBI::Scope) }
1101
+ def left; end
1102
+
1103
+ sig { override.returns(T::Boolean) }
1104
+ def oneline?; end
1105
+
1106
+ def right; end
1107
+ end
1108
+
1109
+ class RBI::Send < ::RBI::NodeWithComments
1110
+ include ::RBI::Indexable
1111
+
1112
+ sig { params(method: String, args: T::Array[RBI::Arg], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Send).void)).void }
1113
+ def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1114
+
1115
+ sig { params(arg: RBI::Arg).void }
1116
+ def <<(arg); end
1117
+
1118
+ sig { params(other: T.nilable(Object)).returns(T::Boolean) }
1119
+ def ==(other); end
1120
+
1121
+ sig { override.params(v: RBI::Printer).void }
1122
+ def accept_printer(v); end
1123
+
1124
+ sig { returns(T::Array[RBI::Arg]) }
1125
+ def args; end
1126
+
1127
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
1128
+ def compatible_with?(other); end
1129
+
1130
+ sig { override.returns(T::Array[String]) }
1131
+ def index_ids; end
1132
+
1133
+ sig { returns(String) }
1134
+ def method; end
1135
+
1136
+ sig { returns(String) }
1137
+ def to_s; end
1138
+ end
1139
+
1140
+ class RBI::Sig < ::RBI::Node
1141
+ sig { params(params: T::Array[RBI::SigParam], return_type: T.nilable(String), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: T::Boolean, type_params: T::Array[String], checked: T.nilable(Symbol), loc: T.nilable(RBI::Loc), block: T.nilable(T.proc.params(node: RBI::Sig).void)).void }
1142
+ 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), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end
1143
+
1144
+ sig { params(param: RBI::SigParam).void }
1145
+ def <<(param); end
1146
+
1147
+ sig { params(other: Object).returns(T::Boolean) }
1148
+ def ==(other); end
1149
+
1150
+ sig { override.params(v: RBI::Printer).void }
1151
+ def accept_printer(v); end
1152
+
1153
+ sig { returns(T.nilable(Symbol)) }
1154
+ def checked; end
1155
+
1156
+ def checked=(_arg0); end
1157
+
1158
+ sig { returns(T::Boolean) }
1159
+ def inline_params?; end
1160
+
1161
+ sig { returns(T::Boolean) }
1162
+ def is_abstract; end
1163
+
1164
+ def is_abstract=(_arg0); end
1165
+ def is_overridable; end
1166
+ def is_overridable=(_arg0); end
1167
+ def is_override; end
1168
+ def is_override=(_arg0); end
1169
+
1170
+ sig { override.returns(T::Boolean) }
1171
+ def oneline?; end
1172
+
1173
+ sig { returns(T::Array[RBI::SigParam]) }
1174
+ def params; end
1175
+
1176
+ sig { returns(T.nilable(String)) }
1177
+ def return_type; end
1178
+
1179
+ def return_type=(_arg0); end
1180
+
1181
+ sig { returns(T::Array[String]) }
1182
+ def type_params; end
1183
+ end
1184
+
1185
+ class RBI::SigBuilder < ::RBI::ASTVisitor
1186
+ sig { void }
1187
+ def initialize; end
1188
+
1189
+ sig { returns(RBI::Sig) }
1190
+ def current; end
1191
+
1192
+ def current=(_arg0); end
1193
+
1194
+ sig { override.params(node: T.nilable(AST::Node)).void }
1195
+ def visit(node); end
1196
+
1197
+ sig { params(node: AST::Node).void }
1198
+ def visit_send(node); end
1199
+
1200
+ class << self
1201
+ sig { params(node: AST::Node).returns(RBI::Sig) }
1202
+ def build(node); end
1203
+ end
1204
+ end
1205
+
1206
+ class RBI::SigParam < ::RBI::NodeWithComments
1207
+ sig { params(name: String, type: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::SigParam).void)).void }
1208
+ def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1209
+
1210
+ sig { params(other: Object).returns(T::Boolean) }
1211
+ def ==(other); end
1212
+
1213
+ sig { override.params(v: RBI::Printer).void }
1214
+ def accept_printer(v); end
1215
+
1216
+ sig { returns(T::Array[String]) }
1217
+ def comments_lines; end
1218
+
1219
+ sig { returns(String) }
1220
+ def name; end
1221
+
1222
+ sig { params(v: RBI::Printer, last: T::Boolean).void }
1223
+ def print_comment_leading_space(v, last:); end
1224
+
1225
+ def type; end
1226
+ end
1227
+
1228
+ class RBI::SingletonClass < ::RBI::Scope
1229
+ sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::SingletonClass).void)).void }
1230
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1231
+
1232
+ sig { override.returns(String) }
1233
+ def fully_qualified_name; end
1234
+
1235
+ sig { override.params(v: RBI::Printer).void }
1236
+ def print_header(v); end
1237
+ end
1238
+
1239
+ class RBI::Struct < ::RBI::Scope
1240
+ sig { params(name: String, members: T::Array[Symbol], keyword_init: T::Boolean, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(struct: RBI::Struct).void)).void }
1241
+ def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1242
+
1243
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
1244
+ def compatible_with?(other); end
1245
+
1246
+ sig { override.returns(String) }
1247
+ def fully_qualified_name; end
1248
+
1249
+ sig { returns(T::Boolean) }
1250
+ def keyword_init; end
1251
+
1252
+ def keyword_init=(_arg0); end
1253
+
1254
+ sig { returns(T::Array[Symbol]) }
1255
+ def members; end
1256
+
1257
+ def members=(_arg0); end
1258
+
1259
+ sig { returns(String) }
1260
+ def name; end
1261
+
1262
+ def name=(_arg0); end
1263
+
1264
+ sig { override.params(v: RBI::Printer).void }
1265
+ def print_header(v); end
1266
+ end
1267
+
1268
+ class RBI::TEnum < ::RBI::Class
1269
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(klass: RBI::TEnum).void)).void }
1270
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1271
+ end
1272
+
1273
+ class RBI::TEnumBlock < ::RBI::NodeWithComments
1274
+ include ::RBI::Indexable
1275
+
1276
+ sig { params(names: T::Array[String], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::TEnumBlock).void)).void }
1277
+ def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1278
+
1279
+ sig { params(name: String).void }
1280
+ def <<(name); end
1281
+
1282
+ sig { override.params(v: RBI::Printer).void }
1283
+ def accept_printer(v); end
1284
+
1285
+ sig { returns(T::Boolean) }
1286
+ def empty?; end
1287
+
1288
+ sig { override.returns(T::Array[String]) }
1289
+ def index_ids; end
1290
+
1291
+ sig { override.params(other: RBI::Node).void }
1292
+ def merge_with(other); end
1293
+
1294
+ sig { returns(T::Array[String]) }
1295
+ def names; end
1296
+
1297
+ sig { override.returns(String) }
1298
+ def to_s; end
1299
+ end
1300
+
1301
+ class RBI::TStruct < ::RBI::Class
1302
+ sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(klass: RBI::TStruct).void)).void }
1303
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1304
+ end
1305
+
1306
+ class RBI::TStructConst < ::RBI::TStructField
1307
+ include ::RBI::Indexable
1308
+
1309
+ sig { params(name: String, type: String, default: T.nilable(String), loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::TStructConst).void)).void }
1310
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1311
+
1312
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
1313
+ def compatible_with?(other); end
1314
+
1315
+ sig { override.returns(T::Array[String]) }
1316
+ def fully_qualified_names; end
1317
+
1318
+ sig { override.returns(T::Array[String]) }
1319
+ def index_ids; end
1320
+
1321
+ sig { override.returns(String) }
1322
+ def to_s; end
1323
+ end
1324
+
1325
+ class RBI::TStructField < ::RBI::NodeWithComments
1326
+ abstract!
1327
+
1328
+ sig { params(name: String, type: String, default: T.nilable(String), loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
1329
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1330
+
1331
+ sig { override.params(v: RBI::Printer).void }
1332
+ def accept_printer(v); end
1333
+
1334
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
1335
+ def compatible_with?(other); end
1336
+
1337
+ sig { returns(T.nilable(String)) }
1338
+ def default; end
1339
+
1340
+ def default=(_arg0); end
1341
+
1342
+ sig { abstract.returns(T::Array[String]) }
1343
+ def fully_qualified_names; end
1344
+
1345
+ sig { returns(String) }
1346
+ def name; end
1347
+
1348
+ def name=(_arg0); end
1349
+ def type; end
1350
+ def type=(_arg0); end
1351
+ end
1352
+
1353
+ class RBI::TStructProp < ::RBI::TStructField
1354
+ include ::RBI::Indexable
1355
+
1356
+ sig { params(name: String, type: String, default: T.nilable(String), loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::TStructProp).void)).void }
1357
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1358
+
1359
+ sig { override.params(other: RBI::Node).returns(T::Boolean) }
1360
+ def compatible_with?(other); end
1361
+
1362
+ sig { override.returns(T::Array[String]) }
1363
+ def fully_qualified_names; end
1364
+
1365
+ sig { override.returns(T::Array[String]) }
1366
+ def index_ids; end
1367
+
1368
+ sig { override.returns(String) }
1369
+ def to_s; end
1370
+ end
1371
+
1372
+ class RBI::Tree < ::RBI::NodeWithComments
1373
+ sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Tree).void)).void }
1374
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1375
+
1376
+ sig { params(node: RBI::Node).void }
1377
+ def <<(node); end
1378
+
1379
+ sig { override.params(v: RBI::Printer).void }
1380
+ def accept_printer(v); end
1381
+
1382
+ sig { params(with_todo_comment: T::Boolean).void }
1383
+ def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
1384
+
1385
+ sig { params(annotation: String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
1386
+ def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
1387
+
1388
+ sig { params(name: String, superclass_name: T.nilable(String), block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) }
1389
+ def create_class(name, superclass_name: T.unsafe(nil), &block); end
1390
+
1391
+ sig { params(name: String, value: String).void }
1392
+ def create_constant(name, value:); end
1393
+
1394
+ sig { params(name: String).void }
1395
+ def create_extend(name); end
1396
+
1397
+ sig { params(name: String).void }
1398
+ def create_include(name); end
1399
+
1400
+ sig { params(name: String, parameters: T::Array[RBI::TypedParam], return_type: String, class_method: T::Boolean, visibility: RBI::Visibility).void }
1401
+ def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end
1402
+
1403
+ sig { params(name: String).void }
1404
+ def create_mixes_in_class_methods(name); end
1405
+
1406
+ sig { params(name: String, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) }
1407
+ def create_module(name, &block); end
1408
+
1409
+ sig { params(constant: Module, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).void }
1410
+ def create_path(constant, &block); end
1411
+
1412
+ sig { params(name: String, value: String).void }
1413
+ def create_type_member(name, value: T.unsafe(nil)); end
1414
+
1415
+ sig { params(annotation: String).void }
1416
+ def deannotate!(annotation); end
1417
+
1418
+ sig { returns(T::Boolean) }
1419
+ def empty?; end
1420
+
1421
+ sig { void }
1422
+ def group_nodes!; end
1423
+
1424
+ sig { returns(RBI::Index) }
1425
+ def index; end
1426
+
1427
+ sig { params(other: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).returns(RBI::MergeTree) }
1428
+ def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
1429
+
1430
+ sig { void }
1431
+ def nest_non_public_methods!; end
1432
+
1433
+ sig { void }
1434
+ def nest_singleton_methods!; end
1435
+
1436
+ sig { returns(T::Array[RBI::Node]) }
1437
+ def nodes; end
1438
+
1439
+ sig { override.returns(T::Boolean) }
1440
+ def oneline?; end
1441
+
1442
+ sig { void }
1443
+ def sort_nodes!; end
1444
+
1445
+ private
1446
+
1447
+ sig { params(node: RBI::Node).returns(RBI::Node) }
1448
+ def create_node(node); end
1449
+
1450
+ sig { returns(T::Hash[String, RBI::Node]) }
1451
+ def nodes_cache; end
1452
+
1453
+ sig { params(name: String).returns(T::Boolean) }
1454
+ def valid_method_name?(name); end
1455
+ end
1456
+
1457
+ RBI::Tree::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array)
1458
+
1459
+ class RBI::TreeBuilder < ::RBI::ASTVisitor
1460
+ sig { params(file: String, comments: T::Array[Parser::Source::Comment], nodes_comments_assoc: T::Hash[Parser::Source::Map, T::Array[Parser::Source::Comment]]).void }
1461
+ def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end
1462
+
1463
+ sig { void }
1464
+ def post_process; end
1465
+
1466
+ sig { returns(RBI::Tree) }
1467
+ def tree; end
1468
+
1469
+ sig { override.params(node: T.nilable(Object)).void }
1470
+ def visit(node); end
1471
+
1472
+ private
1473
+
1474
+ sig { void }
1475
+ def assoc_dangling_comments; end
1476
+
1477
+ sig { returns(RBI::Tree) }
1478
+ def current_scope; end
1479
+
1480
+ sig { returns(T::Array[RBI::Sig]) }
1481
+ def current_sigs; end
1482
+
1483
+ sig { params(node: AST::Node).returns(T::Array[RBI::Comment]) }
1484
+ def node_comments(node); end
1485
+
1486
+ sig { params(node: AST::Node).returns(RBI::Loc) }
1487
+ def node_loc(node); end
1488
+
1489
+ sig { params(node: AST::Node).returns(T.nilable(RBI::Node)) }
1490
+ def parse_block(node); end
1491
+
1492
+ sig { params(node: AST::Node).returns(RBI::Node) }
1493
+ def parse_const_assign(node); end
1494
+
1495
+ sig { params(node: AST::Node).returns(RBI::Method) }
1496
+ def parse_def(node); end
1497
+
1498
+ sig { params(node: AST::Node).returns(RBI::TEnumBlock) }
1499
+ def parse_enum(node); end
1500
+
1501
+ sig { params(node: AST::Node).returns(RBI::Param) }
1502
+ def parse_param(node); end
1503
+
1504
+ sig { params(node: AST::Node).returns(RBI::Scope) }
1505
+ def parse_scope(node); end
1506
+
1507
+ sig { params(node: AST::Node).returns(T.nilable(RBI::Node)) }
1508
+ def parse_send(node); end
1509
+
1510
+ sig { params(node: AST::Node).returns(T::Array[RBI::Arg]) }
1511
+ def parse_send_args(node); end
1512
+
1513
+ sig { params(node: AST::Node).returns(RBI::Sig) }
1514
+ def parse_sig(node); end
1515
+
1516
+ sig { params(node: AST::Node).returns(RBI::Struct) }
1517
+ def parse_struct(node); end
1518
+
1519
+ sig { params(node: AST::Node).returns([String, String, T.nilable(String)]) }
1520
+ def parse_tstruct_prop(node); end
1521
+
1522
+ sig { void }
1523
+ def separate_header_comments; end
1524
+
1525
+ sig { void }
1526
+ def set_root_tree_loc; end
1527
+
1528
+ sig { params(node: AST::Node).returns(T::Boolean) }
1529
+ def struct_definition?(node); end
1530
+ end
1531
+
1532
+ class RBI::TypeMember < ::RBI::NodeWithComments
1533
+ sig { params(name: String, value: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::TypeMember).void)).void }
1534
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
1535
+
1536
+ sig { override.params(v: RBI::Printer).void }
1537
+ def accept_printer(v); end
1538
+
1539
+ sig { returns(String) }
1540
+ def fully_qualified_name; end
1541
+
1542
+ sig { returns(String) }
1543
+ def name; end
1544
+
1545
+ sig { override.returns(String) }
1546
+ def to_s; end
1547
+
1548
+ def value; end
1549
+ end
1550
+
1551
+ RBI::VERSION = T.let(T.unsafe(nil), String)
1552
+
1553
+ class RBI::Visibility < ::RBI::NodeWithComments
1554
+ abstract!
1555
+
1556
+ sig { params(visibility: Symbol, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
1557
+ def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
1558
+
1559
+ sig { params(other: RBI::Visibility).returns(T::Boolean) }
1560
+ def ==(other); end
1561
+
1562
+ sig { override.params(v: RBI::Printer).void }
1563
+ def accept_printer(v); end
1564
+
1565
+ sig { returns(T::Boolean) }
1566
+ def private?; end
1567
+
1568
+ sig { returns(T::Boolean) }
1569
+ def protected?; end
1570
+
1571
+ sig { returns(T::Boolean) }
1572
+ def public?; end
1573
+
1574
+ sig { returns(Symbol) }
1575
+ def visibility; end
1576
+ end
1577
+
1578
+ class RBI::VisibilityGroup < ::RBI::Tree
1579
+ sig { params(visibility: RBI::Visibility).void }
1580
+ def initialize(visibility); end
1581
+
1582
+ sig { override.params(v: RBI::Printer).void }
1583
+ def accept_printer(v); end
1584
+
1585
+ sig { override.returns(T::Boolean) }
1586
+ def oneline?; end
1587
+
1588
+ sig { returns(RBI::Visibility) }
1589
+ def visibility; end
1590
+ end
1591
+
1592
+ class RBI::Visitor
1593
+ abstract!
1594
+
1595
+ def initialize(*args, &blk); end
1596
+
1597
+ sig { abstract.params(node: T.nilable(RBI::Node)).void }
1598
+ def visit(node); end
1599
+
1600
+ sig { params(nodes: T::Array[RBI::Node]).void }
1601
+ def visit_all(nodes); end
1602
+ end