mootool 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +7 -0
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +71 -67
  5. data/lib/mootool/command.rb +1 -0
  6. data/lib/mootool/controller_base.rb +1 -0
  7. data/lib/mootool/controllers/dwarf.rb +2 -1
  8. data/lib/mootool/controllers/dyld_linker.rb +1 -0
  9. data/lib/mootool/controllers/dyld_shared_cache.rb +1 -0
  10. data/lib/mootool/controllers/fat_binary.rb +1 -0
  11. data/lib/mootool/controllers/kernel_collection.rb +4 -3
  12. data/lib/mootool/controllers/sections.rb +1 -0
  13. data/lib/mootool/core_extensions.rb +3 -3
  14. data/lib/mootool/models/decompressor.rb +5 -2
  15. data/lib/mootool/models/device_tree.rb +5 -3
  16. data/lib/mootool/models/img4.rb +2 -1
  17. data/lib/mootool/models/ipsw.rb +5 -1
  18. data/lib/mootool/version.rb +2 -1
  19. data/lib/mootool.rb +1 -0
  20. data/sorbet/config +1 -1
  21. data/sorbet/rbi/annotations/.gitattributes +1 -0
  22. data/sorbet/rbi/annotations/rainbow.rbi +2 -2
  23. data/sorbet/rbi/gems/.gitattributes +1 -0
  24. data/sorbet/rbi/gems/ast@2.4.2.rbi +48 -82
  25. data/sorbet/rbi/gems/childprocess@4.1.0.rbi +107 -153
  26. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +192 -332
  27. data/sorbet/rbi/gems/docile@1.4.0.rbi +376 -0
  28. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  29. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +166 -276
  30. data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.6.3.rbi} +119 -228
  31. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  32. data/sorbet/rbi/gems/lzfse@0.0.2.rbi +55 -0
  33. data/sorbet/rbi/gems/lzss@0.1.rbi +8 -0
  34. data/sorbet/rbi/gems/netrc@0.11.0.rbi +52 -80
  35. data/sorbet/rbi/gems/{overcommit@0.59.1.rbi → overcommit@0.60.0.rbi} +534 -887
  36. data/sorbet/rbi/gems/parallel@1.23.0.rbi +273 -0
  37. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +5451 -0
  38. data/sorbet/rbi/gems/{plist@3.6.0.rbi → plist@3.7.0.rbi} +125 -3
  39. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  40. data/sorbet/rbi/gems/prism@0.17.1.rbi +27700 -0
  41. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  42. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +141 -191
  43. data/sorbet/rbi/gems/rake@13.1.0.rbi +2887 -0
  44. data/sorbet/rbi/gems/{rbi@0.0.15.rbi → rbi@0.1.4.rbi} +979 -1676
  45. data/sorbet/rbi/gems/regexp_parser@2.8.2.rbi +3749 -0
  46. data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.2.6.rbi} +811 -1268
  47. data/sorbet/rbi/gems/{rspec-core@3.11.0.rbi → rspec-core@3.12.2.rbi} +2662 -4722
  48. data/sorbet/rbi/gems/{rspec-expectations@3.11.0.rbi → rspec-expectations@3.12.3.rbi} +1557 -2608
  49. data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +5306 -0
  50. data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +1609 -0
  51. data/sorbet/rbi/gems/rspec@3.12.0.rbi +82 -0
  52. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7090 -0
  53. data/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi +1125 -0
  54. data/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi +878 -0
  55. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +88 -173
  56. data/sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi +7997 -0
  57. data/sorbet/rbi/gems/rubocop@1.57.2.rbi +56813 -0
  58. data/sorbet/rbi/gems/ruby-lzma@0.4.3.rbi +19 -0
  59. data/sorbet/rbi/gems/ruby-macho@3.0.0.rbi +899 -1237
  60. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  61. data/sorbet/rbi/gems/rubyzip@2.3.2.rbi +808 -1275
  62. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +216 -0
  63. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2148 -0
  64. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  65. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  66. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
  67. data/sorbet/rbi/gems/tapioca@0.11.12.rbi +3507 -0
  68. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  69. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  70. data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.34.rbi} +4531 -7160
  71. data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +24 -72
  72. data/sorbet/rbi/sorbet-typed/lib/rake/all/rake.rbi +385 -1697
  73. data/sorbet/rbi/sorbet-typed/lib/rspec-core/all/rspec-core.rbi +7 -30
  74. data/sorbet/rbi/sorbet-typed/lib/rubocop/>=1.8/rubocop.rbi +1 -3
  75. data/sorbet/rbi/sorbet-typed/lib/thor/all/thor.rbi +905 -0
  76. data/sorbet/rbi/sorbet-typed/lib/yard/all/yard.rbi +35 -0
  77. data/sorbet/tapioca/require.rb +13 -1
  78. metadata +47 -35
  79. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
  80. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -8
  81. data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -353
  82. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +0 -6198
  83. data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -8
  84. data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -3587
  85. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -3927
  86. data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +0 -6506
  87. data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +0 -2040
  88. data/sorbet/rbi/gems/rspec@3.11.0.rbi +0 -120
  89. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +0 -7990
  90. data/sorbet/rbi/gems/rubocop-rspec@2.12.1.rbi +0 -7604
  91. data/sorbet/rbi/gems/rubocop@1.35.0.rbi +0 -62260
  92. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1445
  93. data/sorbet/rbi/gems/spoom@1.1.12.rbi +0 -2829
  94. data/sorbet/rbi/gems/tapioca@0.9.3.rbi +0 -2151
  95. data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -4532
  96. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +0 -60
  97. data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -8
  98. data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -3075
  99. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +0 -458
  100. data/sorbet/rbi/todo.rbi +0 -7
