sorbet-rails 0.6.3 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +1 -2
- data/.gitignore +2 -1
- data/.travis.yml +3 -1
- data/README.md +54 -7
- data/Rakefile +3 -3
- data/lib/bundled_rbi/customizabel_rbi_formatter.rbi +29 -0
- data/lib/bundled_rbi/pluck_to_tstruct.rbi +2 -1
- data/lib/bundled_rbi/typed_enum.rbi +7 -0
- data/lib/sorbet-rails.rb +1 -3
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +8 -2
- data/lib/sorbet-rails/config.rb +11 -0
- data/lib/sorbet-rails/deprecation.rb +1 -0
- data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
- data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
- data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
- data/lib/sorbet-rails/job_rbi_formatter.rb +73 -62
- data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
- data/lib/sorbet-rails/model_column_utils.rb +129 -0
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +37 -3
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +0 -103
- data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
- data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +34 -3
- data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
- data/lib/sorbet-rails/model_plugins/base.rb +0 -9
- data/lib/sorbet-rails/model_rbi_formatter.rb +4 -8
- data/lib/sorbet-rails/model_utils.rb +73 -32
- data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
- data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +17 -7
- data/lib/sorbet-rails/railtie.rb +0 -2
- data/lib/sorbet-rails/sorbet_utils.rb +152 -150
- data/lib/sorbet-rails/tasks/rails_rbi.rake +18 -26
- data/sorbet-rails.gemspec +1 -1
- data/spec/generators/rails-template.rb +3 -6
- data/spec/generators/sorbet_test_cases.rb +66 -88
- data/spec/job_rbi_formatter_spec.rb +1 -1
- data/spec/pluck_to_tstruct_spec.rb +74 -1
- data/spec/rails_helper.rb +2 -2
- data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
- data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
- data/spec/support/v5.0/Gemfile +1 -1
- data/spec/support/v5.0/Gemfile.lock +9 -9
- data/spec/support/v5.0/app/models/spell_book.rb +2 -0
- data/spec/support/v5.0/app/models/wizard.rb +1 -1
- data/spec/support/v5.0/sorbet_test_cases.rb +66 -88
- data/spec/support/v5.1/Gemfile.lock +7 -7
- data/spec/support/v5.1/app/models/spell_book.rb +2 -0
- data/spec/support/v5.1/app/models/wizard.rb +1 -1
- data/spec/support/v5.1/sorbet_test_cases.rb +66 -88
- data/spec/support/v5.2/Gemfile +1 -1
- data/spec/support/v5.2/Gemfile.lock +9 -9
- data/spec/support/v5.2/app/models/spell_book.rb +2 -0
- data/spec/support/v5.2/app/models/wizard.rb +1 -1
- data/spec/support/v5.2/sorbet_test_cases.rb +66 -88
- data/spec/support/v6.0/.gitignore +6 -0
- data/spec/support/v6.0/Gemfile +3 -3
- data/spec/support/v6.0/Gemfile.lock +77 -76
- data/spec/support/v6.0/app/models/spell_book.rb +2 -0
- data/spec/support/v6.0/app/models/wizard.rb +1 -1
- data/spec/support/v6.0/bin/bundle +22 -13
- data/spec/support/v6.0/config/environments/test.rb +1 -1
- data/spec/support/v6.0/sorbet_test_cases.rb +66 -88
- data/spec/support/v6.0/tmp/pids/.keep +0 -0
- data/spec/test_data/v5.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.0/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.0/expected_headmaster.rbi +60 -190
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +42 -188
- data/spec/test_data/v5.0/expected_potion.rbi +51 -188
- data/spec/test_data/v5.0/expected_robe.rbi +51 -190
- data/spec/test_data/v5.0/expected_schema_migration.rbi +42 -188
- data/spec/test_data/v5.0/expected_school.rbi +51 -190
- data/spec/test_data/v5.0/expected_spell.rbi +42 -190
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +60 -190
- data/spec/test_data/v5.0/expected_spell_book.rbi +86 -215
- data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +60 -190
- data/spec/test_data/v5.0/expected_squib.rbi +131 -263
- data/spec/test_data/v5.0/expected_subject.rbi +42 -190
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +60 -190
- data/spec/test_data/v5.0/expected_wand.rbi +84 -225
- data/spec/test_data/v5.0/expected_wizard.rbi +131 -263
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +60 -190
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +131 -263
- data/spec/test_data/v5.1/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.1/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.1/expected_headmaster.rbi +60 -196
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +42 -194
- data/spec/test_data/v5.1/expected_potion.rbi +51 -194
- data/spec/test_data/v5.1/expected_robe.rbi +51 -196
- data/spec/test_data/v5.1/expected_schema_migration.rbi +42 -194
- data/spec/test_data/v5.1/expected_school.rbi +51 -196
- data/spec/test_data/v5.1/expected_spell.rbi +42 -196
- data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +60 -196
- data/spec/test_data/v5.1/expected_spell_book.rbi +86 -221
- data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +60 -196
- data/spec/test_data/v5.1/expected_squib.rbi +132 -270
- data/spec/test_data/v5.1/expected_subject.rbi +42 -196
- data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +60 -196
- data/spec/test_data/v5.1/expected_wand.rbi +84 -231
- data/spec/test_data/v5.1/expected_wizard.rbi +132 -270
- data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +60 -196
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +132 -270
- data/spec/test_data/v5.2/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.2/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.2/expected_attachment.rbi +60 -194
- data/spec/test_data/v5.2/expected_blob.rbi +80 -214
- data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.2/expected_headmaster.rbi +60 -196
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +42 -194
- data/spec/test_data/v5.2/expected_potion.rbi +51 -194
- data/spec/test_data/v5.2/expected_robe.rbi +51 -196
- data/spec/test_data/v5.2/expected_schema_migration.rbi +42 -194
- data/spec/test_data/v5.2/expected_school.rbi +51 -196
- data/spec/test_data/v5.2/expected_spell.rbi +42 -196
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +60 -196
- data/spec/test_data/v5.2/expected_spell_book.rbi +86 -221
- data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +60 -196
- data/spec/test_data/v5.2/expected_squib.rbi +156 -276
- data/spec/test_data/v5.2/expected_subject.rbi +42 -196
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +60 -196
- data/spec/test_data/v5.2/expected_wand.rbi +84 -231
- data/spec/test_data/v5.2/expected_wizard.rbi +156 -276
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +60 -196
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +156 -276
- data/spec/test_data/v6.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v6.0/expected_active_record_relation.rbi +10 -10
- data/spec/test_data/v6.0/expected_attachment.rbi +60 -218
- data/spec/test_data/v6.0/expected_blob.rbi +80 -238
- data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v6.0/expected_headmaster.rbi +60 -220
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +42 -218
- data/spec/test_data/v6.0/expected_potion.rbi +51 -218
- data/spec/test_data/v6.0/expected_robe.rbi +51 -220
- data/spec/test_data/v6.0/expected_routes.rbi +14 -7
- data/spec/test_data/v6.0/expected_schema_migration.rbi +42 -218
- data/spec/test_data/v6.0/expected_school.rbi +51 -220
- data/spec/test_data/v6.0/expected_spell.rbi +42 -220
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +60 -220
- data/spec/test_data/v6.0/expected_spell_book.rbi +98 -257
- data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +60 -220
- data/spec/test_data/v6.0/expected_squib.rbi +182 -326
- data/spec/test_data/v6.0/expected_subject.rbi +42 -220
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +60 -220
- data/spec/test_data/v6.0/expected_wand.rbi +100 -271
- data/spec/test_data/v6.0/expected_wizard.rbi +182 -326
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +60 -220
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +182 -326
- metadata +46 -11
- data/lib/bundled_rbi/parameters.rbi +0 -28
- data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -42
- data/lib/sorbet-rails/custom_types/integer_string.rb +0 -45
- data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -57
- data/spec/boolean_string_spec.rb +0 -59
- data/spec/custom_params_methods_spec.rb +0 -138
- data/spec/integer_string_spec.rb +0 -46
@@ -3,8 +3,6 @@
|
|
3
3
|
|
4
4
|
# typed: strong
|
5
5
|
module Wand::EnumInstanceMethods
|
6
|
-
extend T::Sig
|
7
|
-
|
8
6
|
sig { returns(T::Boolean) }
|
9
7
|
def phoenix_feather?; end
|
10
8
|
|
@@ -36,8 +34,6 @@ module Wand::ActiveRelation_WhereNot
|
|
36
34
|
end
|
37
35
|
|
38
36
|
module Wand::GeneratedAttributeMethods
|
39
|
-
extend T::Sig
|
40
|
-
|
41
37
|
sig { returns(T::Boolean) }
|
42
38
|
def broken; end
|
43
39
|
|
@@ -167,11 +163,18 @@ class Wand::CoreType < T::Enum
|
|
167
163
|
end
|
168
164
|
|
169
165
|
module Wand::GeneratedAssociationMethods
|
170
|
-
extend T::Sig
|
171
|
-
|
172
166
|
sig { returns(::Wizard) }
|
173
167
|
def wizard; end
|
174
168
|
|
169
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
|
170
|
+
def build_wizard(*args, &block); end
|
171
|
+
|
172
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
|
173
|
+
def create_wizard(*args, &block); end
|
174
|
+
|
175
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
|
176
|
+
def create_wizard!(*args, &block); end
|
177
|
+
|
175
178
|
sig { params(value: ::Wizard).void }
|
176
179
|
def wizard=(value); end
|
177
180
|
end
|
@@ -198,8 +201,7 @@ class Wand < ApplicationRecord
|
|
198
201
|
include Wand::GeneratedAttributeMethods
|
199
202
|
include Wand::GeneratedAssociationMethods
|
200
203
|
extend Wand::CustomFinderMethods
|
201
|
-
extend
|
202
|
-
extend T::Generic
|
204
|
+
extend Wand::QueryMethodsReturningRelation
|
203
205
|
RelationType = T.type_alias { T.any(Wand::ActiveRecord_Relation, Wand::ActiveRecord_Associations_CollectionProxy, Wand::ActiveRecord_AssociationRelation) }
|
204
206
|
|
205
207
|
sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
|
@@ -217,122 +219,85 @@ class Wand < ApplicationRecord
|
|
217
219
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
218
220
|
def self.unicorn_tail_hair(*args); end
|
219
221
|
|
220
|
-
sig { returns(Wand::
|
221
|
-
def
|
222
|
-
|
223
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
224
|
-
def self.unscoped(&block); end
|
225
|
-
|
226
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
227
|
-
def self.select(*args); end
|
228
|
-
|
229
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
230
|
-
def self.order(*args); end
|
231
|
-
|
232
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
233
|
-
def self.reorder(*args); end
|
234
|
-
|
235
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
236
|
-
def self.group(*args); end
|
237
|
-
|
238
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
239
|
-
def self.limit(*args); end
|
240
|
-
|
241
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
242
|
-
def self.offset(*args); end
|
243
|
-
|
244
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
245
|
-
def self.joins(*args); end
|
246
|
-
|
247
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
248
|
-
def self.left_joins(*args); end
|
249
|
-
|
250
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
251
|
-
def self.left_outer_joins(*args); end
|
252
|
-
|
253
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
254
|
-
def self.where(*args); end
|
255
|
-
|
256
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
257
|
-
def self.rewhere(*args); end
|
258
|
-
|
259
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
260
|
-
def self.preload(*args); end
|
261
|
-
|
262
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
263
|
-
def self.eager_load(*args); end
|
264
|
-
|
265
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
266
|
-
def self.includes(*args); end
|
267
|
-
|
268
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
269
|
-
def self.from(*args); end
|
270
|
-
|
271
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
272
|
-
def self.lock(*args); end
|
273
|
-
|
274
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
275
|
-
def self.readonly(*args); end
|
276
|
-
|
277
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
278
|
-
def self.or(*args); end
|
222
|
+
sig { returns(T.nilable(Wand::CoreType)) }
|
223
|
+
def typed_core_type; end
|
279
224
|
|
280
|
-
sig { params(
|
281
|
-
def
|
225
|
+
sig { params(value: T.nilable(Wand::CoreType)).void }
|
226
|
+
def typed_core_type=(value); end
|
282
227
|
|
283
|
-
sig {
|
284
|
-
def self.
|
228
|
+
sig { returns(T::Array[Wand]) }
|
229
|
+
def self.mythicals; end
|
230
|
+
end
|
285
231
|
|
286
|
-
|
287
|
-
|
232
|
+
class Wand::ActiveRecord_Relation < ActiveRecord::Relation
|
233
|
+
include Wand::ActiveRelation_WhereNot
|
234
|
+
include Wand::CustomFinderMethods
|
235
|
+
include Wand::QueryMethodsReturningRelation
|
236
|
+
Elem = type_member(fixed: Wand)
|
288
237
|
|
289
238
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
290
|
-
def
|
239
|
+
def basilisk_horn(*args); end
|
291
240
|
|
292
241
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
293
|
-
def
|
242
|
+
def dragon_heartstring(*args); end
|
294
243
|
|
295
244
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
296
|
-
def
|
245
|
+
def phoenix_feather(*args); end
|
297
246
|
|
298
247
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
299
|
-
def
|
248
|
+
def unicorn_tail_hair(*args); end
|
249
|
+
end
|
300
250
|
|
301
|
-
|
302
|
-
|
251
|
+
class Wand::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
252
|
+
include Wand::ActiveRelation_WhereNot
|
253
|
+
include Wand::CustomFinderMethods
|
254
|
+
include Wand::QueryMethodsReturningAssociationRelation
|
255
|
+
Elem = type_member(fixed: Wand)
|
303
256
|
|
304
|
-
sig { params(args: T.untyped
|
305
|
-
def
|
257
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
258
|
+
def basilisk_horn(*args); end
|
306
259
|
|
307
|
-
sig {
|
308
|
-
def
|
260
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
261
|
+
def dragon_heartstring(*args); end
|
309
262
|
|
310
|
-
sig { params(
|
311
|
-
def
|
263
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
264
|
+
def phoenix_feather(*args); end
|
312
265
|
|
313
|
-
sig { returns(
|
314
|
-
def
|
266
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
267
|
+
def unicorn_tail_hair(*args); end
|
315
268
|
end
|
316
269
|
|
317
|
-
class Wand::
|
318
|
-
include Wand::ActiveRelation_WhereNot
|
270
|
+
class Wand::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
319
271
|
include Wand::CustomFinderMethods
|
320
|
-
|
321
|
-
extend T::Generic
|
272
|
+
include Wand::QueryMethodsReturningAssociationRelation
|
322
273
|
Elem = type_member(fixed: Wand)
|
323
274
|
|
324
|
-
sig { params(args: T.untyped).returns(Wand::
|
275
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
325
276
|
def basilisk_horn(*args); end
|
326
277
|
|
327
|
-
sig { params(args: T.untyped).returns(Wand::
|
278
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
328
279
|
def dragon_heartstring(*args); end
|
329
280
|
|
330
|
-
sig { params(args: T.untyped).returns(Wand::
|
281
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
331
282
|
def phoenix_feather(*args); end
|
332
283
|
|
333
|
-
sig { params(args: T.untyped).returns(Wand::
|
284
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
334
285
|
def unicorn_tail_hair(*args); end
|
335
286
|
|
287
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
288
|
+
def <<(*records); end
|
289
|
+
|
290
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
291
|
+
def append(*records); end
|
292
|
+
|
293
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
294
|
+
def push(*records); end
|
295
|
+
|
296
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
297
|
+
def concat(*records); end
|
298
|
+
end
|
299
|
+
|
300
|
+
module Wand::QueryMethodsReturningRelation
|
336
301
|
sig { returns(Wand::ActiveRecord_Relation) }
|
337
302
|
def all; end
|
338
303
|
|
@@ -419,137 +384,25 @@ class Wand::ActiveRecord_Relation < ActiveRecord::Relation
|
|
419
384
|
|
420
385
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
421
386
|
def extending(*args, &block); end
|
422
|
-
end
|
423
|
-
|
424
|
-
class Wand::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
425
|
-
include Wand::ActiveRelation_WhereNot
|
426
|
-
include Wand::CustomFinderMethods
|
427
|
-
extend T::Sig
|
428
|
-
extend T::Generic
|
429
|
-
Elem = type_member(fixed: Wand)
|
430
387
|
|
431
|
-
sig
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
def
|
442
|
-
|
443
|
-
sig { returns(Wand::ActiveRecord_AssociationRelation) }
|
444
|
-
def all; end
|
445
|
-
|
446
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_AssociationRelation) }
|
447
|
-
def unscoped(&block); end
|
448
|
-
|
449
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
450
|
-
def select(*args); end
|
451
|
-
|
452
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
453
|
-
def order(*args); end
|
454
|
-
|
455
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
456
|
-
def reorder(*args); end
|
457
|
-
|
458
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
459
|
-
def group(*args); end
|
460
|
-
|
461
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
462
|
-
def limit(*args); end
|
463
|
-
|
464
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
465
|
-
def offset(*args); end
|
466
|
-
|
467
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
468
|
-
def joins(*args); end
|
469
|
-
|
470
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
471
|
-
def left_joins(*args); end
|
472
|
-
|
473
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
474
|
-
def left_outer_joins(*args); end
|
475
|
-
|
476
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
477
|
-
def where(*args); end
|
478
|
-
|
479
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
480
|
-
def rewhere(*args); end
|
481
|
-
|
482
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
483
|
-
def preload(*args); end
|
484
|
-
|
485
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
486
|
-
def eager_load(*args); end
|
487
|
-
|
488
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
489
|
-
def includes(*args); end
|
490
|
-
|
491
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
492
|
-
def from(*args); end
|
493
|
-
|
494
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
495
|
-
def lock(*args); end
|
496
|
-
|
497
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
498
|
-
def readonly(*args); end
|
499
|
-
|
500
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
501
|
-
def or(*args); end
|
502
|
-
|
503
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
504
|
-
def having(*args); end
|
505
|
-
|
506
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
507
|
-
def create_with(*args); end
|
508
|
-
|
509
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
510
|
-
def distinct(*args); end
|
511
|
-
|
512
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
513
|
-
def references(*args); end
|
514
|
-
|
515
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
516
|
-
def none(*args); end
|
517
|
-
|
518
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
519
|
-
def unscope(*args); end
|
520
|
-
|
521
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
522
|
-
def merge(*args); end
|
523
|
-
|
524
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
525
|
-
def except(*args); end
|
526
|
-
|
527
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_AssociationRelation) }
|
528
|
-
def extending(*args, &block); end
|
388
|
+
sig do
|
389
|
+
params(
|
390
|
+
of: T.nilable(Integer),
|
391
|
+
start: T.nilable(Integer),
|
392
|
+
finish: T.nilable(Integer),
|
393
|
+
load: T.nilable(T::Boolean),
|
394
|
+
error_on_ignore: T.nilable(T::Boolean),
|
395
|
+
block: T.nilable(T.proc.params(e: Wand::ActiveRecord_Relation).void)
|
396
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
397
|
+
end
|
398
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
529
399
|
end
|
530
400
|
|
531
|
-
|
532
|
-
include Wand::CustomFinderMethods
|
533
|
-
extend T::Sig
|
534
|
-
extend T::Generic
|
535
|
-
Elem = type_member(fixed: Wand)
|
536
|
-
|
537
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
538
|
-
def basilisk_horn(*args); end
|
539
|
-
|
540
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
541
|
-
def dragon_heartstring(*args); end
|
542
|
-
|
543
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
544
|
-
def phoenix_feather(*args); end
|
545
|
-
|
546
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
547
|
-
def unicorn_tail_hair(*args); end
|
548
|
-
|
401
|
+
module Wand::QueryMethodsReturningAssociationRelation
|
549
402
|
sig { returns(Wand::ActiveRecord_AssociationRelation) }
|
550
403
|
def all; end
|
551
404
|
|
552
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wand::
|
405
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
553
406
|
def unscoped(&block); end
|
554
407
|
|
555
408
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
@@ -633,15 +486,15 @@ class Wand::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associatio
|
|
633
486
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_AssociationRelation) }
|
634
487
|
def extending(*args, &block); end
|
635
488
|
|
636
|
-
sig
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
def
|
489
|
+
sig do
|
490
|
+
params(
|
491
|
+
of: T.nilable(Integer),
|
492
|
+
start: T.nilable(Integer),
|
493
|
+
finish: T.nilable(Integer),
|
494
|
+
load: T.nilable(T::Boolean),
|
495
|
+
error_on_ignore: T.nilable(T::Boolean),
|
496
|
+
block: T.nilable(T.proc.params(e: Wand::ActiveRecord_AssociationRelation).void)
|
497
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
498
|
+
end
|
499
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
647
500
|
end
|
@@ -3,8 +3,6 @@
|
|
3
3
|
|
4
4
|
# typed: strong
|
5
5
|
module Wizard::EnumInstanceMethods
|
6
|
-
extend T::Sig
|
7
|
-
|
8
6
|
sig { returns(T::Boolean) }
|
9
7
|
def broom_nimbus?; end
|
10
8
|
|
@@ -114,8 +112,6 @@ module Wizard::ActiveRelation_WhereNot
|
|
114
112
|
end
|
115
113
|
|
116
114
|
module Wizard::GeneratedAttributeMethods
|
117
|
-
extend T::Sig
|
118
|
-
|
119
115
|
sig { returns(T::Boolean) }
|
120
116
|
def broom?; end
|
121
117
|
|
@@ -293,11 +289,18 @@ class Wizard::QuidditchPosition < T::Enum
|
|
293
289
|
end
|
294
290
|
|
295
291
|
module Wizard::GeneratedAssociationMethods
|
296
|
-
extend T::Sig
|
297
|
-
|
298
292
|
sig { returns(T.nilable(::School)) }
|
299
293
|
def school; end
|
300
294
|
|
295
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
|
296
|
+
def build_school(*args, &block); end
|
297
|
+
|
298
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
|
299
|
+
def create_school(*args, &block); end
|
300
|
+
|
301
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
|
302
|
+
def create_school!(*args, &block); end
|
303
|
+
|
301
304
|
sig { params(value: T.nilable(::School)).void }
|
302
305
|
def school=(value); end
|
303
306
|
|
@@ -322,6 +325,15 @@ module Wizard::GeneratedAssociationMethods
|
|
322
325
|
sig { returns(T.nilable(::Wand)) }
|
323
326
|
def wand; end
|
324
327
|
|
328
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
329
|
+
def build_wand(*args, &block); end
|
330
|
+
|
331
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
332
|
+
def create_wand(*args, &block); end
|
333
|
+
|
334
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
335
|
+
def create_wand!(*args, &block); end
|
336
|
+
|
325
337
|
sig { params(value: T.nilable(::Wand)).void }
|
326
338
|
def wand=(value); end
|
327
339
|
end
|
@@ -348,8 +360,7 @@ class Wizard < ApplicationRecord
|
|
348
360
|
include Wizard::GeneratedAttributeMethods
|
349
361
|
include Wizard::GeneratedAssociationMethods
|
350
362
|
extend Wizard::CustomFinderMethods
|
351
|
-
extend
|
352
|
-
extend T::Generic
|
363
|
+
extend Wizard::QueryMethodsReturningRelation
|
353
364
|
RelationType = T.type_alias { T.any(Wizard::ActiveRecord_Relation, Wizard::ActiveRecord_Associations_CollectionProxy, Wizard::ActiveRecord_AssociationRelation) }
|
354
365
|
|
355
366
|
sig { returns(T::Hash[T.any(String, Symbol), String]) }
|
@@ -424,93 +435,6 @@ class Wizard < ApplicationRecord
|
|
424
435
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
425
436
|
def self.recent(*args); end
|
426
437
|
|
427
|
-
sig { returns(Wizard::ActiveRecord_Relation) }
|
428
|
-
def self.all; end
|
429
|
-
|
430
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
431
|
-
def self.unscoped(&block); end
|
432
|
-
|
433
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
434
|
-
def self.select(*args); end
|
435
|
-
|
436
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
437
|
-
def self.order(*args); end
|
438
|
-
|
439
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
440
|
-
def self.reorder(*args); end
|
441
|
-
|
442
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
443
|
-
def self.group(*args); end
|
444
|
-
|
445
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
446
|
-
def self.limit(*args); end
|
447
|
-
|
448
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
449
|
-
def self.offset(*args); end
|
450
|
-
|
451
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
452
|
-
def self.joins(*args); end
|
453
|
-
|
454
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
455
|
-
def self.left_joins(*args); end
|
456
|
-
|
457
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
458
|
-
def self.left_outer_joins(*args); end
|
459
|
-
|
460
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
461
|
-
def self.where(*args); end
|
462
|
-
|
463
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
464
|
-
def self.rewhere(*args); end
|
465
|
-
|
466
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
467
|
-
def self.preload(*args); end
|
468
|
-
|
469
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
470
|
-
def self.eager_load(*args); end
|
471
|
-
|
472
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
473
|
-
def self.includes(*args); end
|
474
|
-
|
475
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
476
|
-
def self.from(*args); end
|
477
|
-
|
478
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
479
|
-
def self.lock(*args); end
|
480
|
-
|
481
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
482
|
-
def self.readonly(*args); end
|
483
|
-
|
484
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
485
|
-
def self.or(*args); end
|
486
|
-
|
487
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
488
|
-
def self.having(*args); end
|
489
|
-
|
490
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
491
|
-
def self.create_with(*args); end
|
492
|
-
|
493
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
494
|
-
def self.distinct(*args); end
|
495
|
-
|
496
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
497
|
-
def self.references(*args); end
|
498
|
-
|
499
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
500
|
-
def self.none(*args); end
|
501
|
-
|
502
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
503
|
-
def self.unscope(*args); end
|
504
|
-
|
505
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
506
|
-
def self.merge(*args); end
|
507
|
-
|
508
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
509
|
-
def self.except(*args); end
|
510
|
-
|
511
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
512
|
-
def self.extending(*args, &block); end
|
513
|
-
|
514
438
|
sig { returns(T.nilable(Wizard::Broom)) }
|
515
439
|
def typed_broom; end
|
516
440
|
|
@@ -551,8 +475,7 @@ end
|
|
551
475
|
class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
|
552
476
|
include Wizard::ActiveRelation_WhereNot
|
553
477
|
include Wizard::CustomFinderMethods
|
554
|
-
|
555
|
-
extend T::Generic
|
478
|
+
include Wizard::QueryMethodsReturningRelation
|
556
479
|
Elem = type_member(fixed: Wizard)
|
557
480
|
|
558
481
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
@@ -608,100 +531,72 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
|
|
608
531
|
|
609
532
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
610
533
|
def recent(*args); end
|
534
|
+
end
|
611
535
|
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
619
|
-
def select(*args); end
|
620
|
-
|
621
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
622
|
-
def order(*args); end
|
623
|
-
|
624
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
625
|
-
def reorder(*args); end
|
626
|
-
|
627
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
628
|
-
def group(*args); end
|
629
|
-
|
630
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
631
|
-
def limit(*args); end
|
632
|
-
|
633
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
634
|
-
def offset(*args); end
|
635
|
-
|
636
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
637
|
-
def joins(*args); end
|
638
|
-
|
639
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
640
|
-
def left_joins(*args); end
|
641
|
-
|
642
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
643
|
-
def left_outer_joins(*args); end
|
536
|
+
class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
537
|
+
include Wizard::ActiveRelation_WhereNot
|
538
|
+
include Wizard::CustomFinderMethods
|
539
|
+
include Wizard::QueryMethodsReturningAssociationRelation
|
540
|
+
Elem = type_member(fixed: Wizard)
|
644
541
|
|
645
|
-
sig { params(args: T.untyped).returns(Wizard::
|
646
|
-
def
|
542
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
543
|
+
def Gryffindor(*args); end
|
647
544
|
|
648
|
-
sig { params(args: T.untyped).returns(Wizard::
|
649
|
-
def
|
545
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
546
|
+
def Hagrid(*args); end
|
650
547
|
|
651
|
-
sig { params(args: T.untyped).returns(Wizard::
|
652
|
-
def
|
548
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
549
|
+
def Hufflepuff(*args); end
|
653
550
|
|
654
|
-
sig { params(args: T.untyped).returns(Wizard::
|
655
|
-
def
|
551
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
552
|
+
def Ravenclaw(*args); end
|
656
553
|
|
657
|
-
sig { params(args: T.untyped).returns(Wizard::
|
658
|
-
def
|
554
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
555
|
+
def Slytherin(*args); end
|
659
556
|
|
660
|
-
sig { params(args: T.untyped).returns(Wizard::
|
661
|
-
def
|
557
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
558
|
+
def black_hair(*args); end
|
662
559
|
|
663
|
-
sig { params(args: T.untyped).returns(Wizard::
|
664
|
-
def
|
560
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
561
|
+
def blonde_hair(*args); end
|
665
562
|
|
666
|
-
sig { params(args: T.untyped).returns(Wizard::
|
667
|
-
def
|
563
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
564
|
+
def broom_firebolt(*args); end
|
668
565
|
|
669
|
-
sig { params(args: T.untyped).returns(Wizard::
|
670
|
-
def
|
566
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
567
|
+
def broom_nimbus(*args); end
|
671
568
|
|
672
|
-
sig { params(args: T.untyped).returns(Wizard::
|
673
|
-
def
|
569
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
570
|
+
def brown_hair(*args); end
|
674
571
|
|
675
|
-
sig { params(args: T.untyped).returns(Wizard::
|
676
|
-
def
|
572
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
573
|
+
def color_blue_eyes(*args); end
|
677
574
|
|
678
|
-
sig { params(args: T.untyped).returns(Wizard::
|
679
|
-
def
|
575
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
576
|
+
def color_brown_eyes(*args); end
|
680
577
|
|
681
|
-
sig { params(args: T.untyped).returns(Wizard::
|
682
|
-
def
|
578
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
579
|
+
def color_green_eyes(*args); end
|
683
580
|
|
684
|
-
sig { params(args: T.untyped).returns(Wizard::
|
685
|
-
def
|
581
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
582
|
+
def quidditch_beater(*args); end
|
686
583
|
|
687
|
-
sig { params(args: T.untyped).returns(Wizard::
|
688
|
-
def
|
584
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
585
|
+
def quidditch_chaser(*args); end
|
689
586
|
|
690
|
-
sig { params(args: T.untyped).returns(Wizard::
|
691
|
-
def
|
587
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
588
|
+
def quidditch_keeper(*args); end
|
692
589
|
|
693
|
-
sig { params(args: T.untyped).returns(Wizard::
|
694
|
-
def
|
590
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
591
|
+
def quidditch_seeker(*args); end
|
695
592
|
|
696
|
-
sig { params(args: T.untyped
|
697
|
-
def
|
593
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
594
|
+
def recent(*args); end
|
698
595
|
end
|
699
596
|
|
700
|
-
class Wizard::
|
701
|
-
include Wizard::ActiveRelation_WhereNot
|
597
|
+
class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
702
598
|
include Wizard::CustomFinderMethods
|
703
|
-
|
704
|
-
extend T::Generic
|
599
|
+
include Wizard::QueryMethodsReturningAssociationRelation
|
705
600
|
Elem = type_member(fixed: Wizard)
|
706
601
|
|
707
602
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
@@ -758,158 +653,125 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
|
|
758
653
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
759
654
|
def recent(*args); end
|
760
655
|
|
761
|
-
sig {
|
656
|
+
sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
|
657
|
+
def <<(*records); end
|
658
|
+
|
659
|
+
sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
|
660
|
+
def append(*records); end
|
661
|
+
|
662
|
+
sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
|
663
|
+
def push(*records); end
|
664
|
+
|
665
|
+
sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
|
666
|
+
def concat(*records); end
|
667
|
+
end
|
668
|
+
|
669
|
+
module Wizard::QueryMethodsReturningRelation
|
670
|
+
sig { returns(Wizard::ActiveRecord_Relation) }
|
762
671
|
def all; end
|
763
672
|
|
764
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::
|
673
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
765
674
|
def unscoped(&block); end
|
766
675
|
|
767
|
-
sig { params(args: T.untyped).returns(Wizard::
|
676
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
768
677
|
def select(*args); end
|
769
678
|
|
770
|
-
sig { params(args: T.untyped).returns(Wizard::
|
679
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
771
680
|
def order(*args); end
|
772
681
|
|
773
|
-
sig { params(args: T.untyped).returns(Wizard::
|
682
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
774
683
|
def reorder(*args); end
|
775
684
|
|
776
|
-
sig { params(args: T.untyped).returns(Wizard::
|
685
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
777
686
|
def group(*args); end
|
778
687
|
|
779
|
-
sig { params(args: T.untyped).returns(Wizard::
|
688
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
780
689
|
def limit(*args); end
|
781
690
|
|
782
|
-
sig { params(args: T.untyped).returns(Wizard::
|
691
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
783
692
|
def offset(*args); end
|
784
693
|
|
785
|
-
sig { params(args: T.untyped).returns(Wizard::
|
694
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
786
695
|
def joins(*args); end
|
787
696
|
|
788
|
-
sig { params(args: T.untyped).returns(Wizard::
|
697
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
789
698
|
def left_joins(*args); end
|
790
699
|
|
791
|
-
sig { params(args: T.untyped).returns(Wizard::
|
700
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
792
701
|
def left_outer_joins(*args); end
|
793
702
|
|
794
|
-
sig { params(args: T.untyped).returns(Wizard::
|
703
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
795
704
|
def where(*args); end
|
796
705
|
|
797
|
-
sig { params(args: T.untyped).returns(Wizard::
|
706
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
798
707
|
def rewhere(*args); end
|
799
708
|
|
800
|
-
sig { params(args: T.untyped).returns(Wizard::
|
709
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
801
710
|
def preload(*args); end
|
802
711
|
|
803
|
-
sig { params(args: T.untyped).returns(Wizard::
|
712
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
804
713
|
def eager_load(*args); end
|
805
714
|
|
806
|
-
sig { params(args: T.untyped).returns(Wizard::
|
715
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
807
716
|
def includes(*args); end
|
808
717
|
|
809
|
-
sig { params(args: T.untyped).returns(Wizard::
|
718
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
810
719
|
def from(*args); end
|
811
720
|
|
812
|
-
sig { params(args: T.untyped).returns(Wizard::
|
721
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
813
722
|
def lock(*args); end
|
814
723
|
|
815
|
-
sig { params(args: T.untyped).returns(Wizard::
|
724
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
816
725
|
def readonly(*args); end
|
817
726
|
|
818
|
-
sig { params(args: T.untyped).returns(Wizard::
|
727
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
819
728
|
def or(*args); end
|
820
729
|
|
821
|
-
sig { params(args: T.untyped).returns(Wizard::
|
730
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
822
731
|
def having(*args); end
|
823
732
|
|
824
|
-
sig { params(args: T.untyped).returns(Wizard::
|
733
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
825
734
|
def create_with(*args); end
|
826
735
|
|
827
|
-
sig { params(args: T.untyped).returns(Wizard::
|
736
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
828
737
|
def distinct(*args); end
|
829
738
|
|
830
|
-
sig { params(args: T.untyped).returns(Wizard::
|
739
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
831
740
|
def references(*args); end
|
832
741
|
|
833
|
-
sig { params(args: T.untyped).returns(Wizard::
|
742
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
834
743
|
def none(*args); end
|
835
744
|
|
836
|
-
sig { params(args: T.untyped).returns(Wizard::
|
745
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
837
746
|
def unscope(*args); end
|
838
747
|
|
839
|
-
sig { params(args: T.untyped).returns(Wizard::
|
748
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
840
749
|
def merge(*args); end
|
841
750
|
|
842
|
-
sig { params(args: T.untyped).returns(Wizard::
|
751
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
843
752
|
def except(*args); end
|
844
753
|
|
845
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::
|
754
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
846
755
|
def extending(*args, &block); end
|
847
|
-
end
|
848
|
-
|
849
|
-
class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
850
|
-
include Wizard::CustomFinderMethods
|
851
|
-
extend T::Sig
|
852
|
-
extend T::Generic
|
853
|
-
Elem = type_member(fixed: Wizard)
|
854
|
-
|
855
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
856
|
-
def Gryffindor(*args); end
|
857
|
-
|
858
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
859
|
-
def Hagrid(*args); end
|
860
|
-
|
861
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
862
|
-
def Hufflepuff(*args); end
|
863
|
-
|
864
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
865
|
-
def Ravenclaw(*args); end
|
866
|
-
|
867
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
868
|
-
def Slytherin(*args); end
|
869
|
-
|
870
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
871
|
-
def black_hair(*args); end
|
872
|
-
|
873
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
874
|
-
def blonde_hair(*args); end
|
875
|
-
|
876
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
877
|
-
def broom_firebolt(*args); end
|
878
|
-
|
879
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
880
|
-
def broom_nimbus(*args); end
|
881
|
-
|
882
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
883
|
-
def brown_hair(*args); end
|
884
|
-
|
885
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
886
|
-
def color_blue_eyes(*args); end
|
887
|
-
|
888
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
889
|
-
def color_brown_eyes(*args); end
|
890
|
-
|
891
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
892
|
-
def color_green_eyes(*args); end
|
893
|
-
|
894
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
895
|
-
def quidditch_beater(*args); end
|
896
|
-
|
897
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
898
|
-
def quidditch_chaser(*args); end
|
899
|
-
|
900
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
901
|
-
def quidditch_keeper(*args); end
|
902
756
|
|
903
|
-
sig
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
757
|
+
sig do
|
758
|
+
params(
|
759
|
+
of: T.nilable(Integer),
|
760
|
+
start: T.nilable(Integer),
|
761
|
+
finish: T.nilable(Integer),
|
762
|
+
load: T.nilable(T::Boolean),
|
763
|
+
error_on_ignore: T.nilable(T::Boolean),
|
764
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_Relation).void)
|
765
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
766
|
+
end
|
767
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
768
|
+
end
|
908
769
|
|
770
|
+
module Wizard::QueryMethodsReturningAssociationRelation
|
909
771
|
sig { returns(Wizard::ActiveRecord_AssociationRelation) }
|
910
772
|
def all; end
|
911
773
|
|
912
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::
|
774
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
913
775
|
def unscoped(&block); end
|
914
776
|
|
915
777
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
@@ -993,15 +855,15 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
|
|
993
855
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
|
994
856
|
def extending(*args, &block); end
|
995
857
|
|
996
|
-
sig
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
def
|
858
|
+
sig do
|
859
|
+
params(
|
860
|
+
of: T.nilable(Integer),
|
861
|
+
start: T.nilable(Integer),
|
862
|
+
finish: T.nilable(Integer),
|
863
|
+
load: T.nilable(T::Boolean),
|
864
|
+
error_on_ignore: T.nilable(T::Boolean),
|
865
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_AssociationRelation).void)
|
866
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
867
|
+
end
|
868
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
1007
869
|
end
|