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,105 +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.order(*args); end
81
-
82
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
83
- def self.reorder(*args); end
84
-
85
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
86
- def self.group(*args); end
87
-
88
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
89
- def self.limit(*args); end
90
-
91
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
92
- def self.offset(*args); end
93
-
94
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
95
- def self.joins(*args); end
96
-
97
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
98
- def self.left_joins(*args); end
99
-
100
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
101
- def self.left_outer_joins(*args); end
102
-
103
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
104
- def self.where(*args); end
105
-
106
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
107
- def self.rewhere(*args); end
108
-
109
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
110
- def self.preload(*args); end
111
-
112
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
113
- def self.eager_load(*args); end
114
-
115
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
116
- def self.includes(*args); end
117
-
118
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
119
- def self.from(*args); end
120
-
121
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
122
- def self.lock(*args); end
123
-
124
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
125
- def self.readonly(*args); end
126
-
127
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
128
- def self.or(*args); end
129
-
130
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
131
- def self.having(*args); end
132
-
133
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
134
- def self.create_with(*args); end
135
-
136
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
137
- def self.distinct(*args); end
138
-
139
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
140
- def self.references(*args); end
141
-
142
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
143
- def self.none(*args); end
144
-
145
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
146
- def self.unscope(*args); end
147
-
148
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
149
- def self.merge(*args); end
150
-
151
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
152
- def self.except(*args); end
153
-
154
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_Relation) }
155
- def self.extending(*args, &block); end
156
64
  end
157
65
 
158
- class Spell::ActiveRecord_Relation < ActiveRecord::Relation
159
- include Spell::ActiveRelation_WhereNot
160
- include Spell::CustomFinderMethods
161
- extend T::Sig
162
- extend T::Generic
163
- Elem = type_member(fixed: Spell)
164
-
66
+ module Spell::QueryMethodsReturningRelation
165
67
  sig { returns(Spell::ActiveRecord_Relation) }
166
68
  def all; end
167
69
 
@@ -250,17 +152,11 @@ class Spell::ActiveRecord_Relation < ActiveRecord::Relation
250
152
  def extending(*args, &block); end
251
153
  end
252
154
 
253
- class Spell::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
254
- include Spell::ActiveRelation_WhereNot
255
- include Spell::CustomFinderMethods
256
- extend T::Sig
257
- extend T::Generic
258
- Elem = type_member(fixed: Spell)
259
-
155
+ module Spell::QueryMethodsReturningAssociationRelation
260
156
  sig { returns(Spell::ActiveRecord_AssociationRelation) }
261
157
  def all; end
262
158
 
263
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_AssociationRelation) }
159
+ sig { params(block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_Relation) }
264
160
  def unscoped(&block); end
265
161
 
266
162
  sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
@@ -345,98 +241,24 @@ class Spell::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelatio
345
241
  def extending(*args, &block); end
346
242
  end
347
243
 
348
- class Spell::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
244
+ class Spell::ActiveRecord_Relation < ActiveRecord::Relation
245
+ include Spell::ActiveRelation_WhereNot
349
246
  include Spell::CustomFinderMethods
350
- extend T::Sig
351
- extend T::Generic
247
+ include Spell::QueryMethodsReturningRelation
352
248
  Elem = type_member(fixed: Spell)
249
+ end
353
250
 
354
- sig { returns(Spell::ActiveRecord_AssociationRelation) }
355
- def all; end
356
-
357
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_AssociationRelation) }
358
- def unscoped(&block); end
359
-
360
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
361
- def select(*args); end
362
-
363
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
364
- def order(*args); end
365
-
366
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
367
- def reorder(*args); end
368
-
369
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
370
- def group(*args); end
371
-
372
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
373
- def limit(*args); end
374
-
375
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
376
- def offset(*args); end
377
-
378
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
379
- def joins(*args); end
380
-
381
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
382
- def left_joins(*args); end
383
-
384
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
385
- def left_outer_joins(*args); end
386
-
387
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
388
- def where(*args); end
389
-
390
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
391
- def rewhere(*args); end
392
-
393
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
394
- def preload(*args); end
395
-
396
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
397
- def eager_load(*args); end
398
-
399
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
400
- def includes(*args); end
401
-
402
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
403
- def from(*args); end
404
-
405
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
406
- def lock(*args); end
407
-
408
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
409
- def readonly(*args); end
410
-
411
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
412
- def or(*args); end
413
-
414
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
415
- def having(*args); end
416
-
417
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
418
- def create_with(*args); end
419
-
420
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
421
- def distinct(*args); end
422
-
423
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
424
- def references(*args); end
425
-
426
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
427
- def none(*args); end
428
-
429
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
430
- def unscope(*args); end
431
-
432
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
433
- def merge(*args); end
434
-
435
- sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
436
- def except(*args); end
251
+ class Spell::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
252
+ include Spell::ActiveRelation_WhereNot
253
+ include Spell::CustomFinderMethods
254
+ include Spell::QueryMethodsReturningAssociationRelation
255
+ Elem = type_member(fixed: Spell)
256
+ end
437
257
 
438
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_AssociationRelation) }
439
- def extending(*args, &block); end
258
+ class Spell::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
259
+ include Spell::CustomFinderMethods
260
+ include Spell::QueryMethodsReturningAssociationRelation
261
+ Elem = type_member(fixed: Spell)
440
262
 
441
263
  sig { params(records: T.any(Spell, T::Array[Spell])).returns(T.self_type) }
