sorbet-rails 0.5.8.1 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/README.md +27 -4
  4. data/lib/bundled_rbi/active_record_relation.rbi +79 -0
  5. data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +47 -0
  6. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +20 -1
  7. data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +33 -0
  8. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +22 -6
  9. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +10 -2
  10. data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +46 -35
  11. data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +40 -34
  12. data/lib/sorbet-rails/model_plugins/plugins.rb +6 -0
  13. data/lib/sorbet-rails/routes_rbi_formatter.rb +4 -0
  14. data/lib/sorbet-rails/tasks/rails_rbi.rake +2 -1
  15. data/sorbet-rails.gemspec +2 -2
  16. data/spec/generators/rails-template.rb +25 -3
  17. data/spec/generators/sorbet_test_cases.rb +5 -0
  18. data/spec/model_rbi_formatter_spec.rb +1 -1
  19. data/spec/rake_rails_rbi_models_spec.rb +1 -0
  20. data/spec/support/v5.0/Gemfile +1 -1
  21. data/spec/support/v5.0/Gemfile.lock +18 -14
  22. data/spec/support/v5.0/app/models/school.rb +3 -0
  23. data/spec/support/v5.0/app/models/spell_book.rb +3 -1
  24. data/spec/support/v5.0/app/models/wizard.rb +3 -0
  25. data/spec/support/v5.0/config/environments/development.rb +1 -1
  26. data/spec/support/v5.0/config/initializers/sorbet_rails.rb +1 -1
  27. data/spec/support/v5.0/db/migrate/20190620000003_create_spell_books.rb +1 -1
  28. data/spec/support/v5.0/db/migrate/20190620000008_add_robe_to_wizard.rb +1 -1
  29. data/spec/support/v5.0/db/migrate/20190620000009_add_school.rb +10 -0
  30. data/spec/support/v5.0/db/schema.rb +9 -4
  31. data/spec/support/v5.0/sorbet_test_cases.rb +5 -0
  32. data/spec/support/v5.1/Gemfile +1 -1
  33. data/spec/support/v5.1/Gemfile.lock +18 -14
  34. data/spec/support/v5.1/app/models/school.rb +3 -0
  35. data/spec/support/v5.1/app/models/spell_book.rb +3 -1
  36. data/spec/support/v5.1/app/models/wizard.rb +3 -0
  37. data/spec/support/v5.1/config/environments/test.rb +1 -1
  38. data/spec/support/v5.1/config/initializers/sorbet_rails.rb +1 -1
  39. data/spec/support/v5.1/db/migrate/20190620000003_create_spell_books.rb +1 -1
  40. data/spec/support/v5.1/db/migrate/20190620000008_add_robe_to_wizard.rb +1 -1
  41. data/spec/support/v5.1/db/migrate/20190620000009_add_school.rb +10 -0
  42. data/spec/support/v5.1/db/schema.rb +9 -4
  43. data/spec/support/v5.1/sorbet_test_cases.rb +5 -0
  44. data/spec/support/v5.2/Gemfile +1 -1
  45. data/spec/support/v5.2/Gemfile.lock +54 -50
  46. data/spec/support/v5.2/app/models/school.rb +3 -0
  47. data/spec/support/v5.2/app/models/spell_book.rb +3 -1
  48. data/spec/support/v5.2/app/models/wizard.rb +3 -0
  49. data/spec/support/v5.2/config/environments/development.rb +1 -1
  50. data/spec/support/v5.2/config/initializers/sorbet_rails.rb +1 -1
  51. data/spec/support/v5.2/db/migrate/20190620000003_create_spell_books.rb +1 -1
  52. data/spec/support/v5.2/db/migrate/20190620000008_add_robe_to_wizard.rb +1 -1
  53. data/spec/support/v5.2/db/migrate/20190620000009_add_school.rb +10 -0
  54. data/spec/support/v5.2/db/schema.rb +9 -4
  55. data/spec/support/v5.2/sorbet_test_cases.rb +5 -0
  56. data/spec/support/v6.0/Gemfile +1 -1
  57. data/spec/support/v6.0/Gemfile.lock +70 -66
  58. data/spec/support/v6.0/app/models/school.rb +3 -0
  59. data/spec/support/v6.0/app/models/spell_book.rb +3 -1
  60. data/spec/support/v6.0/app/models/wizard.rb +3 -0
  61. data/spec/support/v6.0/config/environments/development.rb +1 -1
  62. data/spec/support/v6.0/config/initializers/sorbet_rails.rb +1 -1
  63. data/spec/support/v6.0/db/migrate/20190620000003_create_spell_books.rb +1 -1
  64. data/spec/support/v6.0/db/migrate/20190620000008_add_robe_to_wizard.rb +1 -1
  65. data/spec/support/v6.0/db/migrate/20190620000009_add_school.rb +10 -0
  66. data/spec/support/v6.0/db/schema.rb +10 -4
  67. data/spec/support/v6.0/sorbet_test_cases.rb +5 -0
  68. data/spec/test_data/v5.0/expected_internal_metadata.rbi +0 -77
  69. data/spec/test_data/v5.0/expected_potion.rbi +0 -77
  70. data/spec/test_data/v5.0/expected_robe.rbi +23 -77
  71. data/spec/test_data/v5.0/expected_routes.rbi +4 -0
  72. data/spec/test_data/v5.0/expected_schema_migration.rbi +0 -77
  73. data/spec/test_data/v5.0/expected_school.rbi +651 -0
  74. data/spec/test_data/v5.0/expected_spell_book.rbi +3 -80
  75. data/spec/test_data/v5.0/expected_squib.rbi +17 -79
  76. data/spec/test_data/v5.0/expected_wand.rbi +4 -81
  77. data/spec/test_data/v5.0/expected_wizard.rbi +17 -79
  78. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +17 -79
  79. data/spec/test_data/v5.1/expected_internal_metadata.rbi +0 -77
  80. data/spec/test_data/v5.1/expected_potion.rbi +0 -77
  81. data/spec/test_data/v5.1/expected_robe.rbi +23 -77
  82. data/spec/test_data/v5.1/expected_routes.rbi +4 -0
  83. data/spec/test_data/v5.1/expected_schema_migration.rbi +0 -77
  84. data/spec/test_data/v5.1/expected_school.rbi +663 -0
  85. data/spec/test_data/v5.1/expected_spell_book.rbi +3 -80
  86. data/spec/test_data/v5.1/expected_squib.rbi +17 -79
  87. data/spec/test_data/v5.1/expected_wand.rbi +4 -81
  88. data/spec/test_data/v5.1/expected_wizard.rbi +17 -79
  89. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +17 -79
  90. data/spec/test_data/v5.2/expected_attachment.rbi +0 -77
  91. data/spec/test_data/v5.2/expected_blob.rbi +0 -77
  92. data/spec/test_data/v5.2/expected_internal_metadata.rbi +0 -77
  93. data/spec/test_data/v5.2/expected_potion.rbi +0 -77
  94. data/spec/test_data/v5.2/expected_robe.rbi +23 -77
  95. data/spec/test_data/v5.2/expected_routes.rbi +4 -0
  96. data/spec/test_data/v5.2/expected_schema_migration.rbi +0 -77
  97. data/spec/test_data/v5.2/expected_school.rbi +663 -0
  98. data/spec/test_data/v5.2/expected_spell_book.rbi +3 -80
  99. data/spec/test_data/v5.2/expected_squib.rbi +17 -79
  100. data/spec/test_data/v5.2/expected_wand.rbi +4 -81
  101. data/spec/test_data/v5.2/expected_wizard.rbi +17 -79
  102. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +17 -79
  103. data/spec/test_data/v6.0/expected_attachment.rbi +0 -77
  104. data/spec/test_data/v6.0/expected_blob.rbi +0 -77
  105. data/spec/test_data/v6.0/expected_internal_metadata.rbi +0 -77
  106. data/spec/test_data/v6.0/expected_potion.rbi +0 -77
  107. data/spec/test_data/v6.0/expected_robe.rbi +23 -77
  108. data/spec/test_data/v6.0/expected_routes.rbi +4 -0
  109. data/spec/test_data/v6.0/expected_schema_migration.rbi +0 -77
  110. data/spec/test_data/v6.0/expected_school.rbi +711 -0
  111. data/spec/test_data/v6.0/expected_spell_book.rbi +3 -80
  112. data/spec/test_data/v6.0/expected_squib.rbi +17 -79
  113. data/spec/test_data/v6.0/expected_wand.rbi +4 -81
  114. data/spec/test_data/v6.0/expected_wizard.rbi +17 -79
  115. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +17 -79
  116. metadata +31 -4
