sorbet-rails 0.6.3 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +1 -2
  3. data/.gitignore +2 -1
  4. data/.travis.yml +3 -1
  5. data/README.md +54 -7
  6. data/Rakefile +3 -3
  7. data/lib/bundled_rbi/customizabel_rbi_formatter.rbi +29 -0
  8. data/lib/bundled_rbi/pluck_to_tstruct.rbi +2 -1
  9. data/lib/bundled_rbi/typed_enum.rbi +7 -0
  10. data/lib/sorbet-rails.rb +1 -3
  11. data/lib/sorbet-rails/active_record_rbi_formatter.rb +8 -2
  12. data/lib/sorbet-rails/config.rb +11 -0
  13. data/lib/sorbet-rails/deprecation.rb +1 -0
  14. data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
  15. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
  16. data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
  17. data/lib/sorbet-rails/job_rbi_formatter.rb +73 -62
  18. data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
  19. data/lib/sorbet-rails/model_column_utils.rb +129 -0
  20. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +37 -3
  21. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +0 -103
  22. data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
  23. data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
  24. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +34 -3
  25. data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
  26. data/lib/sorbet-rails/model_plugins/base.rb +0 -9
  27. data/lib/sorbet-rails/model_rbi_formatter.rb +4 -8
  28. data/lib/sorbet-rails/model_utils.rb +73 -32
  29. data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
  30. data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +17 -7
  31. data/lib/sorbet-rails/railtie.rb +0 -2
  32. data/lib/sorbet-rails/sorbet_utils.rb +152 -150
  33. data/lib/sorbet-rails/tasks/rails_rbi.rake +18 -26
  34. data/sorbet-rails.gemspec +1 -1
  35. data/spec/generators/rails-template.rb +3 -6
  36. data/spec/generators/sorbet_test_cases.rb +66 -88
  37. data/spec/job_rbi_formatter_spec.rb +1 -1
  38. data/spec/pluck_to_tstruct_spec.rb +74 -1
  39. data/spec/rails_helper.rb +2 -2
  40. data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
  41. data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
  42. data/spec/support/v5.0/Gemfile +1 -1
  43. data/spec/support/v5.0/Gemfile.lock +9 -9
  44. data/spec/support/v5.0/app/models/spell_book.rb +2 -0
  45. data/spec/support/v5.0/app/models/wizard.rb +1 -1
  46. data/spec/support/v5.0/sorbet_test_cases.rb +66 -88
  47. data/spec/support/v5.1/Gemfile.lock +7 -7
  48. data/spec/support/v5.1/app/models/spell_book.rb +2 -0
  49. data/spec/support/v5.1/app/models/wizard.rb +1 -1
  50. data/spec/support/v5.1/sorbet_test_cases.rb +66 -88
  51. data/spec/support/v5.2/Gemfile +1 -1
  52. data/spec/support/v5.2/Gemfile.lock +9 -9
  53. data/spec/support/v5.2/app/models/spell_book.rb +2 -0
  54. data/spec/support/v5.2/app/models/wizard.rb +1 -1
  55. data/spec/support/v5.2/sorbet_test_cases.rb +66 -88
  56. data/spec/support/v6.0/.gitignore +6 -0
  57. data/spec/support/v6.0/Gemfile +3 -3
  58. data/spec/support/v6.0/Gemfile.lock +77 -76
  59. data/spec/support/v6.0/app/models/spell_book.rb +2 -0
  60. data/spec/support/v6.0/app/models/wizard.rb +1 -1
  61. data/spec/support/v6.0/bin/bundle +22 -13
  62. data/spec/support/v6.0/config/environments/test.rb +1 -1
  63. data/spec/support/v6.0/sorbet_test_cases.rb +66 -88
  64. data/spec/support/v6.0/tmp/pids/.keep +0 -0
  65. data/spec/test_data/v5.0/expected_active_record_base.rbi +2 -2
  66. data/spec/test_data/v5.0/expected_active_record_relation.rbi +2 -2
  67. data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
  68. data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
  69. data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  70. data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  71. data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  72. data/spec/test_data/v5.0/expected_headmaster.rbi +60 -190
  73. data/spec/test_data/v5.0/expected_internal_metadata.rbi +42 -188
  74. data/spec/test_data/v5.0/expected_potion.rbi +51 -188
  75. data/spec/test_data/v5.0/expected_robe.rbi +51 -190
  76. data/spec/test_data/v5.0/expected_schema_migration.rbi +42 -188
  77. data/spec/test_data/v5.0/expected_school.rbi +51 -190
  78. data/spec/test_data/v5.0/expected_spell.rbi +42 -190
  79. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +60 -190
  80. data/spec/test_data/v5.0/expected_spell_book.rbi +86 -215
  81. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +60 -190
  82. data/spec/test_data/v5.0/expected_squib.rbi +131 -263
  83. data/spec/test_data/v5.0/expected_subject.rbi +42 -190
  84. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +60 -190
  85. data/spec/test_data/v5.0/expected_wand.rbi +84 -225
  86. data/spec/test_data/v5.0/expected_wizard.rbi +131 -263
  87. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +60 -190
  88. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +131 -263
  89. data/spec/test_data/v5.1/expected_active_record_base.rbi +2 -2
  90. data/spec/test_data/v5.1/expected_active_record_relation.rbi +2 -2
  91. data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
  92. data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
  93. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
  94. data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
  95. data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  96. data/spec/test_data/v5.1/expected_headmaster.rbi +60 -196
  97. data/spec/test_data/v5.1/expected_internal_metadata.rbi +42 -194
  98. data/spec/test_data/v5.1/expected_potion.rbi +51 -194
  99. data/spec/test_data/v5.1/expected_robe.rbi +51 -196
  100. data/spec/test_data/v5.1/expected_schema_migration.rbi +42 -194
  101. data/spec/test_data/v5.1/expected_school.rbi +51 -196
  102. data/spec/test_data/v5.1/expected_spell.rbi +42 -196
  103. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +60 -196
  104. data/spec/test_data/v5.1/expected_spell_book.rbi +86 -221
  105. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +60 -196
  106. data/spec/test_data/v5.1/expected_squib.rbi +132 -270
  107. data/spec/test_data/v5.1/expected_subject.rbi +42 -196
  108. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +60 -196
  109. data/spec/test_data/v5.1/expected_wand.rbi +84 -231
  110. data/spec/test_data/v5.1/expected_wizard.rbi +132 -270
  111. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +60 -196
  112. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +132 -270
  113. data/spec/test_data/v5.2/expected_active_record_base.rbi +2 -2
  114. data/spec/test_data/v5.2/expected_active_record_relation.rbi +2 -2
  115. data/spec/test_data/v5.2/expected_attachment.rbi +60 -194
  116. data/spec/test_data/v5.2/expected_blob.rbi +80 -214
  117. data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
  118. data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
  119. data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
  120. data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
  121. data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  122. data/spec/test_data/v5.2/expected_headmaster.rbi +60 -196
  123. data/spec/test_data/v5.2/expected_internal_metadata.rbi +42 -194
  124. data/spec/test_data/v5.2/expected_potion.rbi +51 -194
  125. data/spec/test_data/v5.2/expected_robe.rbi +51 -196
  126. data/spec/test_data/v5.2/expected_schema_migration.rbi +42 -194
  127. data/spec/test_data/v5.2/expected_school.rbi +51 -196
  128. data/spec/test_data/v5.2/expected_spell.rbi +42 -196
  129. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +60 -196
  130. data/spec/test_data/v5.2/expected_spell_book.rbi +86 -221
  131. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +60 -196
  132. data/spec/test_data/v5.2/expected_squib.rbi +156 -276
  133. data/spec/test_data/v5.2/expected_subject.rbi +42 -196
  134. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +60 -196
  135. data/spec/test_data/v5.2/expected_wand.rbi +84 -231
  136. data/spec/test_data/v5.2/expected_wizard.rbi +156 -276
  137. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +60 -196
  138. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +156 -276
  139. data/spec/test_data/v6.0/expected_active_record_base.rbi +2 -2
  140. data/spec/test_data/v6.0/expected_active_record_relation.rbi +10 -10
  141. data/spec/test_data/v6.0/expected_attachment.rbi +60 -218
  142. data/spec/test_data/v6.0/expected_blob.rbi +80 -238
  143. data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
  144. data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
  145. data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  146. data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  147. data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  148. data/spec/test_data/v6.0/expected_headmaster.rbi +60 -220
  149. data/spec/test_data/v6.0/expected_internal_metadata.rbi +42 -218
  150. data/spec/test_data/v6.0/expected_potion.rbi +51 -218
  151. data/spec/test_data/v6.0/expected_robe.rbi +51 -220
  152. data/spec/test_data/v6.0/expected_routes.rbi +14 -7
  153. data/spec/test_data/v6.0/expected_schema_migration.rbi +42 -218
  154. data/spec/test_data/v6.0/expected_school.rbi +51 -220
  155. data/spec/test_data/v6.0/expected_spell.rbi +42 -220
  156. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +60 -220
  157. data/spec/test_data/v6.0/expected_spell_book.rbi +98 -257
  158. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +60 -220
  159. data/spec/test_data/v6.0/expected_squib.rbi +182 -326
  160. data/spec/test_data/v6.0/expected_subject.rbi +42 -220
  161. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +60 -220
  162. data/spec/test_data/v6.0/expected_wand.rbi +100 -271
  163. data/spec/test_data/v6.0/expected_wizard.rbi +182 -326
  164. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +60 -220
  165. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +182 -326
  166. metadata +46 -11
  167. data/lib/bundled_rbi/parameters.rbi +0 -28
  168. data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -42
  169. data/lib/sorbet-rails/custom_types/integer_string.rb +0 -45
  170. data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -57
  171. data/spec/boolean_string_spec.rb +0 -59
  172. data/spec/custom_params_methods_spec.rb +0 -138
  173. data/spec/integer_string_spec.rb +0 -46