@@ -1,2151 +0,0 @@
1
- # typed: false
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `tapioca` gem.
5
- # Please instead update this file by running `bin/tapioca gem tapioca`.
6
-
7
- class Bundler::Dependency < ::Gem::Dependency
8
- include ::Tapioca::Gemfile::AutoRequireHook
9
- end
10
-
11
- # We need to do the alias-method-chain dance since Bootsnap does the same,
12
- # and prepended modules and alias-method-chain don't play well together.
13
- #
14
- # So, why does Bootsnap do alias-method-chain and not prepend? Glad you asked!
15
- # That's because RubyGems does alias-method-chain for Kernel#require and such,
16
- # so, if Bootsnap were to do prepend, it might end up breaking RubyGems.
17
- class Module
18
- def append_features(constant); end
19
- def autoload(const_name, path); end
20
- def extend_object(obj); end
21
- def prepend_features(constant); end
22
- end
23
-
24
- module RBI; end
25
-
26
- class RBI::Tree < ::RBI::NodeWithComments
27
- sig do
28
- params(
29
- loc: T.nilable(::RBI::Loc),
30
- comments: T::Array[::RBI::Comment],
31
- block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
32
- ).void
33
- end
34
- def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
35
-
36
- sig { params(node: ::RBI::Node).void }
37
- def <<(node); end
38
-
39
- sig { override.params(v: ::RBI::Printer).void }
40
- def accept_printer(v); end
41
-
42
- sig { params(with_todo_comment: T::Boolean).void }
43
- def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
44
-
45
- sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
46
- def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
47
-
48
- sig do
49
- params(
50
- name: ::String,
51
- superclass_name: T.nilable(::String),
52
- block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)
53
- ).returns(::RBI::Scope)
54
- end
55
- def create_class(name, superclass_name: T.unsafe(nil), &block); end
56
-
57
- sig { params(name: ::String, value: ::String).void }
58
- def create_constant(name, value:); end
59
-
60
- sig { params(name: ::String).void }
61
- def create_extend(name); end
62
-
63
- sig { params(name: ::String).void }
64
- def create_include(name); end
65
-
66
- sig do
67
- params(
68
- name: ::String,
69
- parameters: T::Array[::RBI::TypedParam],
70
- return_type: ::String,
71
- class_method: T::Boolean,
72
- visibility: ::RBI::Visibility
73
- ).void
74
- end
75
- def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end
76
-
77
- sig { params(name: ::String).void }
78
- def create_mixes_in_class_methods(name); end
79
-
80
- sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
81
- def create_module(name, &block); end
82
-
83
- sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).void }
84
- def create_path(constant, &block); end
85
-
86
- sig do
87
- params(
88
- name: ::String,
89
- type: ::String,
90
- variance: ::Symbol,
91
- fixed: T.nilable(::String),
92
- upper: T.nilable(::String),
93
- lower: T.nilable(::String)
94
- ).void
95
- end
96
- def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end
97
-
98
- sig { params(annotation: ::String).void }
99
- def deannotate!(annotation); end
100
-
101
- sig { returns(T::Boolean) }
102
- def empty?; end
103
-
104
- sig { void }
105
- def group_nodes!; end
106
-
107
- sig { returns(::RBI::Index) }
108
- def index; end
109
-
110
- sig do
111
- params(
112
- other: ::RBI::Tree,
113
- left_name: ::String,
114
- right_name: ::String,
115
- keep: ::RBI::Rewriters::Merge::Keep
116
- ).returns(::RBI::MergeTree)
117
- end
118
- def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
119
-
120
- sig { void }
121
- def nest_non_public_methods!; end
122
-
123
- sig { void }
124
- def nest_singleton_methods!; end
125
-
126
- sig { returns(T::Array[::RBI::Node]) }
127
- def nodes; end
128
-
129
- sig { override.returns(T::Boolean) }
130
- def oneline?; end
131
-
132
- sig { void }
133
- def sort_nodes!; end
134
-
135
- private
136
-
137
- sig { params(node: ::RBI::Node).returns(::RBI::Node) }
138
- def create_node(node); end
139
-
140
- sig { returns(T::Hash[::String, ::RBI::Node]) }
141
- def nodes_cache; end
142
- end
143
-
144
- class RBI::TypedParam < ::T::Struct
145
- const :param, ::RBI::Param
146
- const :type, ::String
147
-
148
- class << self
149
- def inherited(s); end
150
- end
151
- end
152
-
153
- RBI::VERSION = T.let(T.unsafe(nil), String)
154
-
155
- module T::Generic
156
- def [](*types); end
157
- def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end
158
- def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end
159
- end
160
-
161
- # This module intercepts calls to generic type instantiations and type variable definitions.
162
- # Tapioca stores the data from those calls in a `GenericTypeRegistry` which can then be used
163
- # to look up the original call details when we are trying to do code generation.
164
- #
165
- # We are interested in the data of the `[]`, `type_member` and `type_template` calls which
166
- # are all needed to generate good generic information at runtime.
167
- module T::Generic::TypeStoragePatch
168
- def [](*types); end
169
- def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end
170
- def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end
171
- end
172
-
173
- class T::Types::Simple < ::T::Types::Base
174
- def name; end
175
- end
176
-
177
- module T::Types::Simple::GenericPatch
178
- # This method intercepts calls to the `name` method for simple types, so that
179
- # it can ask the name to the type if the type is generic, since, by this point,
180
- # we've created a clone of that type with the `name` method returning the
181
- # appropriate name for that specific concrete type.
182
- def name; end
183
- end
184
-
185
- module T::Types::Simple::NamePatch
186
- def name; end
187
- end
188
-
189
- module T::Types::Simple::Private; end
190
-
191
- module T::Types::Simple::Private::Pool
192
- class << self
193
- def type_for_module(mod); end
194
- end
195
- end
196
-
197
- module T::Utils
198
- class << self
199
- def coerce(val); end
200
- end
201
- end
202
-
203
- module T::Utils::CoercePatch
204
- def coerce(val); end
205
- end
206
-
207
- module Tapioca
208
- class << self
209
- sig do
210
- type_parameters(:Result)
211
- .params(
212
- blk: T.proc.returns(T.type_parameter(:Result))
213
- ).returns(T.type_parameter(:Result))
214
- end
215
- def silence_warnings(&blk); end
216
- end
217
- end
218
-
219
- Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String)
220
- Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String)
221
- Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String)
222
- Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String)
223
-
224
- class Tapioca::Cli < ::Thor
225
- include ::Tapioca::CliHelper
226
- include ::Tapioca::ConfigHelper
227
- include ::Tapioca::EnvHelper
228
-
229
- def __print_version; end
230
- def annotations; end
231
- def check_shims; end
232
- def configure; end
233
- def dsl(*constants); end
234
- def gem(*gems); end
235
- def init; end
236
- def require; end
237
- def todo; end
238
-
239
- private
240
-
241
- def print_init_next_steps; end
242
-
243
- class << self
244
- def exit_on_failure?; end
245
- end
246
- end
247
-
248
- Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String)
249
-
250
- module Tapioca::CliHelper
251
- requires_ancestor { Thor::Shell }
252
-
253
- sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T.nilable(::String)) }
254
- def netrc_file(options); end
255
-
256
- sig { params(options: T::Hash[::Symbol, T.untyped]).returns(::Tapioca::RBIFormatter) }
257
- def rbi_formatter(options); end
258
-
259
- sig { params(message: ::String, color: T.any(::Symbol, T::Array[::Symbol])).void }
260
- def say_error(message = T.unsafe(nil), *color); end
261
- end
262
-
263
- module Tapioca::Commands; end
264
-
265
- class Tapioca::Commands::Annotations < ::Tapioca::Commands::Command
266
- sig do
267
- params(
268
- central_repo_root_uris: T::Array[::String],
269
- auth: T.nilable(::String),
270
- netrc_file: T.nilable(::String),
271
- central_repo_index_path: ::String,
272
- typed_overrides: T::Hash[::String, ::String]
273
- ).void
274
- end
275
- def initialize(central_repo_root_uris:, auth: T.unsafe(nil), netrc_file: T.unsafe(nil), central_repo_index_path: T.unsafe(nil), typed_overrides: T.unsafe(nil)); end
276
-
277
- sig { override.void }
278
- def execute; end
279
-
280
- private
281
-
282
- sig { params(name: ::String, content: ::String).returns(::String) }
283
- def add_header(name, content); end
284
-
285
- sig { params(name: ::String, content: ::String).returns(::String) }
286
- def apply_typed_override(name, content); end
287
-
288
- sig { params(repo_uris: T::Array[::String], gem_name: ::String).void }
289
- def fetch_annotation(repo_uris, gem_name); end
290
-
291
- sig { params(gem_names: T::Array[::String]).returns(T::Array[::String]) }
292
- def fetch_annotations(gem_names); end
293
-
294
- sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) }
295
- def fetch_file(repo_uri, path); end
296
-
297
- sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) }
298
- def fetch_http_file(repo_uri, path); end
299
-
300
- sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(Tapioca::RepoIndex)) }
301
- def fetch_index(repo_uri, repo_number:); end
302
-
303
- sig { returns(T::Hash[::String, Tapioca::RepoIndex]) }
304
- def fetch_indexes; end
305
-
306
- sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) }
307
- def fetch_local_file(repo_uri, path); end
308
-
309
- sig { returns(T::Array[::String]) }
310
- def list_gemfile_gems; end
311
-
312
- sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) }
313
- def merge_files(gem_name, contents); end
314
-
315
- sig { params(project_gems: T::Array[::String]).void }
316
- def remove_expired_annotations(project_gems); end
317
-
318
- sig { returns(T::Hash[::String, T.nilable(::String)]) }
319
- def repo_tokens; end
320
-
321
- sig { params(path: ::String, repo_uri: ::String, message: ::String).void }
322
- def say_http_error(path, repo_uri, message:); end
323
-
324
- sig { params(repo_uri: ::String).returns(T.nilable(::String)) }
325
- def token_for(repo_uri); end
326
- end
327
-
328
- class Tapioca::Commands::CheckShims < ::Tapioca::Commands::Command
329
- include ::Tapioca::SorbetHelper
330
- include ::Tapioca::RBIFilesHelper
331
-
332
- sig do
333
- params(
334
- gem_rbi_dir: ::String,
335
- dsl_rbi_dir: ::String,
336
- annotations_rbi_dir: ::String,
337
- shim_rbi_dir: ::String,
338
- todo_rbi_file: ::String,
339
- payload: T::Boolean
340
- ).void
341
- end
342
- def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:); end
343
-
344
- sig { override.void }
345
- def execute; end
346
- end
347
-
348
- # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
349
- class Tapioca::Commands::Command
350
- include ::Thor::Base
351
- include ::Thor::Invocation
352
- include ::Thor::Shell
353
- include ::Tapioca::CliHelper
354
- extend ::Thor::Base::ClassMethods
355
- extend ::Thor::Invocation::ClassMethods
356
-
357
- abstract!
358
-
359
- sig { void }
360
- def initialize; end
361
-
362
- # @abstract
363
- sig { abstract.void }
364
- def execute; end
365
-
366
- sig { returns(::Thor::Actions) }
367
- def file_writer; end
368
-
369
- private
370
-
371
- sig do
372
- params(
373
- path: T.any(::Pathname, ::String),
374
- content: ::String,
375
- force: T::Boolean,
376
- skip: T::Boolean,
377
- verbose: T::Boolean
378
- ).void
379
- end
380
- def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end
381
-
382
- sig { params(command: ::Symbol, args: ::String).returns(::String) }
383
- def default_command(command, *args); end
384
-
385
- sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void }
386
- def remove_file(path, verbose: T.unsafe(nil)); end
387
- end
388
-
389
- class Tapioca::Commands::Command::FileWriter < ::Thor
390
- include ::Thor::Actions
391
- extend ::Thor::Actions::ClassMethods
392
- end
393
-
394
- class Tapioca::Commands::Configure < ::Tapioca::Commands::Command
395
- sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void }
396
- def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end
397
-
398
- sig { override.void }
399
- def execute; end
400
-
401
- private
402
-
403
- sig { void }
404
- def create_binstub; end
405
-
406
- sig { void }
407
- def create_post_require; end
408
-
409
- sig { void }
410
- def create_sorbet_config; end
411
-
412
- sig { void }
413
- def create_tapioca_config; end
414
-
415
- sig { returns(::Bundler::Installer) }
416
- def installer; end
417
-
418
- sig { returns(::Bundler::StubSpecification) }
419
- def spec; end
420
- end
421
-
422
- class Tapioca::Commands::Dsl < ::Tapioca::Commands::Command
423
- include ::Tapioca::SorbetHelper
424
- include ::Tapioca::RBIFilesHelper
425
-
426
- sig do
427
- params(
428
- requested_constants: T::Array[::String],
429
- outpath: ::Pathname,
430
- only: T::Array[::String],
431
- exclude: T::Array[::String],
432
- file_header: T::Boolean,
433
- compiler_path: ::String,
434
- tapioca_path: ::String,
435
- should_verify: T::Boolean,
436
- quiet: T::Boolean,
437
- verbose: T::Boolean,
438
- number_of_workers: T.nilable(::Integer),
439
- auto_strictness: T::Boolean,
440
- gem_dir: ::String,
441
- rbi_formatter: ::Tapioca::RBIFormatter
442
- ).void
443
- end
444
- def initialize(requested_constants:, outpath:, only:, exclude:, file_header:, compiler_path:, tapioca_path:, should_verify: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil)); end
445
-
446
- sig { override.void }
447
- def execute; end
448
-
449
- private
450
-
451
- sig { void }
452
- def abort_if_pending_migrations!; end
453
-
454
- sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
455
- def build_error_for_files(cause, files); end
456
-
457
- sig do
458
- params(
459
- constant_name: ::String,
460
- rbi: ::RBI::File,
461
- outpath: ::Pathname,
462
- quiet: T::Boolean
463
- ).returns(T.nilable(::Pathname))
464
- end
465
- def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end
466
-
467
- sig { params(constant_names: T::Array[::String]).returns(T::Array[::Module]) }
468
- def constantize(constant_names); end
469
-
470
- sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) }
471
- def constantize_compilers(compiler_names); end
472
-
473
- sig { params(constant_name: ::String).returns(::Pathname) }
474
- def dsl_rbi_filename(constant_name); end
475
-
476
- sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) }
477
- def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end
478
-
479
- sig { params(constant: ::String).returns(::String) }
480
- def generate_command_for(constant); end
481
-
482
- sig { params(eager_load: T::Boolean).void }
483
- def load_application(eager_load:); end
484
-
485
- sig { void }
486
- def load_dsl_compilers; end
487
-
488
- sig { void }
489
- def load_dsl_extensions; end
490
-
491
- sig { returns(::Tapioca::Runtime::Loader) }
492
- def loader; end
493
-
494
- sig { params(dir: ::Pathname).void }
495
- def perform_dsl_verification(dir); end
496
-
497
- sig { params(files: T::Set[::Pathname]).void }
498
- def purge_stale_dsl_rbi_files(files); end
499
-
500
- sig { params(constant: ::String).returns(::String) }
501
- def rbi_filename_for(constant); end
502
-
503
- sig { params(path: ::Pathname).returns(T::Array[::Pathname]) }
504
- def rbi_files_in(path); end
505
-
506
- sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
507
- def report_diff_and_exit_if_out_of_date(diff, command); end
508
-
509
- sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) }
510
- def resolve(name); end
511
-
512
- sig { params(class_name: ::String).returns(::String) }
513
- def underscore(class_name); end
514
-
515
- sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) }
516
- def verify_dsl_rbi(tmp_dir:); end
517
- end
518
-
519
- class Tapioca::Commands::Gem < ::Tapioca::Commands::Command
520
- include ::Tapioca::SorbetHelper
521
- include ::Tapioca::RBIFilesHelper
522
-
523
- sig do
524
- params(
525
- gem_names: T::Array[::String],
526
- exclude: T::Array[::String],
527
- prerequire: T.nilable(::String),
528
- postrequire: ::String,
529
- typed_overrides: T::Hash[::String, ::String],
530
- outpath: ::Pathname,
531
- file_header: T::Boolean,
532
- include_doc: T::Boolean,
533
- include_exported_rbis: T::Boolean,
534
- number_of_workers: T.nilable(::Integer),
535
- auto_strictness: T::Boolean,
536
- dsl_dir: ::String,
537
- rbi_formatter: ::Tapioca::RBIFormatter
538
- ).void
539
- end
540
- def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil)); end
541
-
542
- sig { override.void }
543
- def execute; end
544
-
545
- sig { params(should_verify: T::Boolean).void }
546
- def sync(should_verify: T.unsafe(nil)); end
547
-
548
- private
549
-
550
- sig { returns(T::Array[::String]) }
551
- def added_rbis; end
552
-
553
- sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
554
- def build_error_for_files(cause, files); end
555
-
556
- sig { returns(::Tapioca::Gemfile) }
557
- def bundle; end
558
-
559
- sig { params(gem: ::Tapioca::Gemfile::GemSpec).void }
560
- def compile_gem_rbi(gem); end
561
-
562
- sig { params(gem_name: ::String).returns(::Pathname) }
563
- def existing_rbi(gem_name); end
564
-
565
- sig { returns(T::Hash[::String, ::String]) }
566
- def existing_rbis; end
567
-
568
- sig { params(gem_name: ::String).returns(::Pathname) }
569
- def expected_rbi(gem_name); end
570
-
571
- sig { returns(T::Hash[::String, ::String]) }
572
- def expected_rbis; end
573
-
574
- sig { params(file: ::String, error: ::LoadError).void }
575
- def explain_failed_require(file, error); end
576
-
577
- sig { params(gem_name: ::String).returns(T::Boolean) }
578
- def gem_rbi_exists?(gem_name); end
579
-
580
- sig { params(gem_name: ::String, version: ::String).returns(::Pathname) }
581
- def gem_rbi_filename(gem_name, version); end
582
-
583
- sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) }
584
- def gems_to_generate(gem_names); end
585
-
586
- sig { returns(::Tapioca::Runtime::Loader) }
587
- def loader; end
588
-
589
- sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void }
590
- def merge_with_exported_rbi(gem, file); end
591
-
592
- sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void }
593
- def move(old_filename, new_filename); end
594
-
595
- sig { void }
596
- def perform_additions; end
597
-
598
- sig { void }
599
- def perform_removals; end
600
-
601
- sig { void }
602
- def perform_sync_verification; end
603
-
604
- sig { returns(T::Array[::String]) }
605
- def removed_rbis; end
606
-
607
- sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
608
- def report_diff_and_exit_if_out_of_date(diff, command); end
609
-
610
- sig { void }
611
- def require_gem_file; end
612
- end
613
-
614
- class Tapioca::Commands::Require < ::Tapioca::Commands::Command
615
- sig { params(requires_path: ::String, sorbet_config_path: ::String).void }
616
- def initialize(requires_path:, sorbet_config_path:); end
617
-
618
- sig { override.void }
619
- def execute; end
620
- end
621
-
622
- class Tapioca::Commands::Todo < ::Tapioca::Commands::Command
623
- include ::Tapioca::SorbetHelper
624
-
625
- sig { params(todo_file: ::String, file_header: T::Boolean).void }
626
- def initialize(todo_file:, file_header:); end
627
-
628
- sig { override.void }
629
- def execute; end
630
-
631
- private
632
-
633
- sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) }
634
- def rbi(constants, command:); end
635
-
636
- sig { returns(T::Array[::String]) }
637
- def unresolved_constants; end
638
- end
639
-
640
- module Tapioca::ConfigHelper
641
- requires_ancestor { Thor }
642
-
643
- sig { params(args: T.untyped, local_options: T.untyped, config: T.untyped).void }
644
- def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end
645
-
646
- sig { returns(::String) }
647
- def command_name; end
648
-
649
- sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) }
650
- def defaults; end
651
-
652
- sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) }
653
- def options; end
654
-
655
- private
656
-
657
- sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) }
658
- def build_error(msg); end
659
-
660
- sig do
661
- params(
662
- options: ::Thor::CoreExt::HashWithIndifferentAccess
663
- ).returns(::Thor::CoreExt::HashWithIndifferentAccess)
664
- end
665
- def config_options(options); end
666
-
667
- sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void }
668
- def filter_defaults(options); end
669
-
670
- sig do
671
- params(
672
- options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess)
673
- ).returns(::Thor::CoreExt::HashWithIndifferentAccess)
674
- end
675
- def merge_options(*options); end
676
-
677
- sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).void }
678
- def print_errors(config_file, errors); end
679
-
680
- sig { params(config_file: ::String, config: T::Hash[T.untyped, T.untyped]).void }
681
- def validate_config!(config_file, config); end
682
-
683
- sig do
684
- params(
685
- command_options: T::Hash[::Symbol, ::Thor::Option],
686
- config_key: ::String,
687
- config_options: T::Hash[T.untyped, T.untyped]
688
- ).returns(T::Array[::Tapioca::ConfigHelper::ConfigError])
689
- end
690
- def validate_config_options(command_options, config_key, config_options); end
691
- end
692
-
693
- class Tapioca::ConfigHelper::ConfigError < ::T::Struct
694
- const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart]
695
-
696
- class << self
697
- def inherited(s); end
698
- end
699
- end
700
-
701
- class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct
702
- const :colors, T::Array[::Symbol]
703
- const :message, ::String
704
-
705
- class << self
706
- def inherited(s); end
707
- end
708
- end
709
-
710
- Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String)
711
- Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String)
712
- Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String)
713
- Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String)
714
- Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash)
715
- Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String)
716
- Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String)
717
- Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter)
718
- Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer)
719
- Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String)
720
- Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String)
721
- module Tapioca::Dsl; end
722
-
723
- # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
724
- class Tapioca::Dsl::Compiler
725
- extend T::Generic
726
- include ::Tapioca::SorbetHelper
727
- include ::Tapioca::RBIHelper
728
- include ::Tapioca::Runtime::Reflection
729
- extend ::Tapioca::Runtime::Reflection
730
-
731
- abstract!
732
-
733
- ConstantType = type_member { { upper: Module } }
734
-
735
- sig { params(pipeline: ::Tapioca::Dsl::Pipeline, root: ::RBI::Tree, constant: ConstantType).void }
736
- def initialize(pipeline, root, constant); end
737
-
738
- # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`.
739
- sig { params(error: ::String).void }
740
- def add_error(error); end
741
-
742
- sig { params(compiler_name: ::String).returns(T::Boolean) }
743
- def compiler_enabled?(compiler_name); end
744
-
745
- sig { returns(ConstantType) }
746
- def constant; end
747
-
748
- # @abstract
749
- sig { abstract.void }
750
- def decorate; end
751
-
752
- sig { returns(::RBI::Tree) }
753
- def root; end
754
-
755
- private
756
-
757
- sig { params(type: ::String).returns(::String) }
758
- def as_nilable_type(type); end
759
-
760
- sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) }
761
- def compile_method_parameters_to_rbi(method_def); end
762
-
763
- sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) }
764
- def compile_method_return_type_to_rbi(method_def); end
765
-
766
- sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void }
767
- def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end
768
-
769
- # Get the types of each parameter from a method signature
770
- sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) }
771
- def parameters_types_from_signature(method_def, signature); end
772
-
773
- class << self
774
- # @abstract
775
- sig { abstract.returns(T::Enumerable[::Module]) }
776
- def gather_constants; end
777
-
778
- sig { params(constant: ::Module).returns(T::Boolean) }
779
- def handles?(constant); end
780
-
781
- sig { returns(T::Set[::Module]) }
782
- def processable_constants; end
783
-
784
- private
785
-
786
- sig { returns(T::Enumerable[::Class]) }
787
- def all_classes; end
788
-
789
- sig { returns(T::Enumerable[::Module]) }
790
- def all_modules; end
791
- end
792
- end
793
-
794
- module Tapioca::Dsl::Compilers; end
795
- Tapioca::Dsl::Compilers::DIRECTORY = T.let(T.unsafe(nil), String)
796
-
797
- # DSL compilers are either built-in to Tapioca and live under the
798
- # `Tapioca::Dsl::Compilers` namespace (i.e. this namespace), and
799
- # can be referred to by just using the class name, or they live in
800
- # a different namespace and can only be referred to using their fully
801
- # qualified name. This constant encapsulates that dual lookup when
802
- # a compiler needs to be resolved by name.
803
- Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array)
804
-
805
- class Tapioca::Dsl::Pipeline
806
- sig do
807
- params(
808
- requested_constants: T::Array[::Module],
809
- requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
810
- excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
811
- error_handler: T.proc.params(error: ::String).void,
812
- number_of_workers: T.nilable(::Integer)
813
- ).void
814
- end
815
- def initialize(requested_constants:, requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end
816
-
817
- sig { params(error: ::String).void }
818
- def add_error(error); end
819
-
820
- sig { params(compiler_name: ::String).returns(T::Boolean) }
821
- def compiler_enabled?(compiler_name); end
822
-
823
- sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) }
824
- def compilers; end
825
-
826
- sig { returns(T.proc.params(error: ::String).void) }
827
- def error_handler; end
828
-
829
- sig { returns(T::Array[::String]) }
830
- def errors; end
831
-
832
- sig { returns(T::Array[::Module]) }
833
- def requested_constants; end
834
-
835
- sig do
836
- type_parameters(:T)
837
- .params(
838
- blk: T.proc.params(constant: ::Module, rbi: ::RBI::File).returns(T.type_parameter(:T))
839
- ).returns(T::Array[T.type_parameter(:T)])
840
- end
841
- def run(&blk); end
842
-
843
- private
844
-
845
- sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) }
846
- def filter_anonymous_and_reloaded_constants(constants); end
847
-
848
- sig do
849
- params(
850
- requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
851
- excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)]
852
- ).returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)])
853
- end
854
- def gather_compilers(requested_compilers, excluded_compilers); end
855
-
856
- sig { params(requested_constants: T::Array[::Module]).returns(T::Set[::Module]) }
857
- def gather_constants(requested_constants); end
858
-
859
- sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) }
860
- def rbi_for_constant(constant); end
861
-
862
- sig { params(error: ::String).returns(T.noreturn) }
863
- def report_error(error); end
864
- end
865
-
866
- module Tapioca::EnvHelper
867
- requires_ancestor { Thor }
868
-
869
- sig { params(options: T::Hash[::Symbol, T.untyped]).void }
870
- def set_environment(options); end
871
- end
872
-
873
- class Tapioca::Error < ::StandardError; end
874
-
875
- class Tapioca::Executor
876
- sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(::Integer)).void }
877
- def initialize(queue, number_of_workers: T.unsafe(nil)); end
878
-
879
- sig do
880
- type_parameters(:T)
881
- .params(
882
- block: T.proc.params(item: T.untyped).returns(T.type_parameter(:T))
883
- ).returns(T::Array[T.type_parameter(:T)])
884
- end
885
- def run_in_parallel(&block); end
886
- end
887
-
888
- Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer)
889
- module Tapioca::Gem; end
890
-
891
- class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded
892
- sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void }
893
- def initialize(symbol, constant, node); end
894
-
895
- sig { returns(::RBI::Const) }
896
- def node; end
897
- end
898
-
899
- class Tapioca::Gem::ConstantFound < ::Tapioca::Gem::Event
900
- sig { params(symbol: ::String, constant: ::BasicObject).void }
901
- def initialize(symbol, constant); end
902
-
903
- sig { returns(::BasicObject) }
904
- def constant; end
905
-
906
- sig { returns(::String) }
907
- def symbol; end
908
- end
909
-
910
- # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
911
- class Tapioca::Gem::Event
912
- abstract!
913
-
914
- def initialize(*args, **_arg1, &blk); end
915
- end
916
-
917
- class Tapioca::Gem::ForeignConstantFound < ::Tapioca::Gem::ConstantFound
918
- sig { params(symbol: ::String, constant: ::Module).void }
919
- def initialize(symbol, constant); end
920
-
921
- sig { override.returns(::Module) }
922
- def constant; end
923
- end
924
-
925
- class Tapioca::Gem::ForeignScopeNodeAdded < ::Tapioca::Gem::ScopeNodeAdded; end
926
- module Tapioca::Gem::Listeners; end
927
-
928
- # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
929
- class Tapioca::Gem::Listeners::Base
930
- abstract!
931
-
932
- sig { params(pipeline: ::Tapioca::Gem::Pipeline).void }
933
- def initialize(pipeline); end
934
-
935
- sig { params(event: ::Tapioca::Gem::NodeAdded).void }
936
- def dispatch(event); end
937
-
938
- private
939
-
940
- sig { params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
941
- def ignore?(event); end
942
-
943
- sig { params(event: ::Tapioca::Gem::ConstNodeAdded).void }
944
- def on_const(event); end
945
-
946
- sig { params(event: ::Tapioca::Gem::MethodNodeAdded).void }
947
- def on_method(event); end
948
-
949
- sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
950
- def on_scope(event); end
951
- end
952
-
953
- class Tapioca::Gem::Listeners::DynamicMixins < ::Tapioca::Gem::Listeners::Base
954
- include ::Tapioca::Runtime::Reflection
955
-
956
- private
957
-
958
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
959
- def ignore?(event); end
960
-
961
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
962
- def on_scope(event); end
963
- end
964
-
965
- class Tapioca::Gem::Listeners::ForeignConstants < ::Tapioca::Gem::Listeners::Base
966
- include ::Tapioca::Runtime::Reflection
967
-
968
- private
969
-
970
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
971
- def ignore?(event); end
972
-
973
- sig { params(location: ::String).returns(T::Boolean) }
974
- def mixed_in_by_gem?(location); end
975
-
976
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
977
- def on_scope(event); end
978
- end
979
-
980
- class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base
981
- include ::Tapioca::SorbetHelper
982
- include ::Tapioca::RBIHelper
983
- include ::Tapioca::Runtime::Reflection
984
-
985
- private
986
-
987
- sig { params(tree: ::RBI::Tree, module_name: ::String, mod: ::Module, for_visibility: T::Array[::Symbol]).void }
988
- def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil)); end
989
-
990
- sig do
991
- params(
992
- tree: ::RBI::Tree,
993
- symbol_name: ::String,
994
- constant: ::Module,
995
- method: T.nilable(::UnboundMethod),
996
- visibility: ::RBI::Visibility
997
- ).void
998
- end
999
- def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end
1000
-
1001
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1002
- def ignore?(event); end
1003
-
1004
- sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) }
1005
- def initialize_method_for(constant); end
1006
-
1007
- sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) }
1008
- def method_names_by_visibility(mod); end
1009
-
1010
- # Check whether the method is defined by the constant.
1011
- #
1012
- # In most cases, it works to check that the constant is the method owner. However,
1013
- # in the case that a method is also defined in a module prepended to the constant, it
1014
- # will be owned by the prepended module, not the constant.
1015
- #
1016
- # This method implements a better way of checking whether a constant defines a method.
1017
- # It walks up the ancestor tree via the `super_method` method; if any of the super
1018
- # methods are owned by the constant, it means that the constant declares the method.
1019
- sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) }
1020
- def method_owned_by_constant?(method, constant); end
1021
-
1022
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1023
- def on_scope(event); end
1024
-
1025
- sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) }
1026
- def struct_method?(constant, method_name); end
1027
- end
1028
-
1029
- class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base
1030
- include ::Tapioca::Runtime::Reflection
1031
-
1032
- private
1033
-
1034
- sig do
1035
- params(
1036
- tree: ::RBI::Tree,
1037
- constant: ::Module,
1038
- mods: T::Array[::Module],
1039
- mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type
1040
- ).void
1041
- end
1042
- def add_mixins(tree, constant, mods, mixin_type); end
1043
-
1044
- sig { params(mixin_name: ::String).returns(T::Boolean) }
1045
- def filtered_mixin?(mixin_name); end
1046
-
1047
- sig { params(constant: ::Module).returns(T::Array[::Module]) }
1048
- def interesting_ancestors_of(constant); end
1049
-
1050
- sig do
1051
- params(
1052
- constant: ::Module,
1053
- mixin: ::Module,
1054
- mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type
1055
- ).returns(T::Boolean)
1056
- end
1057
- def mixed_in_by_gem?(constant, mixin, mixin_type); end
1058
-
1059
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1060
- def on_scope(event); end
1061
- end
1062
-
1063
- class Tapioca::Gem::Listeners::RemoveEmptyPayloadScopes < ::Tapioca::Gem::Listeners::Base
1064
- include ::Tapioca::Runtime::Reflection
1065
-
1066
- private
1067
-
1068
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1069
- def ignore?(event); end
1070
-
1071
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1072
- def on_scope(event); end
1073
- end
1074
-
1075
- class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base
1076
- private
1077
-
1078
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1079
- def ignore?(event); end
1080
-
1081
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1082
- def on_scope(event); end
1083
- end
1084
-
1085
- class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base
1086
- include ::Tapioca::Runtime::Reflection
1087
-
1088
- private
1089
-
1090
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1091
- def ignore?(event); end
1092
-
1093
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1094
- def on_scope(event); end
1095
- end
1096
-
1097
- class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base
1098
- private
1099
-
1100
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1101
- def ignore?(event); end
1102
-
1103
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1104
- def on_scope(event); end
1105
- end
1106
-
1107
- class Tapioca::Gem::Listeners::SorbetRequiredAncestors < ::Tapioca::Gem::Listeners::Base
1108
- private
1109
-
1110
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1111
- def ignore?(event); end
1112
-
1113
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1114
- def on_scope(event); end
1115
- end
1116
-
1117
- class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Base
1118
- include ::Tapioca::Runtime::Reflection
1119
- include ::Tapioca::SorbetHelper
1120
- include ::Tapioca::RBIHelper
1121
-
1122
- private
1123
-
1124
- sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) }
1125
- def compile_signature(signature, parameters); end
1126
-
1127
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1128
- def ignore?(event); end
1129
-
1130
- sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void }
1131
- def on_method(event); end
1132
-
1133
- sig { params(signature: T.untyped).returns(T::Boolean) }
1134
- def signature_final?(signature); end
1135
- end
1136
-
1137
- Tapioca::Gem::Listeners::SorbetSignatures::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp)
1138
-
1139
- class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners::Base
1140
- include ::Tapioca::Runtime::Reflection
1141
-
1142
- private
1143
-
1144
- sig { params(tree: ::RBI::Tree, constant: ::Module).void }
1145
- def compile_type_variable_declarations(tree, constant); end
1146
-
1147
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1148
- def ignore?(event); end
1149
-
1150
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1151
- def on_scope(event); end
1152
- end
1153
-
1154
- class Tapioca::Gem::Listeners::Subconstants < ::Tapioca::Gem::Listeners::Base
1155
- include ::Tapioca::Runtime::Reflection
1156
-
1157
- private
1158
-
1159
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1160
- def ignore?(event); end
1161
-
1162
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1163
- def on_scope(event); end
1164
- end
1165
-
1166
- class Tapioca::Gem::Listeners::YardDoc < ::Tapioca::Gem::Listeners::Base
1167
- sig { params(pipeline: ::Tapioca::Gem::Pipeline).void }
1168
- def initialize(pipeline); end
1169
-
1170
- private
1171
-
1172
- sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) }
1173
- def documentation_comments(name, sigs: T.unsafe(nil)); end
1174
-
1175
- sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
1176
- def ignore?(event); end
1177
-
1178
- sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void }
1179
- def on_const(event); end
1180
-
1181
- sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void }
1182
- def on_method(event); end
1183
-
1184
- sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
1185
- def on_scope(event); end
1186
- end
1187
-
1188
- Tapioca::Gem::Listeners::YardDoc::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array)
1189
- Tapioca::Gem::Listeners::YardDoc::IGNORED_SIG_TAGS = T.let(T.unsafe(nil), Array)
1190
-
1191
- class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded
1192
- sig do
1193
- params(
1194
- symbol: ::String,
1195
- constant: ::Module,
1196
- node: ::RBI::Method,
1197
- signature: T.untyped,
1198
- parameters: T::Array[[::Symbol, ::String]]
1199
- ).void
1200
- end
1201
- def initialize(symbol, constant, node, signature, parameters); end
1202
-
1203
- sig { returns(::RBI::Method) }
1204
- def node; end
1205
-
1206
- sig { returns(T::Array[[::Symbol, ::String]]) }
1207
- def parameters; end
1208
-
1209
- sig { returns(T.untyped) }
1210
- def signature; end
1211
- end
1212
-
1213
- # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
1214
- class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event
1215
- abstract!
1216
-
1217
- sig { params(symbol: ::String, constant: ::Module).void }
1218
- def initialize(symbol, constant); end
1219
-
1220
- sig { returns(::Module) }
1221
- def constant; end
1222
-
1223
- sig { returns(::String) }
1224
- def symbol; end
1225
- end
1226
-
1227
- class Tapioca::Gem::Pipeline
1228
- include ::Tapioca::Runtime::Reflection
1229
- include ::Tapioca::SorbetHelper
1230
- include ::Tapioca::RBIHelper
1231
-
1232
- sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean).void }
1233
- def initialize(gem, include_doc: T.unsafe(nil)); end
1234
-
1235
- sig { returns(::RBI::Tree) }
1236
- def compile; end
1237
-
1238
- sig { returns(::Tapioca::Gemfile::GemSpec) }
1239
- def gem; end
1240
-
1241
- sig { params(method: ::UnboundMethod).returns(T::Boolean) }
1242
- def method_in_gem?(method); end
1243
-
1244
- sig { params(constant: ::Module).returns(T.nilable(::String)) }
1245
- def name_of(constant); end
1246
-
1247
- sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void }
1248
- def push_const(symbol, constant, node); end
1249
-
1250
- sig { params(symbol: ::String, constant: ::BasicObject).void }
1251
- def push_constant(symbol, constant); end
1252
-
1253
- sig { params(symbol: ::String, constant: ::Module).void }
1254
- def push_foreign_constant(symbol, constant); end
1255
-
1256
- sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
1257
- def push_foreign_scope(symbol, constant, node); end
1258
-
1259
- sig do
1260
- params(
1261
- symbol: ::String,
1262
- constant: ::Module,
1263
- node: ::RBI::Method,
1264
- signature: T.untyped,
1265
- parameters: T::Array[[::Symbol, ::String]]
1266
- ).void
1267
- end
1268
- def push_method(symbol, constant, node, signature, parameters); end
1269
-
1270
- sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
1271
- def push_scope(symbol, constant, node); end
1272
-
1273
- sig { params(symbol: ::String).void }
1274
- def push_symbol(symbol); end
1275
-
1276
- sig { params(symbol_name: ::String).returns(T::Boolean) }
1277
- def symbol_in_payload?(symbol_name); end
1278
-
1279
- private
1280
-
1281
- sig { params(name: ::String).void }
1282
- def add_to_alias_namespace(name); end
1283
-
1284
- sig { params(name: ::String).returns(T::Boolean) }
1285
- def alias_namespaced?(name); end
1286
-
1287
- sig { params(name: ::String, constant: ::Module).void }
1288
- def compile_alias(name, constant); end
1289
-
1290
- sig { params(symbol: ::String, constant: ::BasicObject).void }
1291
- def compile_constant(symbol, constant); end
1292
-
1293
- # Compile
1294
- sig { params(symbol: ::String, constant: ::Module).void }
1295
- def compile_foreign_constant(symbol, constant); end
1296
-
1297
- sig { params(name: ::String, constant: ::Module, foreign_constant: T::Boolean).void }
1298
- def compile_module(name, constant, foreign_constant: T.unsafe(nil)); end
1299
-
1300
- sig { params(name: ::String, value: ::BasicObject).void }
1301
- def compile_object(name, value); end
1302
-
1303
- sig { params(constant: ::Class).returns(T.nilable(::String)) }
1304
- def compile_superclass(constant); end
1305
-
1306
- sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) }
1307
- def defined_in_gem?(constant, strict: T.unsafe(nil)); end
1308
-
1309
- sig { params(event: ::Tapioca::Gem::Event).void }
1310
- def dispatch(event); end
1311
-
1312
- sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) }
1313
- def generic_name_of(constant); end
1314
-
1315
- sig { params(constant: ::Module).returns(T::Array[::String]) }
1316
- def get_file_candidates(constant); end
1317
-
1318
- sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
1319
- def load_bootstrap_symbols(gem); end
1320
-
1321
- sig { params(name: ::String).void }
1322
- def mark_seen(name); end
1323
-
1324
- sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) }
1325
- def name_of_proxy_target(constant, class_name); end
1326
-
1327
- sig { returns(::Tapioca::Gem::Event) }
1328
- def next_event; end
1329
-
1330
- sig { params(event: ::Tapioca::Gem::ConstantFound).void }
1331
- def on_constant(event); end
1332
-
1333
- sig { params(event: ::Tapioca::Gem::NodeAdded).void }
1334
- def on_node(event); end
1335
-
1336
- sig { params(event: ::Tapioca::Gem::SymbolFound).void }
1337
- def on_symbol(event); end
1338
-
1339
- sig { params(name: ::String).returns(T::Boolean) }
1340
- def seen?(name); end
1341
- end
1342
-
1343
- Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array)
1344
-
1345
- class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded
1346
- sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
1347
- def initialize(symbol, constant, node); end
1348
-
1349
- sig { returns(::RBI::Scope) }
1350
- def node; end
1351
- end
1352
-
1353
- class Tapioca::Gem::SymbolFound < ::Tapioca::Gem::Event
1354
- sig { params(symbol: ::String).void }
1355
- def initialize(symbol); end
1356
-
1357
- sig { returns(::String) }
1358
- def symbol; end
1359
- end
1360
-
1361
- module Tapioca::GemHelper
1362
- sig { params(gemfile_dir: ::String, full_gem_path: ::String).returns(T::Boolean) }
1363
- def gem_in_app_dir?(gemfile_dir, full_gem_path); end
1364
-
1365
- sig { params(full_gem_path: ::String).returns(T::Boolean) }
1366
- def gem_in_bundle_path?(full_gem_path); end
1367
-
1368
- sig { params(path: T.any(::Pathname, ::String)).returns(::String) }
1369
- def to_realpath(path); end
1370
- end
1371
-
1372
- class Tapioca::Gemfile
1373
- sig { params(exclude: T::Array[::String]).void }
1374
- def initialize(exclude); end
1375
-
1376
- sig { returns(::Bundler::Definition) }
1377
- def definition; end
1378
-
1379
- sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) }
1380
- def dependencies; end
1381
-
1382
- sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) }
1383
- def gem(gem_name); end
1384
-
1385
- sig { returns(T::Array[::String]) }
1386
- def missing_specs; end
1387
-
1388
- sig { void }
1389
- def require_bundle; end
1390
-
1391
- private
1392
-
1393
- sig { returns(::String) }
1394
- def dir; end
1395
-
1396
- sig { returns(::File) }
1397
- def gemfile; end
1398
-
1399
- sig { returns(T::Array[::Symbol]) }
1400
- def groups; end
1401
-
1402
- sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) }
1403
- def load_dependencies; end
1404
-
1405
- # @return [File]
1406
- def lockfile; end
1407
-
1408
- sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) }
1409
- def materialize_deps; end
1410
-
1411
- sig { returns(::Bundler::Runtime) }
1412
- def runtime; end
1413
- end
1414
-
1415
- # This is a module that gets prepended to `Bundler::Dependency` and
1416
- # makes sure even gems marked as `require: false` are required during
1417
- # `Bundler.require`.
1418
- module Tapioca::Gemfile::AutoRequireHook
1419
- requires_ancestor { Bundler::Dependency }
1420
-
1421
- sig { returns(T.untyped) }
1422
- def autorequire; end
1423
-
1424
- class << self
1425
- sig { params(exclude: T::Array[::String]).returns(T::Array[::String]) }
1426
- def exclude=(exclude); end
1427
-
1428
- sig { params(name: T.untyped).returns(T::Boolean) }
1429
- def excluded?(name); end
1430
- end
1431
- end
1432
-
1433
- class Tapioca::Gemfile::GemSpec
1434
- include ::Tapioca::GemHelper
1435
-
1436
- sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void }
1437
- def initialize(spec); end
1438
-
1439
- sig { params(path: ::String).returns(T::Boolean) }
1440
- def contains_path?(path); end
1441
-
1442
- sig { returns(T::Boolean) }
1443
- def export_rbi_files?; end
1444
-
1445
- sig { returns(T::Array[::String]) }
1446
- def exported_rbi_files; end
1447
-
1448
- sig { returns(::RBI::MergeTree) }
1449
- def exported_rbi_tree; end
1450
-
1451
- sig { returns(T::Array[::Pathname]) }
1452
- def files; end
1453
-
1454
- sig { returns(::String) }
1455
- def full_gem_path; end
1456
-
1457
- sig { params(gemfile_dir: ::String).returns(T::Boolean) }
1458
- def ignore?(gemfile_dir); end
1459
-
1460
- sig { returns(::String) }
1461
- def name; end
1462
-
1463
- sig { void }
1464
- def parse_yard_docs; end
1465
-
1466
- sig { returns(::String) }
1467
- def rbi_file_name; end
1468
-
1469
- # @return [String]
1470
- def version; end
1471
-
1472
- private
1473
-
1474
- sig { returns(T::Array[::Pathname]) }
1475
- def collect_files; end
1476
-
1477
- sig { returns(T.nilable(T::Boolean)) }
1478
- def default_gem?; end
1479
-
1480
- sig { returns(T::Boolean) }
1481
- def gem_ignored?; end
1482
-
1483
- sig { params(path: ::String).returns(T::Boolean) }
1484
- def has_parent_gemspec?(path); end
1485
-
1486
- sig { returns(::Regexp) }
1487
- def require_paths_prefix_matcher; end
1488
-
1489
- sig { params(file: ::String).returns(::Pathname) }
1490
- def resolve_to_ruby_lib_dir(file); end
1491
-
1492
- sig { returns(::String) }
1493
- def version_string; end
1494
- end
1495
-
1496
- Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array)
1497
- Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) }
1498
-
1499
- module Tapioca::RBIFilesHelper
1500
- requires_ancestor { Tapioca::SorbetHelper }
1501
- requires_ancestor { Thor::Shell }
1502
-
1503
- sig do
1504
- params(
1505
- index: ::RBI::Index,
1506
- shim_rbi_dir: ::String,
1507
- todo_rbi_file: ::String
1508
- ).returns(T::Hash[::String, T::Array[::RBI::Node]])
1509
- end
1510
- def duplicated_nodes_from_index(index, shim_rbi_dir:, todo_rbi_file:); end
1511
-
1512
- sig { params(index: ::RBI::Index, dir: ::String).void }
1513
- def index_payload(index, dir); end
1514
-
1515
- sig { params(index: ::RBI::Index, kind: ::String, file: ::String).void }
1516
- def index_rbi(index, kind, file); end
1517
-
1518
- sig { params(index: ::RBI::Index, kind: ::String, dir: ::String).void }
1519
- def index_rbis(index, kind, dir); end
1520
-
1521
- sig { params(loc: ::RBI::Loc, path_prefix: T.nilable(::String)).returns(::String) }
1522
- def location_to_payload_url(loc, path_prefix:); end
1523
-
1524
- sig do
1525
- params(
1526
- command: ::String,
1527
- gem_dir: ::String,
1528
- dsl_dir: ::String,
1529
- auto_strictness: T::Boolean,
1530
- gems: T::Array[::Tapioca::Gemfile::GemSpec],
1531
- compilers: T::Enumerable[::Class]
1532
- ).void
1533
- end
1534
- def validate_rbi_files(command:, gem_dir:, dsl_dir:, auto_strictness:, gems: T.unsafe(nil), compilers: T.unsafe(nil)); end
1535
-
1536
- private
1537
-
1538
- sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[::RBI::Scope]) }
1539
- def extract_empty_scopes(nodes); end
1540
-
1541
- sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) }
1542
- def extract_methods_and_attrs(nodes); end
1543
-
1544
- sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Mixin, ::RBI::RequiresAncestor)]) }
1545
- def extract_mixins(nodes); end
1546
-
1547
- sig do
1548
- params(
1549
- nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)]
1550
- ).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)])
1551
- end
1552
- def extract_nodes_with_sigs(nodes); end
1553
-
1554
- sig do
1555
- params(
1556
- nodes: T::Array[::RBI::Node],
1557
- shim_rbi_dir: ::String,
1558
- todo_rbi_file: ::String
1559
- ).returns(T::Array[::RBI::Node])
1560
- end
1561
- def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end
1562
-
1563
- sig { params(path: ::String).returns(::String) }
1564
- def gem_name_from_rbi_path(path); end
1565
-
1566
- sig { params(index: ::RBI::Index, file: ::String).void }
1567
- def parse_and_index_file(index, file); end
1568
-
1569
- sig { params(index: ::RBI::Index, files: T::Array[::String]).void }
1570
- def parse_and_index_files(index, files); end
1571
-
1572
- sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) }
1573
- def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end
1574
-
1575
- sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void }
1576
- def update_gem_rbis_strictnesses(errors, gem_dir); end
1577
- end
1578
-
1579
- class Tapioca::RBIFormatter < ::RBI::Formatter
1580
- sig { params(file: ::RBI::File).void }
1581
- def write_empty_body_comment!(file); end
1582
-
1583
- sig { params(file: ::RBI::File, command: ::String, reason: T.nilable(::String)).void }
1584
- def write_header!(file, command, reason: T.unsafe(nil)); end
1585
- end
1586
-
1587
- module Tapioca::RBIHelper
1588
- include ::Tapioca::SorbetHelper
1589
- extend ::Tapioca::SorbetHelper
1590
- extend ::Tapioca::RBIHelper
1591
-
1592
- sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
1593
- def create_block_param(name, type:); end
1594
-
1595
- sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) }
1596
- def create_kw_opt_param(name, type:, default:); end
1597
-
1598
- sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
1599
- def create_kw_param(name, type:); end
1600
-
1601
- sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
1602
- def create_kw_rest_param(name, type:); end
1603
-
1604
- sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) }
1605
- def create_opt_param(name, type:, default:); end
1606
-
1607
- sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
1608
- def create_param(name, type:); end
1609
-
1610
- sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
1611
- def create_rest_param(name, type:); end
1612
-
1613
- sig { params(param: ::RBI::Param, type: ::String).returns(::RBI::TypedParam) }
1614
- def create_typed_param(param, type); end
1615
-
1616
- sig { params(sig_string: ::String).returns(::String) }
1617
- def sanitize_signature_types(sig_string); end
1618
-
1619
- sig { params(name: ::String).returns(T::Boolean) }
1620
- def valid_method_name?(name); end
1621
-
1622
- sig { params(name: ::String).returns(T::Boolean) }
1623
- def valid_parameter_name?(name); end
1624
-
1625
- class << self
1626
- sig do
1627
- params(
1628
- type: ::String,
1629
- variance: ::Symbol,
1630
- fixed: T.nilable(::String),
1631
- upper: T.nilable(::String),
1632
- lower: T.nilable(::String)
1633
- ).returns(::String)
1634
- end
1635
- def serialize_type_variable(type, variance, fixed, upper, lower); end
1636
- end
1637
- end
1638
-
1639
- class Tapioca::RepoIndex
1640
- sig { void }
1641
- def initialize; end
1642
-
1643
- sig { params(gem_name: ::String).void }
1644
- def <<(gem_name); end
1645
-
1646
- sig { returns(T::Enumerable[::String]) }
1647
- def gems; end
1648
-
1649
- sig { params(gem_name: ::String).returns(T::Boolean) }
1650
- def has_gem?(gem_name); end
1651
-
1652
- class << self
1653
- sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(Tapioca::RepoIndex) }
1654
- def from_hash(hash); end
1655
-
1656
- sig { params(json: ::String).returns(Tapioca::RepoIndex) }
1657
- def from_json(json); end
1658
- end
1659
- end
1660
-
1661
- module Tapioca::Runtime; end
1662
-
1663
- class Tapioca::Runtime::DynamicMixinCompiler
1664
- include ::Tapioca::Runtime::Reflection
1665
-
1666
- sig { params(constant: ::Module).void }
1667
- def initialize(constant); end
1668
-
1669
- # @return [Array<Symbol>]
1670
- def class_attribute_predicates; end
1671
-
1672
- sig { returns(T::Array[::Symbol]) }
1673
- def class_attribute_readers; end
1674
-
1675
- # @return [Array<Symbol>]
1676
- def class_attribute_writers; end
1677
-
1678
- sig { params(tree: ::RBI::Tree).void }
1679
- def compile_class_attributes(tree); end
1680
-
1681
- sig { params(tree: ::RBI::Tree).returns([T::Array[::Module], T::Array[::Module]]) }
1682
- def compile_mixes_in_class_methods(tree); end
1683
-
1684
- sig { returns(T::Array[::Module]) }
1685
- def dynamic_extends; end
1686
-
1687
- # @return [Array<Module>]
1688
- def dynamic_includes; end
1689
-
1690
- sig { returns(T::Boolean) }
1691
- def empty_attributes?; end
1692
-
1693
- sig { params(qualified_mixin_name: ::String).returns(T::Boolean) }
1694
- def filtered_mixin?(qualified_mixin_name); end
1695
-
1696
- # @return [Array<Symbol>]
1697
- def instance_attribute_predicates; end
1698
-
1699
- sig { returns(T::Array[::Symbol]) }
1700
- def instance_attribute_readers; end
1701
-
1702
- # @return [Array<Symbol>]
1703
- def instance_attribute_writers; end
1704
-
1705
- sig { params(mod: ::Module, dynamic_extends: T::Array[::Module]).returns(T::Boolean) }
1706
- def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end
1707
- end
1708
-
1709
- # This class is responsible for storing and looking up information related to generic types.
1710
- #
1711
- # The class stores 2 different kinds of data, in two separate lookup tables:
1712
- # 1. a lookup of generic type instances by name: `@generic_instances`
1713
- # 2. a lookup of type variable serializer by constant and type variable
1714
- # instance: `@type_variables`
1715
- #
1716
- # By storing the above data, we can cheaply query each constant against this registry
1717
- # to see if it declares any generic type variables. This becomes a simple lookup in the
1718
- # `@type_variables` hash table with the given constant.
1719
- #
1720
- # If there is no entry, then we can cheaply know that we can skip generic type
1721
- # information generation for this type.
1722
- #
1723
- # On the other hand, if we get a result, then the result will be a hash of type
1724
- # variable to type variable serializers. This allows us to associate type variables
1725
- # to the constant names that represent them, easily.
1726
- module Tapioca::Runtime::GenericTypeRegistry
1727
- class << self
1728
- sig { params(instance: ::Object).returns(T::Boolean) }
1729
- def generic_type_instance?(instance); end
1730
-
1731
- sig { params(constant: ::Module).returns(T.nilable(T::Array[::Tapioca::TypeVariableModule])) }
1732
- def lookup_type_variables(constant); end
1733
-
1734
- # This method is responsible for building the name of the instantiated concrete type
1735
- # and cloning the given constant so that we can return a type that is the same
1736
- # as the current type but is a different instance and has a different name method.
1737
- #
1738
- # We cache those cloned instances by their name in `@generic_instances`, so that
1739
- # we don't keep instantiating a new type every single time it is referenced.
1740
- # For example, `[Foo[Integer], Foo[Integer], Foo[Integer], Foo[String]]` will only
1741
- # result in 2 clones (1 for `Foo[Integer]` and another for `Foo[String]`) and
1742
- # 2 hash lookups (for the other two `Foo[Integer]`s).
1743
- #
1744
- # This method returns the created or cached clone of the constant.
1745
- sig { params(constant: T.untyped, types: T.untyped).returns(::Module) }
1746
- def register_type(constant, types); end
1747
-
1748
- # This method is called from intercepted calls to `type_member` and `type_template`.
1749
- # We get passed all the arguments to those methods, as well as the `T::Types::TypeVariable`
1750
- # instance generated by the Sorbet defined `type_member`/`type_template` call on `T::Generic`.
1751
- #
1752
- # This method creates a `String` with that data and stores it in the
1753
- # `@type_variables` lookup table, keyed by the `constant` and `type_variable`.
1754
- #
1755
- # Finally, the original `type_variable` is returned from this method, so that the caller
1756
- # can return it from the original methods as well.
1757
- sig { params(constant: T.untyped, type_variable: ::Tapioca::TypeVariableModule).void }
1758
- def register_type_variable(constant, type_variable); end
1759
-
1760
- private
1761
-
1762
- sig { params(constant: ::Module, name: ::String).returns(::Module) }
1763
- def create_generic_type(constant, name); end
1764
-
1765
- sig { params(constant: ::Class).returns(::Class) }
1766
- def create_safe_subclass(constant); end
1767
-
1768
- sig { params(constant: ::Module).returns(T::Array[::Tapioca::TypeVariableModule]) }
1769
- def lookup_or_initialize_type_variables(constant); end
1770
- end
1771
- end
1772
-
1773
- class Tapioca::Runtime::Loader
1774
- include ::Tapioca::GemHelper
1775
-
1776
- sig do
1777
- params(
1778
- gemfile: ::Tapioca::Gemfile,
1779
- initialize_file: T.nilable(::String),
1780
- require_file: T.nilable(::String)
1781
- ).void
1782
- end
1783
- def load_bundle(gemfile, initialize_file, require_file); end
1784
-
1785
- sig { params(environment_load: T::Boolean, eager_load: T::Boolean).void }
1786
- def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil)); end
1787
-
1788
- private
1789
-
1790
- sig { void }
1791
- def eager_load_rails_app; end
1792
-
1793
- sig { void }
1794
- def load_rails_engines; end
1795
-
1796
- sig { returns(T::Array[T.untyped]) }
1797
- def rails_engines; end
1798
-
1799
- sig { params(file: T.nilable(::String)).void }
1800
- def require_helper(file); end
1801
-
1802
- sig { params(path: ::String).void }
1803
- def safe_require(path); end
1804
-
1805
- sig { void }
1806
- def silence_deprecations; end
1807
- end
1808
-
1809
- module Tapioca::Runtime::Reflection
1810
- extend ::Tapioca::Runtime::Reflection
1811
-
1812
- sig { params(constant: ::Module).returns(T::Array[::Module]) }
1813
- def ancestors_of(constant); end
1814
-
1815
- sig { params(object: ::BasicObject, other: ::BasicObject).returns(T::Boolean) }
1816
- def are_equal?(object, other); end
1817
-
1818
- sig { params(singleton_class: ::Module).returns(T.nilable(::Module)) }
1819
- def attached_class_of(singleton_class); end
1820
-
1821
- sig { params(object: ::BasicObject).returns(::Class) }
1822
- def class_of(object); end
1823
-
1824
- sig { params(symbol: ::String, inherit: T::Boolean, namespace: ::Module).returns(::BasicObject) }
1825
- def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end
1826
-
1827
- sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
1828
- def constants_of(constant); end
1829
-
1830
- # Returns an array with all classes that are < than the supplied class.
1831
- #
1832
- # class C; end
1833
- # descendants_of(C) # => []
1834
- #
1835
- # class B < C; end
1836
- # descendants_of(C) # => [B]
1837
- #
1838
- # class A < B; end
1839
- # descendants_of(C) # => [B, A]
1840
- #
1841
- # class D < C; end
1842
- # descendants_of(C) # => [B, A, D]
1843
- sig do
1844
- type_parameters(:U)
1845
- .params(
1846
- klass: T.all(::Class, T.type_parameter(:U))
1847
- ).returns(T::Array[T.type_parameter(:U)])
1848
- end
1849
- def descendants_of(klass); end
1850
-
1851
- sig { params(constant: ::Module).returns(T::Array[::Module]) }
1852
- def inherited_ancestors_of(constant); end
1853
-
1854
- sig { params(constant: ::Module, method: ::Symbol).returns(::Method) }
1855
- def method_of(constant, method); end
1856
-
1857
- sig { params(constant: ::Module).returns(T.nilable(::String)) }
1858
- def name_of(constant); end
1859
-
1860
- sig { params(type: ::T::Types::Base).returns(::String) }
1861
- def name_of_type(type); end
1862
-
1863
- sig { params(object: ::BasicObject).returns(::Integer) }
1864
- def object_id_of(object); end
1865
-
1866
- sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
1867
- def private_instance_methods_of(constant); end
1868
-
1869
- sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
1870
- def protected_instance_methods_of(constant); end
1871
-
1872
- sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
1873
- def public_instance_methods_of(constant); end
1874
-
1875
- sig { params(constant: ::Module).returns(T.nilable(::String)) }
1876
- def qualified_name_of(constant); end
1877
-
1878
- # Examines the call stack to identify the closest location where a "require" is performed
1879
- # by searching for the label "<top (required)>". If none is found, it returns the location
1880
- # labeled "<main>", which is the original call site.
1881
- sig { returns(::String) }
1882
- def required_from_location; end
1883
-
1884
- sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) }
1885
- def signature_of(method); end
1886
-
1887
- sig { params(constant: ::Module).returns(::Class) }
1888
- def singleton_class_of(constant); end
1889
-
1890
- sig { params(constant: ::Class).returns(T.nilable(::Class)) }
1891
- def superclass_of(constant); end
1892
- end
1893
-
1894
- Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1895
- Tapioca::Runtime::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1896
- Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1897
- Tapioca::Runtime::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1898
- Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1899
- Tapioca::Runtime::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1900
- Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1901
- Tapioca::Runtime::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1902
- Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1903
- Tapioca::Runtime::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1904
- Tapioca::Runtime::Reflection::REQUIRED_FROM_LABELS = T.let(T.unsafe(nil), Array)
1905
- Tapioca::Runtime::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1906
- Tapioca::Runtime::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
1907
- module Tapioca::Runtime::Trackers; end
1908
-
1909
- module Tapioca::Runtime::Trackers::Autoload
1910
- class << self
1911
- sig { void }
1912
- def eager_load_all!; end
1913
-
1914
- sig { params(constant_name: ::String).void }
1915
- def register(constant_name); end
1916
-
1917
- sig do
1918
- type_parameters(:Result)
1919
- .params(
1920
- block: T.proc.returns(T.type_parameter(:Result))
1921
- ).returns(T.type_parameter(:Result))
1922
- end
1923
- def with_disabled_exits(&block); end
1924
- end
1925
- end
1926
-
1927
- Tapioca::Runtime::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc)
1928
-
1929
- # Registers a TracePoint immediately upon load to track points at which
1930
- # classes and modules are opened for definition. This is used to track
1931
- # correspondence between classes/modules and files, as this information isn't
1932
- # available in the ruby runtime without extra accounting.
1933
- module Tapioca::Runtime::Trackers::ConstantDefinition
1934
- extend ::Tapioca::Runtime::Reflection
1935
-
1936
- class << self
1937
- # Returns the files in which this class or module was opened. Doesn't know
1938
- # about situations where the class was opened prior to +require+ing,
1939
- # or where metaprogramming was used via +eval+, etc.
1940
- def files_for(klass); end
1941
- end
1942
- end
1943
-
1944
- class Tapioca::Runtime::Trackers::ConstantDefinition::ConstantLocation < ::T::Struct
1945
- const :lineno, ::Integer
1946
- const :path, ::String
1947
-
1948
- class << self
1949
- def inherited(s); end
1950
- end
1951
- end
1952
-
1953
- module Tapioca::Runtime::Trackers::Mixin
1954
- class << self
1955
- sig do
1956
- params(
1957
- mixin: ::Module
1958
- ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]])
1959
- end
1960
- def constants_with_mixin(mixin); end
1961
-
1962
- sig { params(constant: ::Module, mixin: ::Module, mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type).void }
1963
- def register(constant, mixin, mixin_type); end
1964
-
1965
- sig do
1966
- type_parameters(:Result)
1967
- .params(
1968
- block: T.proc.returns(T.type_parameter(:Result))
1969
- ).returns(T.type_parameter(:Result))
1970
- end
1971
- def with_disabled_registration(&block); end
1972
- end
1973
- end
1974
-
1975
- class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum
1976
- enums do
1977
- Prepend = new
1978
- Include = new
1979
- Extend = new
1980
- end
1981
- end
1982
-
1983
- module Tapioca::Runtime::Trackers::RequiredAncestor
1984
- class << self
1985
- sig { params(requiring: ::T::Helpers, block: T.proc.returns(::Module)).void }
1986
- def register(requiring, block); end
1987
-
1988
- sig { params(mod: ::Module).returns(T::Array[T.proc.returns(::Module)]) }
1989
- def required_ancestors_blocks_by(mod); end
1990
-
1991
- sig { params(mod: ::Module).returns(T::Array[T.nilable(::Module)]) }
1992
- def required_ancestors_by(mod); end
1993
- end
1994
- end
1995
-
1996
- Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String)
1997
- Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String)
1998
-
1999
- module Tapioca::SorbetHelper
2000
- sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) }
2001
- def sorbet(*sorbet_args); end
2002
-
2003
- sig { returns(::String) }
2004
- def sorbet_path; end
2005
-
2006
- sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) }
2007
- def sorbet_supports?(feature, version: T.unsafe(nil)); end
2008
- end
2009
-
2010
- Tapioca::SorbetHelper::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash)
2011
- Tapioca::SorbetHelper::SORBET_BIN = T.let(T.unsafe(nil), Pathname)
2012
- Tapioca::SorbetHelper::SORBET_EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String)
2013
- Tapioca::SorbetHelper::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification)
2014
- Tapioca::SorbetHelper::SORBET_PAYLOAD_URL = T.let(T.unsafe(nil), String)
2015
- module Tapioca::Static; end
2016
-
2017
- class Tapioca::Static::RequiresCompiler
2018
- sig { params(sorbet_path: ::String).void }
2019
- def initialize(sorbet_path); end
2020
-
2021
- sig { returns(::String) }
2022
- def compile; end
2023
-
2024
- private
2025
-
2026
- sig { params(config: ::Spoom::Sorbet::Config).returns(T::Array[::String]) }
2027
- def collect_files(config); end
2028
-
2029
- sig { params(file_path: ::String).returns(T::Enumerable[::String]) }
2030
- def collect_requires(file_path); end
2031
-
2032
- sig { params(config: ::Spoom::Sorbet::Config, file_path: ::Pathname).returns(T::Boolean) }
2033
- def file_ignored_by_sorbet?(config, file_path); end
2034
-
2035
- sig { params(path: ::Pathname).returns(T::Array[::String]) }
2036
- def path_parts(path); end
2037
- end
2038
-
2039
- module Tapioca::Static::SymbolLoader
2040
- extend ::Tapioca::SorbetHelper
2041
- extend ::Tapioca::Runtime::Reflection
2042
-
2043
- class << self
2044
- sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
2045
- def engine_symbols(gem); end
2046
-
2047
- sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
2048
- def gem_symbols(gem); end
2049
-
2050
- sig { returns(T::Set[::String]) }
2051
- def payload_symbols; end
2052
-
2053
- private
2054
-
2055
- # @return [Array<T.class_of(Rails::Engine)>]
2056
- def engines(*args, **_arg1, &blk); end
2057
-
2058
- sig { params(input: ::String, table_type: ::String).returns(::String) }
2059
- def symbol_table_json_from(input, table_type: T.unsafe(nil)); end
2060
-
2061
- sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) }
2062
- def symbols_from_paths(paths); end
2063
- end
2064
- end
2065
-
2066
- class Tapioca::Static::SymbolTableParser
2067
- sig { void }
2068
- def initialize; end
2069
-
2070
- sig { params(name: ::String).returns(::String) }
2071
- def fully_qualified_name(name); end
2072
-
2073
- sig { params(object: T::Hash[::String, T.untyped]).void }
2074
- def parse_object(object); end
2075
-
2076
- sig { returns(T::Set[::String]) }
2077
- def symbols; end
2078
-
2079
- class << self
2080
- sig { params(json_string: ::String).returns(T::Set[::String]) }
2081
- def parse_json(json_string); end
2082
- end
2083
- end
2084
-
2085
- Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String)
2086
- Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String)
2087
-
2088
- class Tapioca::TypeVariable < ::T::Types::TypeVariable
2089
- # @return [TypeVariable] a new instance of TypeVariable
2090
- def initialize(name, variance); end
2091
-
2092
- # Returns the value of attribute name.
2093
- def name; end
2094
- end
2095
-
2096
- # This is subclassing from `Module` so that instances of this type will be modules.
2097
- # The reason why we want that is because that means those instances will automatically
2098
- # get bound to the constant names they are assigned to by Ruby. As a result, we don't
2099
- # need to do any matching of constants to type variables to bind their names, Ruby will
2100
- # do that automatically for us and we get the `name` method for free from `Module`.
2101
- class Tapioca::TypeVariableModule < ::Module
2102
- sig do
2103
- params(
2104
- context: ::Module,
2105
- type: ::Tapioca::TypeVariableModule::Type,
2106
- variance: ::Symbol,
2107
- fixed: T.untyped,
2108
- lower: T.untyped,
2109
- upper: T.untyped,
2110
- bounds_proc: T.nilable(T.proc.returns(T::Hash[::Symbol, T.untyped]))
2111
- ).void
2112
- end
2113
- def initialize(context, type, variance, fixed, lower, upper, bounds_proc); end
2114
-
2115
- sig { returns(::Tapioca::TypeVariable) }
2116
- def coerce_to_type_variable; end
2117
-
2118
- sig { returns(T.nilable(::String)) }
2119
- def name; end
2120
-
2121
- sig { returns(::String) }
2122
- def serialize; end
2123
-
2124
- private
2125
-
2126
- sig do
2127
- params(
2128
- fixed: T.untyped,
2129
- lower: T.untyped,
2130
- upper: T.untyped
2131
- ).returns(T.proc.returns(T::Hash[::Symbol, T.untyped]))
2132
- end
2133
- def build_bounds_proc(fixed, lower, upper); end
2134
-
2135
- sig do
2136
- type_parameters(:Result)
2137
- .params(
2138
- block: T.proc.returns(T.type_parameter(:Result))
2139
- ).returns(T.type_parameter(:Result))
2140
- end
2141
- def with_bound_name_pre_3_0(&block); end
2142
- end
2143
-
2144
- class Tapioca::TypeVariableModule::Type < ::T::Enum
2145
- enums do
2146
- Member = new
2147
- Template = new
2148
- end
2149
- end
2150
-
2151
- Tapioca::VERSION = T.let(T.unsafe(nil), String)