@@ -44,7 +44,7 @@ module SpellBook::GeneratedAttributeMethods
44
44
  sig { returns(Integer) }
45
45
  def id; end
46
46
 
47
- sig { params(value: Integer).void }
47
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
48
48
  def id=(value); end
49
49
 
50
50
  sig { returns(T::Boolean) }
@@ -59,10 +59,10 @@ module SpellBook::GeneratedAttributeMethods
59
59
  sig { returns(T::Boolean) }
60
60
  def name?; end
61
61
 
62
- sig { returns(T.nilable(Integer)) }
62
+ sig { returns(Integer) }
63
63
  def wizard_id; end
64
64
 
65
- sig { params(value: T.nilable(Integer)).void }
65
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
66
66
  def wizard_id=(value); end
67
67
 
68
68
  sig { returns(T::Boolean) }
@@ -370,83 +370,6 @@ class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
370
370
 
371
371
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
372
372
  def extending(*args, &block); end
373
-
374
- sig { params(args: T.untyped).returns(SpellBook) }
375
- def find(*args); end
376
-
377
- sig { params(args: T.untyped).returns(T.nilable(SpellBook)) }
378
- def find_by(*args); end
379
-
380
- sig { params(args: T.untyped).returns(SpellBook) }
381
- def find_by!(*args); end
382
-
383
- sig { returns(T.nilable(SpellBook)) }
384
- def first; end
385
-
386
- sig { returns(SpellBook) }
387
- def first!; end
388
-
389
- sig { returns(T.nilable(SpellBook)) }
390
- def second; end
391
-
392
- sig { returns(SpellBook) }
393
- def second!; end
394
-
395
- sig { returns(T.nilable(SpellBook)) }
396
- def third; end
397
-
398
- sig { returns(SpellBook) }
399
- def third!; end
400
-
401
- sig { returns(T.nilable(SpellBook)) }
402
- def third_to_last; end
403
-
404
- sig { returns(SpellBook) }
405
- def third_to_last!; end
406
-
407
- sig { returns(T.nilable(SpellBook)) }
408
- def second_to_last; end
409
-
410
- sig { returns(SpellBook) }
411
- def second_to_last!; end
412
-
413
- sig { returns(T.nilable(SpellBook)) }
414
- def last; end
415
-
416
- sig { returns(SpellBook) }
417
- def last!; end
418
-
419
- sig { params(conditions: T.untyped).returns(T::Boolean) }
420
- def exists?(conditions = nil); end
421
-
422
- sig { params(args: T.untyped).returns(T::Boolean) }
423
- def any?(*args); end
424
-
425
- sig { params(args: T.untyped).returns(T::Boolean) }
426
- def many?(*args); end
427
-
428
- sig { params(args: T.untyped).returns(T::Boolean) }
429
- def none?(*args); end
430
-
431
- sig { params(args: T.untyped).returns(T::Boolean) }
432
- def one?(*args); end
433
-
434
- sig { override.params(block: T.proc.params(e: SpellBook).void).returns(T::Array[SpellBook]) }
435
- def each(&block); end
436
-
437
- sig { params(level: T.nilable(Integer)).returns(T::Array[SpellBook]) }
438
- def flatten(level); end
439
-
440
- sig { returns(T::Array[SpellBook]) }
441
- def to_a; end
442
-
443
- sig do
444
- type_parameters(:U).params(
445
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
446
- )
447
- .returns(T::Array[T.type_parameter(:U)])
448
- end
449
- def map(&blk); end
450
373
  end
