twirbet 0.1.0 → 0.1.1

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