442
264
  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,105 +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.order(*args); end
84
-
85
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
86
- def self.reorder(*args); end
87
-
88
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
89
- def self.group(*args); end
90
-
91
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
92
- def self.limit(*args); end
93
-
94
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
95
- def self.offset(*args); end
96
-
97
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
98
- def self.joins(*args); end
99
-
100
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
101
- def self.left_joins(*args); end
102
-
103
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
104
- def self.left_outer_joins(*args); end
105
-
106
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
107
- def self.where(*args); end
108
-
109
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
110
- def self.rewhere(*args); end
111
-
112
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
113
- def self.preload(*args); end
114
-
115
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
116
- def self.eager_load(*args); end
117
-
118
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
119
- def self.includes(*args); end
120
-
121
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
122
- def self.from(*args); end
123
-
124
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
125
- def self.lock(*args); end
126
-
127
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
128
- def self.readonly(*args); end
129
-
130
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
131
- def self.or(*args); end
132
-
133
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
134
- def self.having(*args); end
135
-
136
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
137
- def self.create_with(*args); end
138
-
139
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
140
- def self.distinct(*args); end
141
-
142
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
143
- def self.references(*args); end
144
-
145
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
146
- def self.none(*args); end
147
-
148
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
149
- def self.unscope(*args); end
150
-
151
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
152
- def self.merge(*args); end
153
-
154
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
155
- def self.except(*args); end
156
-
157
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
158
- def self.extending(*args, &block); end
159
67
  end
160
68
 
161
- class Spell::HABTM_SpellBooks::ActiveRecord_Relation < ActiveRecord::Relation
162
- include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
163
- include Spell::HABTM_SpellBooks::CustomFinderMethods
164
- extend T::Sig
165
- extend T::Generic
166
- Elem = type_member(fixed: Spell::HABTM_SpellBooks)
167
-
69
+ module Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
168
70
  sig { returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
169
71
  def all; end
170
72
 
@@ -253,17 +155,11 @@ class Spell::HABTM_SpellBooks::ActiveRecord_Relation < ActiveRecord::Relation
253
155
  def extending(*args, &block); end
254
156
  end
255
157
 
256
- class Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
257
- include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
258
- include Spell::HABTM_SpellBooks::CustomFinderMethods
259
- extend T::Sig
260
- extend T::Generic
261
- Elem = type_member(fixed: Spell::HABTM_SpellBooks)
262
-
158
+ module Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
263
159
  sig { returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
264
160
  def all; end
265
161
 
266
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
162
+ sig { params(block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
267
163
  def unscoped(&block); end
268
164
 
269
165
  sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
@@ -348,98 +244,24 @@ class Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation < ActiveRecord::
348
244
  def extending(*args, &block); end
349
245
  end
350
246
 
351
- class Spell::HABTM_SpellBooks::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
247
+ class Spell::HABTM_SpellBooks::ActiveRecord_Relation < ActiveRecord::Relation
248
+ include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
352
249
  include Spell::HABTM_SpellBooks::CustomFinderMethods
353
- extend T::Sig
354
- extend T::Generic
250
+ include Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
355
251
  Elem = type_member(fixed: Spell::HABTM_SpellBooks)
252
+ end
356
253
 
357
- sig { returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
358
- def all; end
359
-
360
- sig { params(block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
361
- def unscoped(&block); end
362
-
363
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
364
- def select(*args); end
365
-
366
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
367
- def order(*args); end
368
-
369
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
370
- def reorder(*args); end
371
-
372
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
373
- def group(*args); end
374
-
375
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
376
- def limit(*args); end
377
-
378
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
379
- def offset(*args); end
380
-
381
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
382
- def joins(*args); end
383
-
384
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
385
- def left_joins(*args); end
386
-
387
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
388
- def left_outer_joins(*args); end
389
-
390
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
391
- def where(*args); end
392
-
393
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
394
- def rewhere(*args); end
395
-
396
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
397
- def preload(*args); end
398
-
399
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
400
- def eager_load(*args); end
401
-
402
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
403
- def includes(*args); end
404
-
405
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
406
- def from(*args); end
407
-
408
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
409
- def lock(*args); end
410
-
411
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
412
- def readonly(*args); end
413
-
414
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
415
- def or(*args); end
416
-
417
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
418
- def having(*args); end
419
-
420
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
421
- def create_with(*args); end
422
-
423
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
424
- def distinct(*args); end
425
-
426
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
427
- def references(*args); end
428
-
429
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
430
- def none(*args); end
431
-
432
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
433
- def unscope(*args); end
434
-
435
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
436
- def merge(*args); end
437
-
438
- sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
439
- def except(*args); end
254
+ class Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
255
+ include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
256
+ include Spell::HABTM_SpellBooks::CustomFinderMethods
257
+ include Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
258
+ Elem = type_member(fixed: Spell::HABTM_SpellBooks)
259
+ end
440
260
 
441
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
442
- def extending(*args, &block); end
261
+ class Spell::HABTM_SpellBooks::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
262
+ include Spell::HABTM_SpellBooks::CustomFinderMethods
263
+ include Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
264
+ Elem = type_member(fixed: Spell::HABTM_SpellBooks)
443
265
 
444
266
  sig { params(records: T.any(Spell::HABTM_SpellBooks, T::Array[Spell::HABTM_SpellBooks])).returns(T.self_type) }
445
267
  def <<(*records); end