451
374
 
452
375
  class SpellBook::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
@@ -155,7 +155,7 @@ module Squib::GeneratedAttributeMethods
155
155
  sig { returns(T.nilable(Integer)) }
156
156
  def hair_length; end
157
157
 
158
- sig { params(value: T.nilable(Integer)).void }
158
+ sig { params(value: T.nilable(T.any(Integer, Float, ActiveSupport::Duration))).void }
159
159
  def hair_length=(value); end
160
160
 
161
161
  sig { returns(T::Boolean) }
@@ -173,7 +173,7 @@ module Squib::GeneratedAttributeMethods
173
173
  sig { returns(Integer) }
174
174
  def id; end
175
175
 
176
- sig { params(value: Integer).void }
176
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
177
177
  def id=(value); end
178
178
 
179
179
  sig { returns(T::Boolean) }
@@ -215,6 +215,15 @@ module Squib::GeneratedAttributeMethods
215
215
  sig { returns(T::Boolean) }
216
216
  def quidditch_position?; end
217
217
 
218
+ sig { returns(T.nilable(Integer)) }
219
+ def school_id; end
220
+
221
+ sig { params(value: T.nilable(T.any(Integer, Float, ActiveSupport::Duration))).void }
222
+ def school_id=(value); end
223
+
224
+ sig { returns(T::Boolean) }
225
+ def school_id?; end
226
+
218
227
  sig { returns(String) }
