sorbet-rails 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
  4. data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
  5. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +9 -2
  6. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +0 -1
  7. data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
  8. data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
  9. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +5 -1
  10. data/lib/sorbet-rails/model_plugins/base.rb +2 -1
  11. data/lib/sorbet-rails/model_rbi_formatter.rb +4 -8
  12. data/lib/sorbet-rails/model_utils.rb +68 -30
  13. data/lib/sorbet-rails/tasks/rails_rbi.rake +13 -21
  14. data/sorbet-rails.gemspec +1 -1
  15. data/spec/generators/rails-template.rb +3 -6
  16. data/spec/generators/sorbet_test_cases.rb +41 -26
  17. data/spec/support/v5.0/Gemfile.lock +2 -2
  18. data/spec/support/v5.0/app/models/spell_book.rb +2 -0
  19. data/spec/support/v5.0/app/models/wizard.rb +1 -1
  20. data/spec/support/v5.0/sorbet_test_cases.rb +41 -26
  21. data/spec/support/v5.1/Gemfile.lock +2 -2
  22. data/spec/support/v5.1/app/models/spell_book.rb +2 -0
  23. data/spec/support/v5.1/app/models/wizard.rb +1 -1
  24. data/spec/support/v5.1/sorbet_test_cases.rb +41 -26
  25. data/spec/support/v5.2/Gemfile.lock +2 -2
  26. data/spec/support/v5.2/app/models/spell_book.rb +2 -0
  27. data/spec/support/v5.2/app/models/wizard.rb +1 -1
  28. data/spec/support/v5.2/sorbet_test_cases.rb +41 -26
  29. data/spec/support/v6.0/Gemfile.lock +2 -2
  30. data/spec/support/v6.0/app/models/spell_book.rb +2 -0
  31. data/spec/support/v6.0/app/models/wizard.rb +1 -1
  32. data/spec/support/v6.0/sorbet_test_cases.rb +41 -26
  33. data/spec/test_data/v5.0/expected_headmaster.rbi +18 -190
  34. data/spec/test_data/v5.0/expected_internal_metadata.rbi +18 -188
  35. data/spec/test_data/v5.0/expected_potion.rbi +18 -188
  36. data/spec/test_data/v5.0/expected_robe.rbi +18 -190
  37. data/spec/test_data/v5.0/expected_schema_migration.rbi +18 -188
  38. data/spec/test_data/v5.0/expected_school.rbi +18 -190
  39. data/spec/test_data/v5.0/expected_spell.rbi +18 -190
  40. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +18 -190
  41. data/spec/test_data/v5.0/expected_spell_book.rbi +55 -217
  42. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +18 -190
  43. data/spec/test_data/v5.0/expected_squib.rbi +90 -264
  44. data/spec/test_data/v5.0/expected_subject.rbi +18 -190
  45. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +18 -190
  46. data/spec/test_data/v5.0/expected_wand.rbi +53 -227
  47. data/spec/test_data/v5.0/expected_wizard.rbi +90 -264
  48. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +18 -190
  49. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +90 -264
  50. data/spec/test_data/v5.1/expected_headmaster.rbi +18 -196
  51. data/spec/test_data/v5.1/expected_internal_metadata.rbi +18 -194
  52. data/spec/test_data/v5.1/expected_potion.rbi +18 -194
  53. data/spec/test_data/v5.1/expected_robe.rbi +18 -196
  54. data/spec/test_data/v5.1/expected_schema_migration.rbi +18 -194
  55. data/spec/test_data/v5.1/expected_school.rbi +18 -196
  56. data/spec/test_data/v5.1/expected_spell.rbi +18 -196
  57. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +18 -196
  58. data/spec/test_data/v5.1/expected_spell_book.rbi +55 -223
  59. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +18 -196
  60. data/spec/test_data/v5.1/expected_squib.rbi +91 -271
  61. data/spec/test_data/v5.1/expected_subject.rbi +18 -196
  62. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +18 -196
  63. data/spec/test_data/v5.1/expected_wand.rbi +53 -233
  64. data/spec/test_data/v5.1/expected_wizard.rbi +91 -271
  65. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +18 -196
  66. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +91 -271
  67. data/spec/test_data/v5.2/expected_attachment.rbi +18 -194
  68. data/spec/test_data/v5.2/expected_blob.rbi +39 -215
  69. data/spec/test_data/v5.2/expected_headmaster.rbi +18 -196
  70. data/spec/test_data/v5.2/expected_internal_metadata.rbi +18 -194
  71. data/spec/test_data/v5.2/expected_potion.rbi +18 -194
  72. data/spec/test_data/v5.2/expected_robe.rbi +18 -196
  73. data/spec/test_data/v5.2/expected_schema_migration.rbi +18 -194
  74. data/spec/test_data/v5.2/expected_school.rbi +18 -196
  75. data/spec/test_data/v5.2/expected_spell.rbi +18 -196
  76. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +18 -196
  77. data/spec/test_data/v5.2/expected_spell_book.rbi +55 -223
  78. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +18 -196
  79. data/spec/test_data/v5.2/expected_squib.rbi +95 -275
  80. data/spec/test_data/v5.2/expected_subject.rbi +18 -196
  81. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +18 -196
  82. data/spec/test_data/v5.2/expected_wand.rbi +53 -233
  83. data/spec/test_data/v5.2/expected_wizard.rbi +95 -275
  84. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +18 -196
  85. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +95 -275
  86. data/spec/test_data/v6.0/expected_attachment.rbi +18 -218
  87. data/spec/test_data/v6.0/expected_blob.rbi +31 -243
  88. data/spec/test_data/v6.0/expected_headmaster.rbi +18 -220
  89. data/spec/test_data/v6.0/expected_internal_metadata.rbi +18 -218
  90. data/spec/test_data/v6.0/expected_potion.rbi +18 -218
  91. data/spec/test_data/v6.0/expected_robe.rbi +18 -220
  92. data/spec/test_data/v6.0/expected_schema_migration.rbi +18 -218
  93. data/spec/test_data/v6.0/expected_school.rbi +18 -220
  94. data/spec/test_data/v6.0/expected_spell.rbi +18 -220
  95. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +18 -220
  96. data/spec/test_data/v6.0/expected_spell_book.rbi +24 -258
  97. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +18 -220
  98. data/spec/test_data/v6.0/expected_squib.rbi +31 -457
  99. data/spec/test_data/v6.0/expected_subject.rbi +18 -220
  100. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +18 -220
  101. data/spec/test_data/v6.0/expected_wand.rbi +18 -270
  102. data/spec/test_data/v6.0/expected_wizard.rbi +31 -457
  103. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +18 -220
  104. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +31 -457
  105. metadata +1 -1
