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
@@ -8,8 +8,6 @@ module Spell::ActiveRelation_WhereNot
8
8
  end
9
9
 
10
10
  module Spell::GeneratedAttributeMethods
11
- extend T::Sig
12
-
13
11
  sig { returns(Integer) }
14
12
  def id; end
15
13
 
@@ -30,8 +28,6 @@ module Spell::GeneratedAttributeMethods
30
28
  end
31
29
 
32
30
  module Spell::GeneratedAssociationMethods
33
- extend T::Sig
34
-
35
31
  sig { returns(::SpellBook::ActiveRecord_Associations_CollectionProxy) }
36
32
  def spell_books; end
37
33
 
@@ -63,117 +59,11 @@ class Spell < ApplicationRecord
63
59
  include Spell::GeneratedAttributeMethods
64
60
  include Spell::GeneratedAssociationMethods
65
61
  extend Spell::CustomFinderMethods
66
- extend T::Sig
67
- extend T::Generic
62
+ extend Spell::QueryMethodsReturningRelation
68
63
  RelationType = T.type_alias { T.any(Spell::ActiveRecord_Relation, Spell::ActiveRecord_Associations_CollectionProxy, Spell::ActiveRecord_AssociationRelation) }
69
-
70
- sig { returns(Spell::ActiveRecord_Relation) }
71
- def self.all; end
72
-
73
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_Relation) }
74
- def self.unscoped(&block); end
75
-
76
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
77
- def self.select(*args); end
78
-
79
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
80
- def self.reselect(*args); end
81
-
82
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
83
- def self.order(*args); end
84
-
85
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
86
- def self.reorder(*args); end
87
-
88
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
89
- def self.group(*args); end
90
-
91
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
92
- def self.limit(*args); end
93
-
94
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
95
- def self.offset(*args); end
96
-
97
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
98
- def self.joins(*args); end
99
-
100
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
101
- def self.left_joins(*args); end
102
-
103
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
104
- def self.left_outer_joins(*args); end
105
-
106
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
107
- def self.where(*args); end
108
-
109
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
110
- def self.rewhere(*args); end
111
-
112
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
113
- def self.preload(*args); end
114
-
115
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
116
- def self.extract_associated(*args); end
117
-
118
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
119
- def self.eager_load(*args); end
120
-
121
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
122
- def self.includes(*args); end
123
-
124
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
125
- def self.from(*args); end
126
-
127
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
128
- def self.lock(*args); end
129
-
130
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
131
- def self.readonly(*args); end
132
-
133
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
134
- def self.or(*args); end
135
-
136
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
137
- def self.having(*args); end
138
-
139
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
140
- def self.create_with(*args); end
141
-
142
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
143
- def self.distinct(*args); end
144
-
145
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
146
- def self.references(*args); end
147
-
148
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
149
- def self.none(*args); end
150
-
151
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
152
- def self.unscope(*args); end
153
-
154
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
155
- def self.optimizer_hints(*args); end
156
-
157
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
158
- def self.merge(*args); end
159
-
160
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
161
- def self.except(*args); end
162
-
163
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
164
- def self.only(*args); end
165
-
166
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_Relation) }
167
- def self.extending(*args, &block); end
168
64
  end
169
65
 
170
- class Spell::ActiveRecord_Relation < ActiveRecord::Relation
171
- include Spell::ActiveRelation_WhereNot
172
- include Spell::CustomFinderMethods
173
- extend T::Sig
174
- extend T::Generic
175
- Elem = type_member(fixed: Spell)
176
-
66
+ module Spell::QueryMethodsReturningRelation
177
67
  sig { returns(Spell::ActiveRecord_Relation) }
178
68
  def all; end
179
69
 
@@ -274,17 +164,11 @@ class Spell::ActiveRecord_Relation < ActiveRecord::Relation
274
164
  def extending(*args, &block); end
275
165
  end
276
166
 
277
- class Spell::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
278
- include Spell::ActiveRelation_WhereNot
279
- include Spell::CustomFinderMethods
280
- extend T::Sig
281
- extend T::Generic
282
- Elem = type_member(fixed: Spell)
283
-
167
+ module Spell::QueryMethodsReturningAssociationRelation
284
168
  sig { returns(Spell::ActiveRecord_AssociationRelation) }
285
169
  def all; end
286
170
 
287
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_AssociationRelation) }
171
+ sig { params(block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_Relation) }
288
172
  def unscoped(&block); end
289
173
 
290
174
  sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
@@ -381,110 +265,24 @@ class Spell::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelatio
381
265
  def extending(*args, &block); end
382
266
  end
383
267
 
384
- class Spell::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
268
+ class Spell::ActiveRecord_Relation < ActiveRecord::Relation
269
+ include Spell::ActiveRelation_WhereNot
385
270
  include Spell::CustomFinderMethods