219
228
  def type; end
220
229
 
@@ -237,6 +246,12 @@ end
237
246
  module Squib::GeneratedAssociationMethods
238
247
  extend T::Sig
239
248
 
249
+ sig { returns(T.nilable(::School)) }
250
+ def school; end
251
+
252
+ sig { params(value: T.nilable(::School)).void }
253
+ def school=(value); end
254
+
240
255
  sig { returns(::SpellBook::ActiveRecord_Associations_CollectionProxy) }
241
256
  def spell_books; end
242
257
 
@@ -646,83 +661,6 @@ class Squib::ActiveRecord_Relation < ActiveRecord::Relation
646
661
 
647
662
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
648
663
  def extending(*args, &block); end
649
-
650
- sig { params(args: T.untyped).returns(Squib) }
651
- def find(*args); end
652
-
653
- sig { params(args: T.untyped).returns(T.nilable(Squib)) }
654
- def find_by(*args); end
655
-
656
- sig { params(args: T.untyped).returns(Squib) }
657
- def find_by!(*args); end
658
-
659
- sig { returns(T.nilable(Squib)) }
660
- def first; end
661
-
662
- sig { returns(Squib) }
663
- def first!; end
664
-
665
- sig { returns(T.nilable(Squib)) }
666
- def second; end
667
-
668
- sig { returns(Squib) }
669
- def second!; end
670
-
671
- sig { returns(T.nilable(Squib)) }
672
- def third; end
673
-
674
- sig { returns(Squib) }
675
- def third!; end
676
-
677
- sig { returns(T.nilable(Squib)) }
678
- def third_to_last; end
679
-
680
- sig { returns(Squib) }
681
- def third_to_last!; end
682
-
683
- sig { returns(T.nilable(Squib)) }
684
- def second_to_last; end
685
-
686
- sig { returns(Squib) }
687
- def second_to_last!; end
688
-
689
- sig { returns(T.nilable(Squib)) }
690
- def last; end
691
-
692
- sig { returns(Squib) }
693
- def last!; end
694
-
695
- sig { params(conditions: T.untyped).returns(T::Boolean) }
696
- def exists?(conditions = nil); end
697
-
698
- sig { params(args: T.untyped).returns(T::Boolean) }
699
- def any?(*args); end
700
-
701
- sig { params(args: T.untyped).returns(T::Boolean) }
702
- def many?(*args); end
703
-
704
- sig { params(args: T.untyped).returns(T::Boolean) }
705
- def none?(*args); end
706
-
707
- sig { params(args: T.untyped).returns(T::Boolean) }
708
- def one?(*args); end
709
-
710
- sig { override.params(block: T.proc.params(e: Squib).void).returns(T::Array[Squib]) }
711
- def each(&block); end
712
-
713
- sig { params(level: T.nilable(Integer)).returns(T::Array[Squib]) }
714
- def flatten(level); end
715
-
716
- sig { returns(T::Array[Squib]) }
717
- def to_a; end
718
-
719
- sig do
720
- type_parameters(:U).params(
721
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
722
- )
723
- .returns(T::Array[T.type_parameter(:U)])
724
- end
725
- def map(&blk); end
726
664
  end