@@ -3,8 +3,6 @@
3
3
 
4
4
  # typed: strong
5
5
  module SpellBook::EnumInstanceMethods
6
- extend T::Sig
7
-
8
6
  sig { returns(T::Boolean) }
9
7
  def unclassified?; end
10
8
 
@@ -30,8 +28,6 @@ module SpellBook::ActiveRelation_WhereNot
30
28
  end
31
29
 
32
30
  module SpellBook::GeneratedAttributeMethods
33
- extend T::Sig
34
-
35
31
  sig { returns(String) }
36
32
  def book_type; end
37
33
 
@@ -79,8 +75,6 @@ class SpellBook::BookType < T::Enum
79
75
  end
80
76
 
81
77
  module SpellBook::GeneratedAssociationMethods
82
- extend T::Sig
83
-
84
78
  sig { returns(::Spell::ActiveRecord_Associations_CollectionProxy) }
85
79
  def spells; end
86
80
 
@@ -119,130 +113,12 @@ class SpellBook < ApplicationRecord
119
113
  include SpellBook::GeneratedAttributeMethods
120
114
  include SpellBook::GeneratedAssociationMethods
121
115
  extend SpellBook::CustomFinderMethods
122
- extend T::Sig
123
- extend T::Generic
116
+ extend SpellBook::QueryMethodsReturningRelation
124
117
  RelationType = T.type_alias { T.any(SpellBook::ActiveRecord_Relation, SpellBook::ActiveRecord_Associations_CollectionProxy, SpellBook::ActiveRecord_AssociationRelation) }