386
- extend T::Sig
387
- extend T::Generic
271
+ include Spell::QueryMethodsReturningRelation
388
272
  Elem = type_member(fixed: Spell)
273
+ end
389
274
 
390
- sig { returns(Spell::ActiveRecord_AssociationRelation) }
391
- def all; end
392
-
393
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_AssociationRelation) }
394
- def unscoped(&block); end
395
-
396
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
397
- def select(*args); end
398
-
399
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
400
- def reselect(*args); end
401
-
402
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
403
- def order(*args); end
404
-
405
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
406
- def reorder(*args); end
407
-
408
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
409
- def group(*args); end
410
-
411
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
412
- def limit(*args); end
413
-
414
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
415
- def offset(*args); end
416
-
417
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
418
- def joins(*args); end
419
-
420
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
421
- def left_joins(*args); end
422
-
423
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
424
- def left_outer_joins(*args); end
425
-
426
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
427
- def where(*args); end
428
-
429
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
430
- def rewhere(*args); end
431
-
432
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
433
- def preload(*args); end
434
-
435
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
436
- def extract_associated(*args); end
437
-
438
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
439
- def eager_load(*args); end
440
-
441
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
442
- def includes(*args); end
443
-
444
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
445
- def from(*args); end
446
-
447
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
448
- def lock(*args); end
449
-
450
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
451
- def readonly(*args); end
452
-
453
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
454
- def or(*args); end
455
-
456
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
457
- def having(*args); end
458
-
459
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
460
- def create_with(*args); end
461
-
462
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
463
- def distinct(*args); end
464
-
465
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
466
- def references(*args); end
467
-
468
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
469
- def none(*args); end
470
-
471
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
472
- def unscope(*args); end
473
-
474
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
475
- def optimizer_hints(*args); end
476
-
477
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
478
- def merge(*args); end
479
-
480
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
481
- def except(*args); end
482
-
483
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
484
- def only(*args); end
275
+ class Spell::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
276
+ include Spell::ActiveRelation_WhereNot
277
+ include Spell::CustomFinderMethods
278
+ include Spell::QueryMethodsReturningAssociationRelation
279
+ Elem = type_member(fixed: Spell)
280
+ end
485
281
 
486
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_AssociationRelation) }
487
- def extending(*args, &block); end
282
+ class Spell::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
283
+ include Spell::CustomFinderMethods
284
+ include Spell::QueryMethodsReturningAssociationRelation
285
+ Elem = type_member(fixed: Spell)
488
286
 
489
287
  sig { params(records: T.any(Spell, T::Array[Spell])).returns(T.self_type) }
490
288
  def <<(*records); end
@@ -8,8 +8,6 @@ module Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
8
8
  end
9
9
 
10
10
  module Spell::HABTM_SpellBooks::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 Spell::HABTM_SpellBooks::GeneratedAttributeMethods
30
28
  end
31
29
 
32
30
  module Spell::HABTM_SpellBooks::GeneratedAssociationMethods
33
- extend T::Sig
34
-
35
31
  sig { returns(T.nilable(::Spell)) }
36
32
  def left_side; end
37
33
 
@@ -66,117 +62,11 @@ class Spell::HABTM_SpellBooks < ActiveRecord::Base
66
62
  include Spell::HABTM_SpellBooks::GeneratedAttributeMethods
67
63
  include Spell::HABTM_SpellBooks::GeneratedAssociationMethods
68
64
  extend Spell::HABTM_SpellBooks::CustomFinderMethods