727
665
 
728
666
  class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
@@ -95,7 +95,7 @@ module Wand::GeneratedAttributeMethods
95
95
  sig { returns(Float) }
96
96
  def flexibility; end
97
97
 
98
- sig { params(value: Float).void }
98
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
99
99
  def flexibility=(value); end
100
100
 
101
101
  sig { returns(T::Boolean) }
@@ -113,7 +113,7 @@ module Wand::GeneratedAttributeMethods
113
113
  sig { returns(Integer) }
114
114
  def id; end
115
115
 
116
- sig { params(value: Integer).void }
116
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
117
117
  def id=(value); end
118
118
 
119
119
  sig { returns(T::Boolean) }
@@ -122,7 +122,7 @@ module Wand::GeneratedAttributeMethods
122
122
  sig { returns(Integer) }
123
123
  def reflectance; end
124
124
 
125
- sig { params(value: Integer).void }
125
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
126
126
  def reflectance=(value); end
127
127
 
128
128
  sig { returns(T::Boolean) }
@@ -140,7 +140,7 @@ module Wand::GeneratedAttributeMethods
140
140
  sig { returns(Integer) }
141
141
  def wizard_id; end
142
142
 
143
- sig { params(value: Integer).void }
143
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
144
144
  def wizard_id=(value); end
145
145
 
146
146
  sig { returns(T::Boolean) }
@@ -466,83 +466,6 @@ class Wand::ActiveRecord_Relation < ActiveRecord::Relation
466
466
 
467
467
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
468
468
  def extending(*args, &block); end
469
-
470
- sig { params(args: T.untyped).returns(Wand) }
471
- def find(*args); end
472
-
473
- sig { params(args: T.untyped).returns(T.nilable(Wand)) }
474
- def find_by(*args); end
475
-
476
- sig { params(args: T.untyped).returns(Wand) }
477
- def find_by!(*args); end
478
-
479
- sig { returns(T.nilable(Wand)) }
480
- def first; end
481
-
482
- sig { returns(Wand) }
483
- def first!; end
484
-
485
- sig { returns(T.nilable(Wand)) }
486
- def second; end
487
-
488
- sig { returns(Wand) }
489
- def second!; end
490
-
491
- sig { returns(T.nilable(Wand)) }
492
- def third; end
493
-
494
- sig { returns(Wand) }
495
- def third!; end
496
-
497
- sig { returns(T.nilable(Wand)) }
498
- def third_to_last; end
499
-
500
- sig { returns(Wand) }
501
- def third_to_last!; end
502
-
503
- sig { returns(T.nilable(Wand)) }
504
- def second_to_last; end
505
-
506
- sig { returns(Wand) }
507
- def second_to_last!; end
508
-
509
- sig { returns(T.nilable(Wand)) }
510
- def last; end
511
-
512
- sig { returns(Wand) }
513
- def last!; end
514
-
515
- sig { params(conditions: T.untyped).returns(T::Boolean) }
516
- def exists?(conditions = nil); end
517
-
518
- sig { params(args: T.untyped).returns(T::Boolean) }
519
- def any?(*args); end
520
-
521
- sig { params(args: T.untyped).returns(T::Boolean) }
522
- def many?(*args); end
523
-
524
- sig { params(args: T.untyped).returns(T::Boolean) }
525
- def none?(*args); end
526
-
527
- sig { params(args: T.untyped).returns(T::Boolean) }
528
- def one?(*args); end
529
-
530
- sig { override.params(block: T.proc.params(e: Wand).void).returns(T::Array[Wand]) }
531
- def each(&block); end
532
-
533
- sig { params(level: T.nilable(Integer)).returns(T::Array[Wand]) }
534
- def flatten(level); end
535
-
536
- sig { returns(T::Array[Wand]) }
537
- def to_a; end
538
-
539
- sig do
540
- type_parameters(:U).params(
541
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
542
- )
543
- .returns(T::Array[T.type_parameter(:U)])
544
- end
545
- def map(&blk); end
546
469
  end