125
118
 
126
119
  sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
127
120
  def self.book_types; end
128
121
 
129
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
130
- def self.biology(*args); end
131
-
132
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
133
- def self.dark_art(*args); end
134
-
135
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
136
- def self.not_biology(*args); end
137
-
138
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
139
- def self.not_dark_art(*args); end
140
-
141
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
142
- def self.not_unclassified(*args); end
143
-
144
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
145
- def self.unclassified(*args); end
146
-
147
- sig { returns(SpellBook::ActiveRecord_Relation) }
148
- def self.all; end
149
-
150
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
151
- def self.unscoped(&block); end
152
-
153
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
154
- def self.select(*args); end
155
-
156
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
157
- def self.reselect(*args); end
158
-
159
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
160
- def self.order(*args); end
161
-
162
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
163
- def self.reorder(*args); end
164
-
165
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
166
- def self.group(*args); end
167
-
168
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
169
- def self.limit(*args); end
170
-
171
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
172
- def self.offset(*args); end
173
-
174
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
175
- def self.joins(*args); end
176
-
177
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
178
- def self.left_joins(*args); end
179
-
180
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
181
- def self.left_outer_joins(*args); end
182
-
183
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
184
- def self.where(*args); end
185
-
186
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
187
- def self.rewhere(*args); end
188
-
189
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
190
- def self.preload(*args); end
191
-
192
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
193
- def self.extract_associated(*args); end
194
-
195
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
196
- def self.eager_load(*args); end
197
-
198
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
199
- def self.includes(*args); end
200
-
201
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
202
- def self.from(*args); end
203
-
204
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
205
- def self.lock(*args); end
206
-
207
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
208
- def self.readonly(*args); end
209
-
210
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
211
- def self.or(*args); end
212
-
213
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
214
- def self.having(*args); end
215
-
216
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
217
- def self.create_with(*args); end
218
-
219
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
220
- def self.distinct(*args); end
221
-
222
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
223
- def self.references(*args); end
224
-
225
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
226
- def self.none(*args); end
227
-
228
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
229
- def self.unscope(*args); end
230
-
231
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
232
- def self.optimizer_hints(*args); end
233
-
234
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
235
- def self.merge(*args); end
236
-
237
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
238
- def self.except(*args); end
239
-
240
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
241
- def self.only(*args); end
242
-
243
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
244
- def self.extending(*args, &block); end
245
-
246
122
  sig { returns(SpellBook::BookType) }
247
123
  def typed_book_type; end
248
124
 
@@ -250,13 +126,7 @@ class SpellBook < ApplicationRecord
250
126
  def typed_book_type=(value); end
251
127
  end
252
128
 
253
- class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
254
- include SpellBook::ActiveRelation_WhereNot
255
- include SpellBook::CustomFinderMethods
256
- extend T::Sig
257
- extend T::Generic
258
- Elem = type_member(fixed: SpellBook)
259
-
129
+ module SpellBook::QueryMethodsReturningRelation
260
130
  sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
261
131
  def biology(*args); end
262
132
 
@@ -272,6 +142,9 @@ class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
272
142
  sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
273
143
  def not_unclassified(*args); end
274
144
 
145
+ sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
146
+ def recent(*args); end
147
+
275
148
  sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
276
149
  def unclassified(*args); end
277
150
 
@@ -375,13 +248,7 @@ class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
375
248
  def extending(*args, &block); end
376
249
  end
377
250
 
