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 Wizard::HABTM_Subjects::ActiveRelation_WhereNot
8
8
  end
9
9
 
10
10
  module Wizard::HABTM_Subjects::GeneratedAttributeMethods
11
- extend T::Sig
12
-
13
11
  sig { returns(T.nilable(Integer)) }
14
12
  def subject_id; end
15
13
 
@@ -30,17 +28,33 @@ module Wizard::HABTM_Subjects::GeneratedAttributeMethods
30
28
  end
31
29
 
32
30
  module Wizard::HABTM_Subjects::GeneratedAssociationMethods
33
- extend T::Sig
34
-
35
31
  sig { returns(T.nilable(::Wizard)) }
36
32
  def left_side; end
37
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
35
+ def build_left_side(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
38
+ def create_left_side(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
41
+ def create_left_side!(*args, &block); end
42
+
38
43
  sig { params(value: T.nilable(::Wizard)).void }
39
44
  def left_side=(value); end
40
45
 
41
46
  sig { returns(T.nilable(::Subject)) }
42
47
  def subject; end
43
48
 
49
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
50
+ def build_subject(*args, &block); end
51
+
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
53
+ def create_subject(*args, &block); end
54
+
55
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
56
+ def create_subject!(*args, &block); end
57
+
44
58
  sig { params(value: T.nilable(::Subject)).void }
45
59
  def subject=(value); end
46
60
  end
@@ -66,105 +80,11 @@ class Wizard::HABTM_Subjects < ActiveRecord::Base
66
80
  include Wizard::HABTM_Subjects::GeneratedAttributeMethods
67
81
  include Wizard::HABTM_Subjects::GeneratedAssociationMethods
68
82
  extend Wizard::HABTM_Subjects::CustomFinderMethods
69
- extend T::Sig
70
- extend T::Generic
83
+ extend Wizard::HABTM_Subjects::QueryMethodsReturningRelation
71
84
  RelationType = T.type_alias { T.any(Wizard::HABTM_Subjects::ActiveRecord_Relation, Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy, Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
72
-
73
- sig { returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
74
- def self.all; end
75
-
76
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
77
- def self.unscoped(&block); end
78
-
79
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
80
- def self.select(*args); end
81
-
82
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
83
- def self.order(*args); end
84
-
85
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
86
- def self.reorder(*args); end
87
-
88
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
89
- def self.group(*args); end
90
-
91
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
92
- def self.limit(*args); end
93
-
94
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
95
- def self.offset(*args); end
96
-
97
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
98
- def self.joins(*args); end
99
-
100
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
101
- def self.left_joins(*args); end
102
-
103
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
104
- def self.left_outer_joins(*args); end
105
-
106
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
107
- def self.where(*args); end
108
-
109
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
110
- def self.rewhere(*args); end
111
-
112
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
113
- def self.preload(*args); end
114
-
115
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
116
- def self.eager_load(*args); end
117
-
118
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
119
- def self.includes(*args); end
120
-
121
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
122
- def self.from(*args); end
123
-
124
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
125
- def self.lock(*args); end
126
-
127
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
128
- def self.readonly(*args); end
129
-
130
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
131
- def self.or(*args); end
132
-
133
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
134
- def self.having(*args); end
135
-
136
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
137
- def self.create_with(*args); end
138
-
139
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
140
- def self.distinct(*args); end
141
-
142
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
143
- def self.references(*args); end
144
-
145
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
146
- def self.none(*args); end
147
-
148
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
149
- def self.unscope(*args); end
150
-
151
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
152
- def self.merge(*args); end
153
-
154
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
155
- def self.except(*args); end
156
-
157
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
158
- def self.extending(*args, &block); end
159
85
  end
160
86
 
161
- class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
162
- include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
163
- include Wizard::HABTM_Subjects::CustomFinderMethods
164
- extend T::Sig
165
- extend T::Generic
166
- Elem = type_member(fixed: Wizard::HABTM_Subjects)
167
-
87
+ module Wizard::HABTM_Subjects::QueryMethodsReturningRelation
168
88
  sig { returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
169
89
  def all; end
170
90
 
@@ -251,19 +171,25 @@ class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
251
171
 
252
172
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
253
173
  def extending(*args, &block); end
254
- end
255
174
 
256
- class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
257
- include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
258
- include Wizard::HABTM_Subjects::CustomFinderMethods
259
- extend T::Sig
260
- extend T::Generic
261
- Elem = type_member(fixed: Wizard::HABTM_Subjects)
175
+ sig do
176
+ params(
177
+ of: T.nilable(Integer),
178
+ start: T.nilable(Integer),
179
+ finish: T.nilable(Integer),
180
+ load: T.nilable(T::Boolean),
181
+ error_on_ignore: T.nilable(T::Boolean),
182
+ block: T.nilable(T.proc.params(e: Wizard::HABTM_Subjects::ActiveRecord_Relation).void)
183
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
184
+ end
185
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
186
+ end
262
187
 
188
+ module Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
263
189
  sig { returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
264
190
  def all; end
265
191
 
266
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
192
+ sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
267
193
  def unscoped(&block); end
268
194
 
269
195
  sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
@@ -346,100 +272,38 @@ class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::A
346
272
 
347
273
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
348
274
  def extending(*args, &block); end
275
+
276
+ sig do
277
+ params(
278
+ of: T.nilable(Integer),
279
+ start: T.nilable(Integer),
280
+ finish: T.nilable(Integer),
281
+ load: T.nilable(T::Boolean),
282
+ error_on_ignore: T.nilable(T::Boolean),
283
+ block: T.nilable(T.proc.params(e: Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation).void)
284
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
285
+ end
286
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
349
287
  end
350
288
 
351
- class Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
289
+ class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
290
+ include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
352
291
  include Wizard::HABTM_Subjects::CustomFinderMethods
353
- extend T::Sig
354
- extend T::Generic
292
+ include Wizard::HABTM_Subjects::QueryMethodsReturningRelation
355
293
  Elem = type_member(fixed: Wizard::HABTM_Subjects)
294
+ end
356
295
 
357
- sig { returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
358
- def all; end
359
-
360
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
361
- def unscoped(&block); end
362
-
363
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
364
- def select(*args); end
365
-
366
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
367
- def order(*args); end
368
-
369
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
370
- def reorder(*args); end
371
-
372
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
373
- def group(*args); end
374
-
375
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
376
- def limit(*args); end
377
-
378
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
379
- def offset(*args); end
380
-
381
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
382
- def joins(*args); end
383
-
384
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
385
- def left_joins(*args); end
386
-
387
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
388
- def left_outer_joins(*args); end
389
-
390
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
391
- def where(*args); end
392
-
393
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
394
- def rewhere(*args); end
395
-
396
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
397
- def preload(*args); end
398
-
399
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
400
- def eager_load(*args); end
401
-
402
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
403
- def includes(*args); end
404
-
405
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
406
- def from(*args); end
407
-
408
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
409
- def lock(*args); end
410
-
411
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
412
- def readonly(*args); end
413
-
414
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
415
- def or(*args); end
416
-
417
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
418
- def having(*args); end
419
-
420
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
421
- def create_with(*args); end
422
-
423
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
424
- def distinct(*args); end
425
-
426
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
427
- def references(*args); end
428
-
429
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
430
- def none(*args); end
431
-
432
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
433
- def unscope(*args); end
434
-
435
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
436
- def merge(*args); end
437
-
438
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
439
- def except(*args); end
296
+ class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
297
+ include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
298
+ include Wizard::HABTM_Subjects::CustomFinderMethods
299
+ include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
300
+ Elem = type_member(fixed: Wizard::HABTM_Subjects)
301
+ end
440
302
 
441
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
442
- def extending(*args, &block); end
303
+ class Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
304
+ include Wizard::HABTM_Subjects::CustomFinderMethods
305
+ include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
306
+ Elem = type_member(fixed: Wizard::HABTM_Subjects)
443
307
 
444
308
  sig { params(records: T.any(Wizard::HABTM_Subjects, T::Array[Wizard::HABTM_Subjects])).returns(T.self_type) }
445
309
  def <<(*records); end
@@ -3,8 +3,6 @@
3
3
 
4
4
  # typed: strong
5
5
  module Wizard::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 Wizard::ActiveRelation_WhereNot
114
112
  end
115
113
 
116
114
  module Wizard::GeneratedAttributeMethods
117
- extend T::Sig
118
-
119
115
  sig { returns(T::Boolean) }
120
116
  def broom?; end
121
117
 
@@ -293,12 +289,10 @@ class Wizard::QuidditchPosition < T::Enum
293
289
  end
294
290
 
295
291
  module Wizard::GeneratedAssociationMethods
296
- extend T::Sig
297
-
298
292
  sig { returns(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
299
293
  def hats_attachments; end
300
294
 
301
- sig { returns(T::Array[Integer]) }
295
+ sig { returns(T::Array[T.untyped]) }
302
296
  def hats_attachment_ids; end
303
297
 
304
298
  sig { params(value: T::Enumerable[::ActiveStorage::Attachment]).void }
@@ -307,7 +301,7 @@ module Wizard::GeneratedAssociationMethods
307
301
  sig { returns(::ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy) }
308
302
  def hats_blobs; end
309
303
 
310
- sig { returns(T::Array[Integer]) }
304
+ sig { returns(T::Array[T.untyped]) }
311
305
  def hats_blob_ids; end
312
306
 
313
307
  sig { params(value: T::Enumerable[::ActiveStorage::Blob]).void }
@@ -316,18 +310,45 @@ module Wizard::GeneratedAssociationMethods
316
310
  sig { returns(T.nilable(T.untyped)) }
317
311
  def school; end
318
312
 
313
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
314
+ def build_school(*args, &block); end
315
+
316
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
317
+ def create_school(*args, &block); end
318
+
319
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
320
+ def create_school!(*args, &block); end
321
+
319
322
  sig { params(value: T.nilable(T.untyped)).void }
320
323
  def school=(value); end
321
324
 
322
325
  sig { returns(T.nilable(::ActiveStorage::Attachment)) }
323
326
  def school_photo_attachment; end
324
327
 
328
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
329
+ def build_school_photo_attachment(*args, &block); end
330
+
331
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
332
+ def create_school_photo_attachment(*args, &block); end
333
+
334
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
335
+ def create_school_photo_attachment!(*args, &block); end
336
+
325
337
  sig { params(value: T.nilable(::ActiveStorage::Attachment)).void }
326
338
  def school_photo_attachment=(value); end
327
339
 
328
340
  sig { returns(T.nilable(::ActiveStorage::Blob)) }
329
341
  def school_photo_blob; end
330
342
 
343
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
344
+ def build_school_photo_blob(*args, &block); end
345
+
346
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
347
+ def create_school_photo_blob(*args, &block); end
348
+
349
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
350
+ def create_school_photo_blob!(*args, &block); end
351
+
331
352
  sig { params(value: T.nilable(::ActiveStorage::Blob)).void }
332
353
  def school_photo_blob=(value); end
333
354
 
@@ -346,6 +367,15 @@ module Wizard::GeneratedAssociationMethods
346
367
  sig { returns(T.nilable(::Wand)) }
347
368
  def wand; end
348
369
 
370
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
371
+ def build_wand(*args, &block); end
372
+
373
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
374
+ def create_wand(*args, &block); end
375
+
376
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
377
+ def create_wand!(*args, &block); end
378
+
349
379
  sig { params(value: T.nilable(::Wand)).void }
350
380
  def wand=(value); end
351
381
  end
@@ -372,8 +402,7 @@ class Wizard < ApplicationRecord
372
402
  include Wizard::GeneratedAttributeMethods
373
403
  include Wizard::GeneratedAssociationMethods
374
404
  extend Wizard::CustomFinderMethods
375
- extend T::Sig
376
- extend T::Generic
405
+ extend Wizard::QueryMethodsReturningRelation
377
406
  RelationType = T.type_alias { T.any(Wizard::ActiveRecord_Relation, Wizard::ActiveRecord_Associations_CollectionProxy, Wizard::ActiveRecord_AssociationRelation) }
378
407
 
379
408
  sig { returns(T::Hash[T.any(String, Symbol), String]) }
@@ -454,93 +483,6 @@ class Wizard < ApplicationRecord
454
483
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
455
484
  def self.with_attached_school_photo(*args); end
456
485
 
457
- sig { returns(Wizard::ActiveRecord_Relation) }
458
- def self.all; end
459
-
460
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
461
- def self.unscoped(&block); end
462
-
463
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
464
- def self.select(*args); end
465
-
466
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
467
- def self.order(*args); end
468
-
469
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
470
- def self.reorder(*args); end
471
-
472
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
473
- def self.group(*args); end
474
-
475
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
476
- def self.limit(*args); end
477
-
478
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
479
- def self.offset(*args); end
480
-
481
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
482
- def self.joins(*args); end
483
-
484
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
485
- def self.left_joins(*args); end
486
-
487
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
488
- def self.left_outer_joins(*args); end
489
-
490
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
491
- def self.where(*args); end
492
-
493
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
494
- def self.rewhere(*args); end
495
-
496
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
497
- def self.preload(*args); end
498
-
499
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
500
- def self.eager_load(*args); end
501
-
502
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
503
- def self.includes(*args); end
504
-
505
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
506
- def self.from(*args); end
507
-
508
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
509
- def self.lock(*args); end
510
-
511
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
512
- def self.readonly(*args); end
513
-
514
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
515
- def self.or(*args); end
516
-
517
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
518
- def self.having(*args); end
519
-
520
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
521
- def self.create_with(*args); end
522
-
523
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
524
- def self.distinct(*args); end
525
-
526
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
527
- def self.references(*args); end
528
-
529
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
530
- def self.none(*args); end
531
-
532
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
533
- def self.unscope(*args); end
534
-
535
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
536
- def self.merge(*args); end
537
-
538
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
539
- def self.except(*args); end
540
-
541
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
542
- def self.extending(*args, &block); end
543
-
544
486
  sig { returns(T.nilable(Wizard::Broom)) }
545
487
  def typed_broom; end
546
488
 
@@ -581,8 +523,7 @@ end
581
523
  class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
582
524
  include Wizard::ActiveRelation_WhereNot
583
525
  include Wizard::CustomFinderMethods
584
- extend T::Sig
585
- extend T::Generic
526
+ include Wizard::QueryMethodsReturningRelation
586
527
  Elem = type_member(fixed: Wizard)
587
528
 
588
529
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
@@ -644,100 +585,78 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
644
585
 
645
586
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
646
587
  def with_attached_school_photo(*args); end
588
+ end
647
589
 
648
- sig { returns(Wizard::ActiveRecord_Relation) }
649
- def all; end
650
-
651
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
652
- def unscoped(&block); end
653
-
654
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
655
- def select(*args); end
656
-
657
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
658
- def order(*args); end
659
-
660
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
661
- def reorder(*args); end
662
-
663
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
664
- def group(*args); end
665
-
666
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
667
- def limit(*args); end
668
-
669
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
670
- def offset(*args); end
671
-
672
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
673
- def joins(*args); end
590
+ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
591
+ include Wizard::ActiveRelation_WhereNot
592
+ include Wizard::CustomFinderMethods
593
+ include Wizard::QueryMethodsReturningAssociationRelation
594
+ Elem = type_member(fixed: Wizard)
674
595
 
675
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
676
- def left_joins(*args); end
596
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
597
+ def Gryffindor(*args); end
677
598
 
678
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
679
- def left_outer_joins(*args); end
599
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
600
+ def Hagrid(*args); end
680
601
 
681
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
682
- def where(*args); end
602
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
603
+ def Hufflepuff(*args); end
683
604
 
684
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
685
- def rewhere(*args); end
605
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
606
+ def Ravenclaw(*args); end
686
607
 
687
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
688
- def preload(*args); end
608
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
609
+ def Slytherin(*args); end
689
610
 
690
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
691
- def eager_load(*args); end
611
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
612
+ def black_hair(*args); end
692
613
 
693
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
694
- def includes(*args); end
614
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
615
+ def blonde_hair(*args); end
695
616
 
696
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
697
- def from(*args); end
617
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
618
+ def broom_firebolt(*args); end
698
619
 
699
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
700
- def lock(*args); end
620
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
621
+ def broom_nimbus(*args); end
701
622
 
702
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
703
- def readonly(*args); end
623
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
624
+ def brown_hair(*args); end
704
625
 
705
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
706
- def or(*args); end
626
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
627
+ def color_blue_eyes(*args); end
707
628
 
708
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
709
- def having(*args); end
629
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
630
+ def color_brown_eyes(*args); end
710
631
 
711
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
712
- def create_with(*args); end
632
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
633
+ def color_green_eyes(*args); end
713
634
 
714
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
715
- def distinct(*args); end
635
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
636
+ def quidditch_beater(*args); end
716
637
 
717
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
718
- def references(*args); end
638
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
639
+ def quidditch_chaser(*args); end
719
640
 
720
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
721
- def none(*args); end
641
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
642
+ def quidditch_keeper(*args); end
722
643
 
723
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
724
- def unscope(*args); end
644
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
645
+ def quidditch_seeker(*args); end
725
646
 
726
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
727
- def merge(*args); end
647
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
648
+ def recent(*args); end
728
649
 
729
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
730
- def except(*args); end
650
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
651
+ def with_attached_hats(*args); end
731
652
 
732
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
733
- def extending(*args, &block); end
653
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
654
+ def with_attached_school_photo(*args); end
734
655
  end
735
656
 
736
- class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
737
- include Wizard::ActiveRelation_WhereNot
657
+ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
738
658
  include Wizard::CustomFinderMethods
739
- extend T::Sig
740
- extend T::Generic
659
+ include Wizard::QueryMethodsReturningAssociationRelation
741
660
  Elem = type_member(fixed: Wizard)
742
661
 
743
662
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
@@ -800,164 +719,125 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
800
719
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
801
720
  def with_attached_school_photo(*args); end
802
721
 
803
- sig { returns(Wizard::ActiveRecord_AssociationRelation) }
722
+ sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
723
+ def <<(*records); end
724
+
725
+ sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
726
+ def append(*records); end
727
+
728
+ sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
729
+ def push(*records); end
730
+
731
+ sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
732
+ def concat(*records); end
733
+ end
734
+
735
+ module Wizard::QueryMethodsReturningRelation
736
+ sig { returns(Wizard::ActiveRecord_Relation) }
804
737
  def all; end
805
738
 
806
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
739
+ sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
807
740
  def unscoped(&block); end
808
741
 
809
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
742
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
810
743
  def select(*args); end
811
744
 
812
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
745
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
813
746
  def order(*args); end
814
747
 
815
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
748
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
816
749
  def reorder(*args); end
817
750
 
818
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
751
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
819
752
  def group(*args); end
820
753
 
821
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
754
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
822
755
  def limit(*args); end
823
756
 
824
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
757
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
825
758
  def offset(*args); end
826
759
 
827
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
760
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
828
761
  def joins(*args); end
829
762
 
830
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
763
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
831
764
  def left_joins(*args); end
832
765
 
833
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
766
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
834
767
  def left_outer_joins(*args); end
835
768
 
836
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
769
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
837
770
  def where(*args); end
838
771
 
839
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
772
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
840
773
  def rewhere(*args); end
841
774
 
842
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
775
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
843
776
  def preload(*args); end
844
777
 
845
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
778
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
846
779
  def eager_load(*args); end
847
780
 
848
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
781
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
849
782
  def includes(*args); end
850
783
 
851
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
784
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
852
785
  def from(*args); end
853
786
 
854
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
787
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
855
788
  def lock(*args); end
856
789
 
857
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
790
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
858
791
  def readonly(*args); end
859
792
 
860
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
793
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
861
794
  def or(*args); end
862
795
 
863
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
796
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
864
797
  def having(*args); end
865
798
 
866
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
799
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
867
800
  def create_with(*args); end
868
801
 
869
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
802
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
870
803
  def distinct(*args); end
871
804
 
872
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
805
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
873
806
  def references(*args); end
874
807
 
875
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
808
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
876
809
  def none(*args); end
877
810
 
878
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
811
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
879
812
  def unscope(*args); end
880
813
 
881
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
814
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
882
815
  def merge(*args); end
883
816
 
884
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
817
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
885
818
  def except(*args); end
886
819
 
887
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
820
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
888
821
  def extending(*args, &block); end
889
- end
890
-
891
- class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
892
- include Wizard::CustomFinderMethods
893
- extend T::Sig
894
- extend T::Generic
895
- Elem = type_member(fixed: Wizard)
896
-
897
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
898
- def Gryffindor(*args); end
899
-
900
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
901
- def Hagrid(*args); end
902
-
903
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
904
- def Hufflepuff(*args); end
905
-
906
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
907
- def Ravenclaw(*args); end
908
-
909
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
910
- def Slytherin(*args); end
911
-
912
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
913
- def black_hair(*args); end
914
-
915
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
916
- def blonde_hair(*args); end
917
-
918
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
919
- def broom_firebolt(*args); end
920
-
921
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
922
- def broom_nimbus(*args); end
923
-
924
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
925
- def brown_hair(*args); end
926
-
927
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
928
- def color_blue_eyes(*args); end
929
-
930
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
931
- def color_brown_eyes(*args); end
932
-
933
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
934
- def color_green_eyes(*args); end
935
-
936
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
937
- def quidditch_beater(*args); end
938
-
939
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
940
- def quidditch_chaser(*args); end
941
-
942
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
943
- def quidditch_keeper(*args); end
944
-
945
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
946
- def quidditch_seeker(*args); end
947
-
948
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
949
- def recent(*args); end
950
-
951
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
952
- def with_attached_hats(*args); end
953
822
 
954
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
955
- def with_attached_school_photo(*args); end
823
+ sig do
824
+ params(
825
+ of: T.nilable(Integer),
826
+ start: T.nilable(Integer),
827
+ finish: T.nilable(Integer),
828
+ load: T.nilable(T::Boolean),
829
+ error_on_ignore: T.nilable(T::Boolean),
830
+ block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_Relation).void)
831
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
832
+ end
833
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
834
+ end
956
835
 
836
+ module Wizard::QueryMethodsReturningAssociationRelation
957
837
  sig { returns(Wizard::ActiveRecord_AssociationRelation) }
958
838
  def all; end
959
839
 
960
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
840
+ sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
961
841
  def unscoped(&block); end
962
842
 
963
843
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
@@ -1041,15 +921,15 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
1041
921
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
1042
922
  def extending(*args, &block); end
1043
923
 
1044
- sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
1045
- def <<(*records); end
1046
-
1047
- sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
1048
- def append(*records); end
1049
-
1050
- sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
1051
- def push(*records); end
1052
-
1053
- sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
1054
- def concat(*records); end
924
+ sig do
925
+ params(
926
+ of: T.nilable(Integer),
927
+ start: T.nilable(Integer),
928
+ finish: T.nilable(Integer),
929
+ load: T.nilable(T::Boolean),
930
+ error_on_ignore: T.nilable(T::Boolean),
931
+ block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_AssociationRelation).void)
932
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
933
+ end
934
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
1055
935
  end