547
470
 
548
471
  class Wand::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
@@ -155,7 +155,7 @@ module Wizard::GeneratedAttributeMethods
155
155
  sig { returns(T.nilable(Integer)) }
156
156
  def hair_length; end
157
157
 
158
- sig { params(value: T.nilable(Integer)).void }
158
+ sig { params(value: T.nilable(T.any(Integer, Float, ActiveSupport::Duration))).void }
159
159
  def hair_length=(value); end
160
160
 
161
161
  sig { returns(T::Boolean) }
@@ -173,7 +173,7 @@ module Wizard::GeneratedAttributeMethods
173
173
  sig { returns(Integer) }
174
174
  def id; end
175
175
 
176
- sig { params(value: Integer).void }
176
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
177
177
  def id=(value); end
178
178
 
179
179
  sig { returns(T::Boolean) }
@@ -215,6 +215,15 @@ module Wizard::GeneratedAttributeMethods
215
215
  sig { returns(T::Boolean) }
216
216
  def quidditch_position?; end
217
217
 
218
+ sig { returns(T.nilable(Integer)) }
219
+ def school_id; end
220
+
221
+ sig { params(value: T.nilable(T.any(Integer, Float, ActiveSupport::Duration))).void }
222
+ def school_id=(value); end
223
+
224
+ sig { returns(T::Boolean) }
225
+ def school_id?; end
226
+
218
227
  sig { returns(String) }
219
228
  def type; end
220
229
 
@@ -237,6 +246,12 @@ end
237
246
  module Wizard::GeneratedAssociationMethods
238
247
  extend T::Sig
239
248
 
249
+ sig { returns(T.nilable(::School)) }
250
+ def school; end
251
+
252
+ sig { params(value: T.nilable(::School)).void }
253
+ def school=(value); end
254
+
240
255
  sig { returns(::SpellBook::ActiveRecord_Associations_CollectionProxy) }
241
256
  def spell_books; end
242
257
 
@@ -646,83 +661,6 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
646
661
 
647
662
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
648
663
  def extending(*args, &block); end
649
-
650
- sig { params(args: T.untyped).returns(Wizard) }
651
- def find(*args); end
652
-
653
- sig { params(args: T.untyped).returns(T.nilable(Wizard)) }
654
- def find_by(*args); end
655
-
656
- sig { params(args: T.untyped).returns(Wizard) }
657
- def find_by!(*args); end
658
-
659
- sig { returns(T.nilable(Wizard)) }
660
- def first; end
661
-
662
- sig { returns(Wizard) }
663
- def first!; end
664
-
665
- sig { returns(T.nilable(Wizard)) }
666
- def second; end
667
-
668
- sig { returns(Wizard) }
669
- def second!; end
670
-
671
- sig { returns(T.nilable(Wizard)) }
672
- def third; end
673
-
674
- sig { returns(Wizard) }
675
- def third!; end
676
-
677
- sig { returns(T.nilable(Wizard)) }
678
- def third_to_last; end
679
-
680
- sig { returns(Wizard) }
681
- def third_to_last!; end
682
-
683
- sig { returns(T.nilable(Wizard)) }
684
- def second_to_last; end
685
-
686
- sig { returns(Wizard) }
687
- def second_to_last!; end
688
-
689
- sig { returns(T.nilable(Wizard)) }
690
- def last; end
691
-
692
- sig { returns(Wizard) }
693
- def last!; end
694
-
695
- sig { params(conditions: T.untyped).returns(T::Boolean) }
696
- def exists?(conditions = nil); end
697
-
698
- sig { params(args: T.untyped).returns(T::Boolean) }
699
- def any?(*args); end
700
-
701
- sig { params(args: T.untyped).returns(T::Boolean) }
702
- def many?(*args); end
703
-
704
- sig { params(args: T.untyped).returns(T::Boolean) }
705
- def none?(*args); end
706
-
707
- sig { params(args: T.untyped).returns(T::Boolean) }
708
- def one?(*args); end
709
-
710
- sig { override.params(block: T.proc.params(e: Wizard).void).returns(T::Array[Wizard]) }
711
- def each(&block); end
712
-
713
- sig { params(level: T.nilable(Integer)).returns(T::Array[Wizard]) }
714
- def flatten(level); end
715
-
716
- sig { returns(T::Array[Wizard]) }
717
- def to_a; end
718
-
719
- sig do
720
- type_parameters(:U).params(
721
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
722
- )
723
- .returns(T::Array[T.type_parameter(:U)])
724
- end
725
- def map(&blk); end
726
664
  end