378
- class SpellBook::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
379
- include SpellBook::ActiveRelation_WhereNot
380
- include SpellBook::CustomFinderMethods
381
- extend T::Sig
382
- extend T::Generic
383
- Elem = type_member(fixed: SpellBook)
384
-
251
+ module SpellBook::QueryMethodsReturningAssociationRelation
385
252
  sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
386
253
  def biology(*args); end
387
254
 
@@ -397,13 +264,16 @@ class SpellBook::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRel
397
264
  sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
398
265
  def not_unclassified(*args); end
399
266
 
267
+ sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
268
+ def recent(*args); end
269
+
400
270
  sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
401
271
  def unclassified(*args); end
402
272
 
403
273
  sig { returns(SpellBook::ActiveRecord_AssociationRelation) }
404
274
  def all; end
405
275
 
406
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
276
+ sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
407
277
  def unscoped(&block); end
408
278
 
409
279
  sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
@@ -500,128 +370,24 @@ class SpellBook::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRel
500
370
  def extending(*args, &block); end
501
371
  end
502
372
 
503
- class SpellBook::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
373
+ class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
374
+ include SpellBook::ActiveRelation_WhereNot
504
375
  include SpellBook::CustomFinderMethods
505
- extend T::Sig
506
- extend T::Generic
376
+ include SpellBook::QueryMethodsReturningRelation
507
377
  Elem = type_member(fixed: SpellBook)
378
+ end
508
379
 
509
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
510
- def biology(*args); end
511
-
512
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
513
- def dark_art(*args); end
514
-
515
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
516
- def not_biology(*args); end
517
-
518
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
519
- def not_dark_art(*args); end
520
-
521
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
522
- def not_unclassified(*args); end
523
-
524
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
525
- def unclassified(*args); end
526
-
527
- sig { returns(SpellBook::ActiveRecord_AssociationRelation) }
528
- def all; end
529
-
530
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
531
- def unscoped(&block); end
532
-
533
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
534
- def select(*args); end
535
-
536
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
537
- def reselect(*args); end
538
-
539
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
540
- def order(*args); end
541
-
542
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
543
- def reorder(*args); end
544
-
545
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
546
- def group(*args); end
547
-
548
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
549
- def limit(*args); end
550
-
551
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
552
- def offset(*args); end
553
-
554
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
555
- def joins(*args); end
556
-
557
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
558
- def left_joins(*args); end
559
-
560
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
561
- def left_outer_joins(*args); end
562
-
563
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
564
- def where(*args); end
565
-
566
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
567
- def rewhere(*args); end
568
-
569
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
570
- def preload(*args); end
571
-
572
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
573
- def extract_associated(*args); end
574
-
575
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
576
- def eager_load(*args); end
577
-
578
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
579
- def includes(*args); end
580
-
581
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
582
- def from(*args); end
583
-
584
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
585
- def lock(*args); end
586
-
587
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
588
- def readonly(*args); end
589
-
590
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
591
- def or(*args); end
592
-
593
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
594
- def having(*args); end
595
-
596
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
597
- def create_with(*args); end
598
-
599
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
600
- def distinct(*args); end
601
-
602
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
603
- def references(*args); end
604
-
605
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
606
- def none(*args); end
607
-
608
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
609
- def unscope(*args); end
610
-
611
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
612
- def optimizer_hints(*args); end
613
-
614
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
615
- def merge(*args); end
616
-
617
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
618
- def except(*args); end
619
-
620
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
621
- def only(*args); end
380
+ class SpellBook::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
381
+ include SpellBook::ActiveRelation_WhereNot
382
+ include SpellBook::CustomFinderMethods
383
+ include SpellBook::QueryMethodsReturningAssociationRelation
384
+ Elem = type_member(fixed: SpellBook)
385
+ end
622
386
 
623
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
624
- def extending(*args, &block); end
387
+ class SpellBook::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
388
+ include SpellBook::CustomFinderMethods
389
+ include SpellBook::QueryMethodsReturningAssociationRelation
390
+ Elem = type_member(fixed: SpellBook)
625
391
 
626
392
  sig { params(records: T.any(SpellBook, T::Array[SpellBook])).returns(T.self_type) }