69
- extend T::Sig
70
- extend T::Generic
65
+ extend Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
71
66
  RelationType = T.type_alias { T.any(Spell::HABTM_SpellBooks::ActiveRecord_Relation, Spell::HABTM_SpellBooks::ActiveRecord_Associations_CollectionProxy, Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
72
-
73
- sig { returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
74
- def self.all; end
75
-
76
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
77
- def self.unscoped(&block); end
78
-
79
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
80
- def self.select(*args); end
81
-
82
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
83
- def self.reselect(*args); end
84
-
85
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
86
- def self.order(*args); end
87
-
88
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
89
- def self.reorder(*args); end
90
-
91
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
92
- def self.group(*args); end
93
-
94
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
95
- def self.limit(*args); end
96
-
97
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
98
- def self.offset(*args); end
99
-
100
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
101
- def self.joins(*args); end
102
-
103
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
104
- def self.left_joins(*args); end
105
-
106
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
107
- def self.left_outer_joins(*args); end
108
-
109
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
110
- def self.where(*args); end
111
-
112
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
113
- def self.rewhere(*args); end
114
-
115
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
116
- def self.preload(*args); end
117
-
118
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
119
- def self.extract_associated(*args); end
120
-
121
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
122
- def self.eager_load(*args); end
123
-
124
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
125
- def self.includes(*args); end
126
-
127
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
128
- def self.from(*args); end
129
-
130
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
131
- def self.lock(*args); end
132
-
133
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
134
- def self.readonly(*args); end
135
-
136
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
137
- def self.or(*args); end
138
-
139
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
140
- def self.having(*args); end
141
-
142
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
143
- def self.create_with(*args); end
144
-
145
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
146
- def self.distinct(*args); end
147
-
148
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
149
- def self.references(*args); end
150
-
151
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
152
- def self.none(*args); end
153
-
154
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
155
- def self.unscope(*args); end
156
-
157
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
158
- def self.optimizer_hints(*args); end
159
-
160
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
161
- def self.merge(*args); end
162
-
163
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
164
- def self.except(*args); end
165
-
166
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
167
- def self.only(*args); end
168
-
169
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
170
- def self.extending(*args, &block); end
171
67
  end
172
68
 
173
- class Spell::HABTM_SpellBooks::ActiveRecord_Relation < ActiveRecord::Relation
174
- include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
175
- include Spell::HABTM_SpellBooks::CustomFinderMethods
176
- extend T::Sig
177
- extend T::Generic
178
- Elem = type_member(fixed: Spell::HABTM_SpellBooks)
179
-
69
+ module Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
180
70
  sig { returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
181
71
  def all; end
182
72
 
@@ -277,17 +167,11 @@ class Spell::HABTM_SpellBooks::ActiveRecord_Relation < ActiveRecord::Relation
277
167
  def extending(*args, &block); end
278
168
  end
279
169
 
280
- class Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
281
- include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
282
- include Spell::HABTM_SpellBooks::CustomFinderMethods
283
- extend T::Sig
284
- extend T::Generic
285
- Elem = type_member(fixed: Spell::HABTM_SpellBooks)
286
-
170
+ module Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
287
171
  sig { returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
288
172
  def all; end
289
173
 
290
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
174
+ sig { params(block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
291
175
  def unscoped(&block); end
292
176
 
293
177
  sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
@@ -384,110 +268,24 @@ class Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation < ActiveRecord::
384
268
  def extending(*args, &block); end
385
269
  end
386
270
 
387
- class Spell::HABTM_SpellBooks::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
271
+ class Spell::HABTM_SpellBooks::ActiveRecord_Relation < ActiveRecord::Relation
272
+ include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
388
273
  include Spell::HABTM_SpellBooks::CustomFinderMethods
389
- extend T::Sig
390
- extend T::Generic
274
+ include Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
391
275
  Elem = type_member(fixed: Spell::HABTM_SpellBooks)
276
+ end
392
277
 
393
- sig { returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
394
- def all; end
395
-
396
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
397
- def unscoped(&block); end
398
-
399
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
400
- def select(*args); end
401
-
402
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
403
- def reselect(*args); end
404
-
405
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
406
- def order(*args); end
407
-
408
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
409
- def reorder(*args); end
410
-
411
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
412
- def group(*args); end
413
-
414
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
415
- def limit(*args); end
416
-
417
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
418
- def offset(*args); end
419
-
420
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
421
- def joins(*args); end
422
-
423
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
424
- def left_joins(*args); end
425
-
426
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
427
- def left_outer_joins(*args); end
428
-
429
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
430
- def where(*args); end
431
-
432
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
433
- def rewhere(*args); end
434
-
435
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
436
- def preload(*args); end
437
-
438
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
439
- def extract_associated(*args); end
440
-
441
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
442
- def eager_load(*args); end
443
-
444
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
445
- def includes(*args); end
446
-
447
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
448
- def from(*args); end
449
-
450
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
451
- def lock(*args); end
452
-
453
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
454
- def readonly(*args); end
455
-
456
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
457
- def or(*args); end
458
-
459
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
460
- def having(*args); end
461
-
462
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
463
- def create_with(*args); end
464
-
465
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
466
- def distinct(*args); end
467
-
468
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
469
- def references(*args); end
470
-
471
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
472
- def none(*args); end
473
-
474
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
475
- def unscope(*args); end
476
-
477
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
478
- def optimizer_hints(*args); end
479
-
480
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
481
- def merge(*args); end
482
-
483
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
484
- def except(*args); end
485
-
486
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
487
- def only(*args); end
278
+ class Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
279
+ include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
280
+ include Spell::HABTM_SpellBooks::CustomFinderMethods
281
+ include Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
282
+ Elem = type_member(fixed: Spell::HABTM_SpellBooks)
283
+ end
488
284
 
489
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
490
- def extending(*args, &block); end
285
+ class Spell::HABTM_SpellBooks::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
286
+ include Spell::HABTM_SpellBooks::CustomFinderMethods
287
+ include Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
288
+ Elem = type_member(fixed: Spell::HABTM_SpellBooks)
491
289
 
492
290
  sig { params(records: T.any(Spell::HABTM_SpellBooks, T::Array[Spell::HABTM_SpellBooks])).returns(T.self_type) }
493
291
  def <<(*records); end