727
665
 
728
666
  class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
@@ -155,7 +155,7 @@ module Wizard::GeneratedAttributeMethods
155
155
  sig { returns(T.nilable(Integer)) }
156
156
  def hair_length; end
157
157
 
158
- sig { params(value: T.nilable(Integer)).void }
158
+ sig { params(value: T.nilable(T.any(Integer, Float, ActiveSupport::Duration))).void }
159
159
  def hair_length=(value); end
160
160
 
161
161
  sig { returns(T::Boolean) }
@@ -173,7 +173,7 @@ module Wizard::GeneratedAttributeMethods
173
173
  sig { returns(Integer) }
174
174
  def id; end
175
175
 
176
- sig { params(value: Integer).void }
176
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
177
177
  def id=(value); end
178
178
 
179
179
  sig { returns(T::Boolean) }
@@ -215,6 +215,15 @@ module Wizard::GeneratedAttributeMethods
215
215
  sig { returns(T::Boolean) }
216
216
  def quidditch_position?; end
217
217
 
218
+ sig { returns(T.nilable(Integer)) }
219
+ def school_id; end
220
+
221
+ sig { params(value: T.nilable(T.any(Integer, Float, ActiveSupport::Duration))).void }
222
+ def school_id=(value); end
223
+
224
+ sig { returns(T::Boolean) }
225
+ def school_id?; end
226
+
218
227
  sig { returns(String) }
219
228
  def type; end
220
229
 
@@ -237,6 +246,12 @@ end
237
246
  module Wizard::GeneratedAssociationMethods
238
247
  extend T::Sig
239
248
 
249
+ sig { returns(T.nilable(T.untyped)) }
250
+ def school; end
251
+
252
+ sig { params(value: T.nilable(T.untyped)).void }
253
+ def school=(value); end
254
+
240
255
  sig { returns(ActiveRecord::Associations::CollectionProxy) }
241
256
  def spell_books; end
242
257
 
@@ -646,83 +661,6 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
646
661
 
647
662
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
648
663
  def extending(*args, &block); end
649
-
650
- sig { params(args: T.untyped).returns(Wizard) }
651
- def find(*args); end
652
-
653
- sig { params(args: T.untyped).returns(T.nilable(Wizard)) }
654
- def find_by(*args); end
655
-
656
- sig { params(args: T.untyped).returns(Wizard) }
657
- def find_by!(*args); end
658
-
659
- sig { returns(T.nilable(Wizard)) }
660
- def first; end
661
-
662
- sig { returns(Wizard) }
663
- def first!; end
664
-
665
- sig { returns(T.nilable(Wizard)) }
666
- def second; end
667
-
668
- sig { returns(Wizard) }
669
- def second!; end
670
-
671
- sig { returns(T.nilable(Wizard)) }
672
- def third; end
673
-
674
- sig { returns(Wizard) }
675
- def third!; end
676
-
677
- sig { returns(T.nilable(Wizard)) }
678
- def third_to_last; end
679
-
680
- sig { returns(Wizard) }
681
- def third_to_last!; end
682
-
683
- sig { returns(T.nilable(Wizard)) }
684
- def second_to_last; end
685
-
686
- sig { returns(Wizard) }
687
- def second_to_last!; end
688
-
689
- sig { returns(T.nilable(Wizard)) }
690
- def last; end
691
-
692
- sig { returns(Wizard) }
693
- def last!; end
694
-
695
- sig { params(conditions: T.untyped).returns(T::Boolean) }
696
- def exists?(conditions = nil); end
697
-
698
- sig { params(args: T.untyped).returns(T::Boolean) }
699
- def any?(*args); end
700
-
701
- sig { params(args: T.untyped).returns(T::Boolean) }
702
- def many?(*args); end
703
-
704
- sig { params(args: T.untyped).returns(T::Boolean) }
705
- def none?(*args); end
706
-
707
- sig { params(args: T.untyped).returns(T::Boolean) }
708
- def one?(*args); end
709
-
710
- sig { override.params(block: T.proc.params(e: Wizard).void).returns(T::Array[Wizard]) }
711
- def each(&block); end
712
-
713
- sig { params(level: T.nilable(Integer)).returns(T::Array[Wizard]) }
714
- def flatten(level); end
715
-
716
- sig { returns(T::Array[Wizard]) }
717
- def to_a; end
718
-
719
- sig do
720
- type_parameters(:U).params(
721
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
722
- )
723
- .returns(T::Array[T.type_parameter(:U)])
724
- end
725
- def map(&blk); end
726
664
  end