627
393
  def <<(*records); end
@@ -8,8 +8,6 @@ module SpellBook::HABTM_Spells::ActiveRelation_WhereNot
8
8
  end
9
9
 
10
10
  module SpellBook::HABTM_Spells::GeneratedAttributeMethods
11
- extend T::Sig
12
-
13
11
  sig { returns(Integer) }
14
12
  def spell_book_id; end
15
13
 
@@ -30,8 +28,6 @@ module SpellBook::HABTM_Spells::GeneratedAttributeMethods
30
28
  end
31
29
 
32
30
  module SpellBook::HABTM_Spells::GeneratedAssociationMethods
33
- extend T::Sig
34
-
35
31
  sig { returns(T.nilable(::SpellBook)) }
36
32
  def left_side; end
37
33
 
@@ -66,117 +62,11 @@ class SpellBook::HABTM_Spells < ActiveRecord::Base
66
62
  include SpellBook::HABTM_Spells::GeneratedAttributeMethods
67
63
  include SpellBook::HABTM_Spells::GeneratedAssociationMethods
68
64
  extend SpellBook::HABTM_Spells::CustomFinderMethods
69
- extend T::Sig
70
- extend T::Generic
65
+ extend SpellBook::HABTM_Spells::QueryMethodsReturningRelation
71
66
  RelationType = T.type_alias { T.any(SpellBook::HABTM_Spells::ActiveRecord_Relation, SpellBook::HABTM_Spells::ActiveRecord_Associations_CollectionProxy, SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
72
-
73
- sig { returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
74
- def self.all; end
75
-
76
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
77
- def self.unscoped(&block); end
78
-
79
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
80
- def self.select(*args); end
81
-
82
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
83
- def self.reselect(*args); end
84
-
85
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
86
- def self.order(*args); end
87
-
88
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
89
- def self.reorder(*args); end
90
-
91
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
92
- def self.group(*args); end
93
-
94
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
95
- def self.limit(*args); end
96
-
97
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
98
- def self.offset(*args); end
99
-
100
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
101
- def self.joins(*args); end
102
-
103
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
104
- def self.left_joins(*args); end
105
-
106
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
107
- def self.left_outer_joins(*args); end
108
-
109
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
110
- def self.where(*args); end
111
-
112
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
113
- def self.rewhere(*args); end
114
-
115
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
116
- def self.preload(*args); end
117
-
118
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
119
- def self.extract_associated(*args); end
120
-
121
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
122
- def self.eager_load(*args); end
123
-
124
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
125
- def self.includes(*args); end
126
-
127
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
128
- def self.from(*args); end
129
-
130
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
131
- def self.lock(*args); end
132
-
133
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
134
- def self.readonly(*args); end
135
-
136
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
137
- def self.or(*args); end
138
-
139
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
140
- def self.having(*args); end
141
-
142
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
143
- def self.create_with(*args); end
144
-
145
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
146
- def self.distinct(*args); end
147
-
148
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
149
- def self.references(*args); end
150
-
151
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
152
- def self.none(*args); end
153
-
154
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
155
- def self.unscope(*args); end
156
-
157
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
158
- def self.optimizer_hints(*args); end
159
-
160
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
161
- def self.merge(*args); end
162
-
163
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
164
- def self.except(*args); end
165
-
166
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
167
- def self.only(*args); end
168
-
169
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
170
- def self.extending(*args, &block); end
171
67
  end
172
68
 
173
- class SpellBook::HABTM_Spells::ActiveRecord_Relation < ActiveRecord::Relation
174
- include SpellBook::HABTM_Spells::ActiveRelation_WhereNot
175
- include SpellBook::HABTM_Spells::CustomFinderMethods
176
- extend T::Sig
177
- extend T::Generic
178
- Elem = type_member(fixed: SpellBook::HABTM_Spells)
179
-
69
+ module SpellBook::HABTM_Spells::QueryMethodsReturningRelation
180
70
  sig { returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
181
71
  def all; end
182
72
 
@@ -277,17 +167,11 @@ class SpellBook::HABTM_Spells::ActiveRecord_Relation < ActiveRecord::Relation
277
167
  def extending(*args, &block); end
278
168
  end
279
169
 
280
- class SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
281
- include SpellBook::HABTM_Spells::ActiveRelation_WhereNot
282
- include SpellBook::HABTM_Spells::CustomFinderMethods
283
- extend T::Sig
284
- extend T::Generic
285
- Elem = type_member(fixed: SpellBook::HABTM_Spells)
286
-
170
+ module SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
287
171
  sig { returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
288
172
  def all; end
289
173
 
290
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
174
+ sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
291
175
  def unscoped(&block); end
292
176
 
293
177
  sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
@@ -384,110 +268,24 @@ class SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation < ActiveRecord::
384
268
  def extending(*args, &block); end
385
269
  end
386
270
 
387
- class SpellBook::HABTM_Spells::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
271
+ class SpellBook::HABTM_Spells::ActiveRecord_Relation < ActiveRecord::Relation
272
+ include SpellBook::HABTM_Spells::ActiveRelation_WhereNot
388
273
  include SpellBook::HABTM_Spells::CustomFinderMethods
389
- extend T::Sig
390
- extend T::Generic
274
+ include SpellBook::HABTM_Spells::QueryMethodsReturningRelation
391
275
  Elem = type_member(fixed: SpellBook::HABTM_Spells)
276
+ end
392
277
 
393
- sig { returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
394
- def all; end
395
-
396
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
397
- def unscoped(&block); end
398
-
399
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
400
- def select(*args); end
401
-
402
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
403
- def reselect(*args); end
404
-
405
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
406
- def order(*args); end
407
-
408
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
409
- def reorder(*args); end
410
-
411
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
412
- def group(*args); end
413
-
414
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
415
- def limit(*args); end
416
-
417
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
418
- def offset(*args); end
419
-
420
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
421
- def joins(*args); end
422
-
423
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
424
- def left_joins(*args); end
425
-
426
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
427
- def left_outer_joins(*args); end
428
-
429
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
430
- def where(*args); end
431
-
432
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
433
- def rewhere(*args); end
434
-
435
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
436
- def preload(*args); end
437
-
438
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
439
- def extract_associated(*args); end
440
-
441
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
442
- def eager_load(*args); end
443
-
444
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
445
- def includes(*args); end
446
-
447
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
448
- def from(*args); end
449
-
450
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
451
- def lock(*args); end
452
-
453
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
454
- def readonly(*args); end
455
-
456
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
457
- def or(*args); end
458
-
459
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
460
- def having(*args); end
461
-
462
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
463
- def create_with(*args); end
464
-
465
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
466
- def distinct(*args); end
467
-
468
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
469
- def references(*args); end
470
-
471
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
472
- def none(*args); end
473
-
474
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
475
- def unscope(*args); end
476
-
477
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
478
- def optimizer_hints(*args); end
479
-
480
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
481
- def merge(*args); end
482
-
483
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
484
- def except(*args); end
485
-
486
- sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
487
- def only(*args); end
278
+ class SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
279
+ include SpellBook::HABTM_Spells::ActiveRelation_WhereNot
280
+ include SpellBook::HABTM_Spells::CustomFinderMethods
281
+ include SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
282
+ Elem = type_member(fixed: SpellBook::HABTM_Spells)
283
+ end
488
284
 
489
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
490
- def extending(*args, &block); end
285
+ class SpellBook::HABTM_Spells::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
286
+ include SpellBook::HABTM_Spells::CustomFinderMethods
287
+ include SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
288
+ Elem = type_member(fixed: SpellBook::HABTM_Spells)
491
289
 
492
290
  sig { params(records: T.any(SpellBook::HABTM_Spells, T::Array[SpellBook::HABTM_Spells])).returns(T.self_type) }
493
291
  def <<(*records); end