@@ -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,17 +28,33 @@ 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
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
35
+ def build_left_side(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
38
+ def create_left_side(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
41
+ def create_left_side!(*args, &block); end
42
+
38
43
  sig { params(value: T.nilable(::SpellBook)).void }
39
44
  def left_side=(value); end
40
45
 
41
46
  sig { returns(::Spell) }
42
47
  def spell; end
43
48
 
49
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
50
+ def build_spell(*args, &block); end
51
+
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
53
+ def create_spell(*args, &block); end
54
+
55
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
56
+ def create_spell!(*args, &block); end
57
+
44
58
  sig { params(value: ::Spell).void }
45
59
  def spell=(value); end
46
60
  end
@@ -66,117 +80,11 @@ class SpellBook::HABTM_Spells < ActiveRecord::Base
66
80
  include SpellBook::HABTM_Spells::GeneratedAttributeMethods
67
81
  include SpellBook::HABTM_Spells::GeneratedAssociationMethods
68
82
  extend SpellBook::HABTM_Spells::CustomFinderMethods
69
- extend T::Sig
70
- extend T::Generic
83
+ extend SpellBook::HABTM_Spells::QueryMethodsReturningRelation
71
84
  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
85
  end
172
86
 
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
-
87
+ module SpellBook::HABTM_Spells::QueryMethodsReturningRelation
180
88
  sig { returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
181
89
  def all; end
182
90
 
@@ -275,19 +183,25 @@ class SpellBook::HABTM_Spells::ActiveRecord_Relation < ActiveRecord::Relation
275
183
 
276
184
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
277
185
  def extending(*args, &block); end
278
- end
279
186
 
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)
187
+ sig do
188
+ params(
189
+ of: T.nilable(Integer),
190
+ start: T.nilable(Integer),
191
+ finish: T.nilable(Integer),
192
+ load: T.nilable(T::Boolean),
193
+ error_on_ignore: T.nilable(T::Boolean),
194
+ block: T.nilable(T.proc.params(e: SpellBook::HABTM_Spells::ActiveRecord_Relation).void)
195
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
196
+ end
197
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
198
+ end
286
199
 
200
+ module SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
287
201
  sig { returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
288
202
  def all; end
289
203
 
290
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
204
+ sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
291
205
  def unscoped(&block); end
292
206
 
293
207
  sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
@@ -382,112 +296,38 @@ class SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation < ActiveRecord::
382
296
 
383
297
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
384
298
  def extending(*args, &block); end
299
+
300
+ sig do
301
+ params(
302
+ of: T.nilable(Integer),
303
+ start: T.nilable(Integer),
304
+ finish: T.nilable(Integer),
305
+ load: T.nilable(T::Boolean),
306
+ error_on_ignore: T.nilable(T::Boolean),
307
+ block: T.nilable(T.proc.params(e: SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation).void)
308
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
309
+ end
310
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
385
311
  end
386
312
 
387
- class SpellBook::HABTM_Spells::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
313
+ class SpellBook::HABTM_Spells::ActiveRecord_Relation < ActiveRecord::Relation
314
+ include SpellBook::HABTM_Spells::ActiveRelation_WhereNot
388
315
  include SpellBook::HABTM_Spells::CustomFinderMethods
389
- extend T::Sig
390
- extend T::Generic
316
+ include SpellBook::HABTM_Spells::QueryMethodsReturningRelation
391
317
  Elem = type_member(fixed: SpellBook::HABTM_Spells)
318
+ end
392
319
 
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
320
+ class SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
321
+ include SpellBook::HABTM_Spells::ActiveRelation_WhereNot
322
+ include SpellBook::HABTM_Spells::CustomFinderMethods
323
+ include SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
324
+ Elem = type_member(fixed: SpellBook::HABTM_Spells)
325
+ end
488
326
 
489
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
490
- def extending(*args, &block); end
327
+ class SpellBook::HABTM_Spells::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
328
+ include SpellBook::HABTM_Spells::CustomFinderMethods
329
+ include SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
330
+ Elem = type_member(fixed: SpellBook::HABTM_Spells)
491
331
 
492
332
  sig { params(records: T.any(SpellBook::HABTM_Spells, T::Array[SpellBook::HABTM_Spells])).returns(T.self_type) }
493
333
  def <<(*records); end
@@ -3,8 +3,6 @@
3
3
 
4
4
  # typed: strong
5
5
  module Squib::EnumInstanceMethods
6
- extend T::Sig
7
-
8
6
  sig { returns(T::Boolean) }
9
7
  def broom_nimbus?; end
10
8
 
@@ -114,8 +112,6 @@ module Squib::ActiveRelation_WhereNot
114
112
  end
115
113
 
116
114
  module Squib::GeneratedAttributeMethods
117
- extend T::Sig
118
-
119
115
  sig { returns(T.nilable(String)) }
120
116
  def broom; end
121
117
 
@@ -274,8 +270,7 @@ class Squib < Wizard
274
270
  include Squib::GeneratedAttributeMethods
275
271
  include Squib::GeneratedAssociationMethods
276
272
  extend Squib::CustomFinderMethods
277
- extend T::Sig
278
- extend T::Generic
273
+ extend Squib::QueryMethodsReturningRelation
279
274
  RelationType = T.type_alias { T.any(Squib::ActiveRecord_Relation, Squib::ActiveRecord_Associations_CollectionProxy, Squib::ActiveRecord_AssociationRelation) }
280
275
 
281
276
  sig { returns(T::Hash[T.any(String, Symbol), String]) }
@@ -406,112 +401,12 @@ class Squib < Wizard
406
401
 
407
402
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
408
403
  def self.with_attached_school_photo(*args); end
409
-
410
- sig { returns(Squib::ActiveRecord_Relation) }
411
- def self.all; end
412
-
413
- sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
414
- def self.unscoped(&block); end
415
-
416
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
417
- def self.select(*args); end
418
-
419
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
420
- def self.reselect(*args); end
421
-
422
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
423
- def self.order(*args); end
424
-
425
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
426
- def self.reorder(*args); end
427
-
428
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
429
- def self.group(*args); end
430
-
431
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
432
- def self.limit(*args); end
433
-
434
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
435
- def self.offset(*args); end
436
-
437
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
438
- def self.joins(*args); end
439
-
440
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
441
- def self.left_joins(*args); end
442
-
443
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
444
- def self.left_outer_joins(*args); end
445
-
446
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
447
- def self.where(*args); end
448
-
449
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
450
- def self.rewhere(*args); end
451
-
452
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
453
- def self.preload(*args); end
454
-
455
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
456
- def self.extract_associated(*args); end
457
-
458
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
459
- def self.eager_load(*args); end
460
-
461
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
462
- def self.includes(*args); end
463
-
464
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
465
- def self.from(*args); end
466
-
467
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
468
- def self.lock(*args); end
469
-
470
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
471
- def self.readonly(*args); end
472
-
473
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
474
- def self.or(*args); end
475
-
476
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
477
- def self.having(*args); end
478
-
479
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
480
- def self.create_with(*args); end
481
-
482
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
483
- def self.distinct(*args); end
484
-
485
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
486
- def self.references(*args); end
487
-
488
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
489
- def self.none(*args); end
490
-
491
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
492
- def self.unscope(*args); end
493
-
494
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
495
- def self.optimizer_hints(*args); end
496
-
497
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
498
- def self.merge(*args); end
499
-
500
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
501
- def self.except(*args); end
502
-
503
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
504
- def self.only(*args); end
505
-
506
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
507
- def self.extending(*args, &block); end
508
404
  end
509
405
 
510
406
  class Squib::ActiveRecord_Relation < ActiveRecord::Relation
511
407
  include Squib::ActiveRelation_WhereNot
512
408
  include Squib::CustomFinderMethods
513
- extend T::Sig
514
- extend T::Generic
409
+ include Squib::QueryMethodsReturningRelation
515
410
  Elem = type_member(fixed: Squib)
516
411
 
517
412
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
@@ -624,112 +519,12 @@ class Squib::ActiveRecord_Relation < ActiveRecord::Relation
624
519
 
625
520
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
626
521
  def with_attached_school_photo(*args); end
627
-
628
- sig { returns(Squib::ActiveRecord_Relation) }
629
- def all; end
630
-
631
- sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
632
- def unscoped(&block); end
633
-
634
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
635
- def select(*args); end
636
-
637
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
638
- def reselect(*args); end
639
-
640
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
641
- def order(*args); end
642
-
643
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
644
- def reorder(*args); end
645
-
646
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
647
- def group(*args); end
648
-
649
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
650
- def limit(*args); end
651
-
652
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
653
- def offset(*args); end
654
-
655
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
656
- def joins(*args); end
657
-
658
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
659
- def left_joins(*args); end
660
-
661
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
662
- def left_outer_joins(*args); end
663
-
664
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
665
- def where(*args); end
666
-
667
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
668
- def rewhere(*args); end
669
-
670
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
671
- def preload(*args); end
672
-
673
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
674
- def extract_associated(*args); end
675
-
676
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
677
- def eager_load(*args); end
678
-
679
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
680
- def includes(*args); end
681
-
682
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
683
- def from(*args); end
684
-
685
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
686
- def lock(*args); end
687
-
688
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
689
- def readonly(*args); end
690
-
691
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
692
- def or(*args); end
693
-
694
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
695
- def having(*args); end
696
-
697
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
698
- def create_with(*args); end
699
-
700
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
701
- def distinct(*args); end
702
-
703
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
704
- def references(*args); end
705
-
706
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
707
- def none(*args); end
708
-
709
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
710
- def unscope(*args); end
711
-
712
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
713
- def optimizer_hints(*args); end
714
-
715
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
716
- def merge(*args); end
717
-
718
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
719
- def except(*args); end
720
-
721
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
722
- def only(*args); end
723
-
724
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
725
- def extending(*args, &block); end
726
522
  end
727
523
 
728
524
  class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
729
525
  include Squib::ActiveRelation_WhereNot
730
526
  include Squib::CustomFinderMethods
731
- extend T::Sig
732
- extend T::Generic
527
+ include Squib::QueryMethodsReturningAssociationRelation
733
528
  Elem = type_member(fixed: Squib)
734
529
 
735
530
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
@@ -842,111 +637,11 @@ class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelatio
842
637
 
843
638
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
844
639
  def with_attached_school_photo(*args); end
845
-
846
- sig { returns(Squib::ActiveRecord_AssociationRelation) }
847
- def all; end
848
-
849
- sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
850
- def unscoped(&block); end
851
-
852
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
853
- def select(*args); end
854
-
855
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
856
- def reselect(*args); end
857
-
858
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
859
- def order(*args); end
860
-
861
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
862
- def reorder(*args); end
863
-
864
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
865
- def group(*args); end
866
-
867
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
868
- def limit(*args); end
869
-
870
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
871
- def offset(*args); end
872
-
873
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
874
- def joins(*args); end
875
-
876
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
877
- def left_joins(*args); end
878
-
879
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
880
- def left_outer_joins(*args); end
881
-
882
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
883
- def where(*args); end
884
-
885
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
886
- def rewhere(*args); end
887
-
888
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
889
- def preload(*args); end
890
-
891
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
892
- def extract_associated(*args); end
893
-
894
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
895
- def eager_load(*args); end
896
-
897
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
898
- def includes(*args); end
899
-
900
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
901
- def from(*args); end
902
-
903
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
904
- def lock(*args); end
905
-
906
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
907
- def readonly(*args); end
908
-
909
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
910
- def or(*args); end
911
-
912
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
913
- def having(*args); end
914
-
915
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
916
- def create_with(*args); end
917
-
918
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
919
- def distinct(*args); end
920
-
921
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
922
- def references(*args); end
923
-
924
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
925
- def none(*args); end
926
-
927
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
928
- def unscope(*args); end
929
-
930
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
931
- def optimizer_hints(*args); end
932
-
933
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
934
- def merge(*args); end
935
-
936
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
937
- def except(*args); end
938
-
939
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
940
- def only(*args); end
941
-
942
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
943
- def extending(*args, &block); end
944
640
  end
945
641
 
946
642
  class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
947
643
  include Squib::CustomFinderMethods
948
- extend T::Sig
949
- extend T::Generic
644
+ include Squib::QueryMethodsReturningAssociationRelation
950
645
  Elem = type_member(fixed: Squib)
951
646
 
952
647
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
@@ -1060,10 +755,137 @@ class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associati
1060
755
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
1061
756
  def with_attached_school_photo(*args); end
1062
757
 
758
+ sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
759
+ def <<(*records); end
760
+
761
+ sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
762
+ def append(*records); end
763
+
764
+ sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
765
+ def push(*records); end
766
+
767
+ sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
768
+ def concat(*records); end
769
+ end
770
+
771
+ module Squib::QueryMethodsReturningRelation
772
+ sig { returns(Squib::ActiveRecord_Relation) }
773
+ def all; end
774
+
775
+ sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
776
+ def unscoped(&block); end
777
+
778
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
779
+ def select(*args); end
780
+
781
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
782
+ def reselect(*args); end
783
+
784
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
785
+ def order(*args); end
786
+
787
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
788
+ def reorder(*args); end
789
+
790
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
791
+ def group(*args); end
792
+
793
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
794
+ def limit(*args); end
795
+
796
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
797
+ def offset(*args); end
798
+
799
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
800
+ def joins(*args); end
801
+
802
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
803
+ def left_joins(*args); end
804
+
805
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
806
+ def left_outer_joins(*args); end
807
+
808
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
809
+ def where(*args); end
810
+
811
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
812
+ def rewhere(*args); end
813
+
814
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
815
+ def preload(*args); end
816
+
817
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
818
+ def extract_associated(*args); end
819
+
820
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
821
+ def eager_load(*args); end
822
+
823
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
824
+ def includes(*args); end
825
+
826
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
827
+ def from(*args); end
828
+
829
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
830
+ def lock(*args); end
831
+
832
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
833
+ def readonly(*args); end
834
+
835
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
836
+ def or(*args); end
837
+
838
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
839
+ def having(*args); end
840
+
841
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
842
+ def create_with(*args); end
843
+
844
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
845
+ def distinct(*args); end
846
+
847
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
848
+ def references(*args); end
849
+
850
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
851
+ def none(*args); end
852
+
853
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
854
+ def unscope(*args); end
855
+
856
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
857
+ def optimizer_hints(*args); end
858
+
859
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
860
+ def merge(*args); end
861
+
862
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
863
+ def except(*args); end
864
+
865
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
866
+ def only(*args); end
867
+
868
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
869
+ def extending(*args, &block); end
870
+
871
+ sig do
872
+ params(
873
+ of: T.nilable(Integer),
874
+ start: T.nilable(Integer),
875
+ finish: T.nilable(Integer),
876
+ load: T.nilable(T::Boolean),
877
+ error_on_ignore: T.nilable(T::Boolean),
878
+ block: T.nilable(T.proc.params(e: Squib::ActiveRecord_Relation).void)
879
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
880
+ end
881
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
882
+ end
883
+
884
+ module Squib::QueryMethodsReturningAssociationRelation
1063
885
  sig { returns(Squib::ActiveRecord_AssociationRelation) }
1064
886
  def all; end
1065
887
 
1066
- sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
888
+ sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
1067
889
  def unscoped(&block); end
1068
890
 
1069
891
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
@@ -1159,26 +981,24 @@ class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associati
1159
981
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
1160
982
  def extending(*args, &block); end
1161
983
 
1162
- sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
1163
- def <<(*records); end
1164
-
1165
- sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
1166
- def append(*records); end
1167
-
1168
- sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
1169
- def push(*records); end
1170
-
1171
- sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
1172
- def concat(*records); end
984
+ sig do
985
+ params(
986
+ of: T.nilable(Integer),
987
+ start: T.nilable(Integer),
988
+ finish: T.nilable(Integer),
989
+ load: T.nilable(T::Boolean),
990
+ error_on_ignore: T.nilable(T::Boolean),
991
+ block: T.nilable(T.proc.params(e: Squib::ActiveRecord_AssociationRelation).void)
992
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
993
+ end
994
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
1173
995
  end
1174
996
 
1175
997
  module Squib::GeneratedAssociationMethods
1176
- extend T::Sig
1177
-
1178
998
  sig { returns(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
1179
999
  def hats_attachments; end
1180
1000
 
1181
- sig { returns(T::Array[Integer]) }
1001
+ sig { returns(T::Array[T.untyped]) }
1182
1002
  def hats_attachment_ids; end
1183
1003
 
1184
1004
  sig { params(value: T::Enumerable[::ActiveStorage::Attachment]).void }
@@ -1187,7 +1007,7 @@ module Squib::GeneratedAssociationMethods
1187
1007
  sig { returns(::ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy) }
1188
1008
  def hats_blobs; end
1189
1009
 
1190
- sig { returns(T::Array[Integer]) }
1010
+ sig { returns(T::Array[T.untyped]) }
1191
1011
  def hats_blob_ids; end
1192
1012
 
1193
1013
  sig { params(value: T::Enumerable[::ActiveStorage::Blob]).void }
@@ -1196,18 +1016,45 @@ module Squib::GeneratedAssociationMethods
1196
1016
  sig { returns(T.nilable(::School)) }
1197
1017
  def school; end
1198
1018
 
1019
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
1020
+ def build_school(*args, &block); end
1021
+
1022
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
1023
+ def create_school(*args, &block); end
1024
+
1025
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
1026
+ def create_school!(*args, &block); end
1027
+
1199
1028
  sig { params(value: T.nilable(::School)).void }
1200
1029
  def school=(value); end
1201
1030
 
1202
1031
  sig { returns(T.nilable(::ActiveStorage::Attachment)) }
1203
1032
  def school_photo_attachment; end
1204
1033
 
1034
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
1035
+ def build_school_photo_attachment(*args, &block); end
1036
+
1037
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
1038
+ def create_school_photo_attachment(*args, &block); end
1039
+
1040
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
1041
+ def create_school_photo_attachment!(*args, &block); end
1042
+
1205
1043
  sig { params(value: T.nilable(::ActiveStorage::Attachment)).void }
1206
1044
  def school_photo_attachment=(value); end
1207
1045
 
1208
1046
  sig { returns(T.nilable(::ActiveStorage::Blob)) }
1209
1047
  def school_photo_blob; end
1210
1048
 
1049
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
1050
+ def build_school_photo_blob(*args, &block); end
1051
+
1052
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
1053
+ def create_school_photo_blob(*args, &block); end
1054
+
1055
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
1056
+ def create_school_photo_blob!(*args, &block); end
1057
+
1211
1058
  sig { params(value: T.nilable(::ActiveStorage::Blob)).void }
1212
1059
  def school_photo_blob=(value); end
1213
1060
 
@@ -1232,6 +1079,15 @@ module Squib::GeneratedAssociationMethods
1232
1079
  sig { returns(T.nilable(::Wand)) }
1233
1080
  def wand; end
1234
1081
 
1082
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
1083
+ def build_wand(*args, &block); end
1084
+
1085
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
1086
+ def create_wand(*args, &block); end
1087
+
1088
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
1089
+ def create_wand!(*args, &block); end
1090
+
1235
1091
  sig { params(value: T.nilable(::Wand)).void }
1236
1092
  def wand=(value); end
1237
1093
 
@@ -1245,5 +1101,5 @@ module Squib::GeneratedAssociationMethods
1245
1101
  def hats; end
1246
1102
 
1247
1103
  sig { params(attachables: T.untyped).returns(T.untyped) }
1248
- def hats=(*attachables); end
1104
+ def hats=(attachables); end
1249
1105
  end