727
665
 
728
666
  class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
@@ -321,83 +321,6 @@ class ActiveRecord::InternalMetadata::ActiveRecord_Relation < ActiveRecord::Rela
321
321
 
322
322
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
323
323
  def extending(*args, &block); end
324
-
325
- sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata) }
326
- def find(*args); end
327
-
328
- sig { params(args: T.untyped).returns(T.nilable(ActiveRecord::InternalMetadata)) }
329
- def find_by(*args); end
330
-
331
- sig { params(args: T.untyped).returns(ActiveRecord::InternalMetadata) }
332
- def find_by!(*args); end
333
-
334
- sig { returns(T.nilable(ActiveRecord::InternalMetadata)) }
335
- def first; end
336
-
337
- sig { returns(ActiveRecord::InternalMetadata) }
338
- def first!; end
339
-
340
- sig { returns(T.nilable(ActiveRecord::InternalMetadata)) }
341
- def second; end
342
-
343
- sig { returns(ActiveRecord::InternalMetadata) }
344
- def second!; end
345
-
346
- sig { returns(T.nilable(ActiveRecord::InternalMetadata)) }
347
- def third; end
348
-
349
- sig { returns(ActiveRecord::InternalMetadata) }
350
- def third!; end
351
-
352
- sig { returns(T.nilable(ActiveRecord::InternalMetadata)) }
353
- def third_to_last; end
354
-
355
- sig { returns(ActiveRecord::InternalMetadata) }
356
- def third_to_last!; end
357
-
358
- sig { returns(T.nilable(ActiveRecord::InternalMetadata)) }
359
- def second_to_last; end
360
-
361
- sig { returns(ActiveRecord::InternalMetadata) }
362
- def second_to_last!; end
363
-
364
- sig { returns(T.nilable(ActiveRecord::InternalMetadata)) }
365
- def last; end
366
-
367
- sig { returns(ActiveRecord::InternalMetadata) }
368
- def last!; end
369
-
370
- sig { params(conditions: T.untyped).returns(T::Boolean) }
371
- def exists?(conditions = nil); end
372
-
373
- sig { params(args: T.untyped).returns(T::Boolean) }
374
- def any?(*args); end
375
-
376
- sig { params(args: T.untyped).returns(T::Boolean) }
377
- def many?(*args); end
378
-
379
- sig { params(args: T.untyped).returns(T::Boolean) }
380
- def none?(*args); end
381
-
382
- sig { params(args: T.untyped).returns(T::Boolean) }
383
- def one?(*args); end
384
-
385
- sig { override.params(block: T.proc.params(e: ActiveRecord::InternalMetadata).void).returns(T::Array[ActiveRecord::InternalMetadata]) }
386
- def each(&block); end
387
-
388
- sig { params(level: T.nilable(Integer)).returns(T::Array[ActiveRecord::InternalMetadata]) }
389
- def flatten(level); end
390
-
391
- sig { returns(T::Array[ActiveRecord::InternalMetadata]) }
392
- def to_a; end
393
-
394
- sig do
395
- type_parameters(:U).params(
396
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
397
- )
398
- .returns(T::Array[T.type_parameter(:U)])
399
- end
400
- def map(&blk); end
401
324
  end
402
325
 
403
326
  class ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation