sorbet-rails 0.6.5 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +1 -2
  3. data/.gitignore +2 -1
  4. data/.travis.yml +1 -1
  5. data/README.md +60 -11
  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 +2 -2
  12. data/lib/sorbet-rails/config.rb +12 -0
  13. data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +3 -0
  14. data/lib/sorbet-rails/deprecation.rb +1 -0
  15. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
  16. data/lib/sorbet-rails/helper_rbi_formatter.rb +1 -1
  17. data/lib/sorbet-rails/job_rbi_formatter.rb +75 -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 +40 -1
  21. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +12 -112
  22. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +2 -2
  23. data/lib/sorbet-rails/model_plugins/active_record_serialized_attribute.rb +68 -0
  24. data/lib/sorbet-rails/model_plugins/base.rb +6 -8
  25. data/lib/sorbet-rails/model_plugins/plugins.rb +3 -0
  26. data/lib/sorbet-rails/model_rbi_formatter.rb +3 -3
  27. data/lib/sorbet-rails/model_utils.rb +5 -2
  28. data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
  29. data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +54 -7
  30. data/lib/sorbet-rails/railtie.rb +0 -2
  31. data/lib/sorbet-rails/routes_rbi_formatter.rb +6 -2
  32. data/lib/sorbet-rails/sorbet_utils.rb +152 -150
  33. data/lib/sorbet-rails/tasks/rails_rbi.rake +9 -8
  34. data/sorbet-rails.gemspec +2 -2
  35. data/spec/bin/run_spec.sh +1 -1
  36. data/spec/generators/rails-template.rb +16 -0
  37. data/spec/generators/sorbet_test_cases.rb +29 -57
  38. data/spec/job_rbi_formatter_spec.rb +1 -1
  39. data/spec/pluck_to_tstruct_spec.rb +115 -16
  40. data/spec/rails_helper.rb +2 -2
  41. data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
  42. data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
  43. data/spec/sorbet_spec.rb +5 -5
  44. data/spec/support/v5.0/Gemfile +1 -1
  45. data/spec/support/v5.0/Gemfile.lock +15 -14
  46. data/spec/support/v5.0/app/controllers/application_controller.rb +1 -1
  47. data/spec/support/v5.0/app/models/headmaster.rb +1 -1
  48. data/spec/support/v5.0/app/models/potion.rb +1 -1
  49. data/spec/support/v5.0/app/models/robe.rb +1 -1
  50. data/spec/support/v5.0/app/models/school.rb +1 -1
  51. data/spec/support/v5.0/app/models/spell.rb +1 -1
  52. data/spec/support/v5.0/app/models/subject.rb +1 -1
  53. data/spec/support/v5.0/app/models/wizard.rb +5 -0
  54. data/spec/support/v5.0/config/environments/development.rb +1 -1
  55. data/spec/support/v5.0/config/environments/production.rb +1 -1
  56. data/spec/support/v5.0/config/environments/test.rb +1 -1
  57. data/spec/support/v5.0/config/initializers/wrap_parameters.rb +1 -1
  58. data/spec/support/v5.0/config/routes.rb +1 -1
  59. data/spec/support/v5.0/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  60. data/spec/support/v5.0/db/schema.rb +8 -4
  61. data/spec/support/v5.0/sorbet_test_cases.rb +29 -57
  62. data/spec/support/v5.1/Gemfile.lock +13 -12
  63. data/spec/support/v5.1/app/controllers/application_controller.rb +1 -1
  64. data/spec/support/v5.1/app/models/headmaster.rb +1 -1
  65. data/spec/support/v5.1/app/models/school.rb +1 -1
  66. data/spec/support/v5.1/app/models/wizard.rb +5 -0
  67. data/spec/support/v5.1/config/environments/production.rb +1 -1
  68. data/spec/support/v5.1/config/initializers/wrap_parameters.rb +1 -1
  69. data/spec/support/v5.1/config/routes.rb +1 -1
  70. data/spec/support/v5.1/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  71. data/spec/support/v5.1/db/schema.rb +5 -1
  72. data/spec/support/v5.1/sorbet_test_cases.rb +29 -57
  73. data/spec/support/v5.2/Gemfile +1 -1
  74. data/spec/support/v5.2/Gemfile.lock +15 -14
  75. data/spec/support/v5.2/app/models/headmaster.rb +1 -1
  76. data/spec/support/v5.2/app/models/school.rb +1 -1
  77. data/spec/support/v5.2/app/models/wizard.rb +5 -0
  78. data/spec/support/v5.2/config/environments/development.rb +1 -1
  79. data/spec/support/v5.2/config/environments/production.rb +1 -1
  80. data/spec/support/v5.2/config/environments/test.rb +1 -1
  81. data/spec/support/v5.2/config/initializers/wrap_parameters.rb +1 -1
  82. data/spec/support/v5.2/config/routes.rb +1 -1
  83. data/spec/support/v5.2/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  84. data/spec/support/v5.2/db/schema.rb +5 -1
  85. data/spec/support/v5.2/sorbet_test_cases.rb +29 -57
  86. data/spec/support/v6.0/.gitignore +6 -0
  87. data/spec/support/v6.0/Gemfile +3 -3
  88. data/spec/support/v6.0/Gemfile.lock +82 -80
  89. data/spec/support/v6.0/app/models/wizard.rb +5 -0
  90. data/spec/support/v6.0/bin/bundle +22 -13
  91. data/spec/support/v6.0/config/environments/development.rb +1 -1
  92. data/spec/support/v6.0/config/environments/production.rb +1 -1
  93. data/spec/support/v6.0/config/environments/test.rb +2 -2
  94. data/spec/support/v6.0/config/routes.rb +1 -1
  95. data/spec/support/v6.0/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  96. data/spec/support/v6.0/db/schema.rb +5 -1
  97. data/spec/support/v6.0/sorbet_test_cases.rb +29 -57
  98. data/spec/support/v6.0/tmp/pids/.keep +0 -0
  99. data/spec/test_data/v5.0/expected_application_job.rbi +2 -2
  100. data/spec/test_data/v5.0/expected_award_house_point_hourglasses.rbi +2 -2
  101. data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
  102. data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
  103. data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  104. data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  105. data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  106. data/spec/test_data/v5.0/expected_headmaster.rbi +26 -2
  107. data/spec/test_data/v5.0/expected_internal_metadata.rbi +2 -2
  108. data/spec/test_data/v5.0/expected_potion.rbi +14 -2
  109. data/spec/test_data/v5.0/expected_robe.rbi +14 -2
  110. data/spec/test_data/v5.0/expected_routes.rbi +4 -0
  111. data/spec/test_data/v5.0/expected_schema_migration.rbi +2 -2
  112. data/spec/test_data/v5.0/expected_school.rbi +14 -2
  113. data/spec/test_data/v5.0/expected_spell.rbi +2 -2
  114. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +26 -2
  115. data/spec/test_data/v5.0/expected_spell_book.rbi +23 -11
  116. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +26 -2
  117. data/spec/test_data/v5.0/expected_squib.rbi +65 -2
  118. data/spec/test_data/v5.0/expected_subject.rbi +2 -2
  119. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +26 -2
  120. data/spec/test_data/v5.0/expected_wand.rbi +24 -12
  121. data/spec/test_data/v5.0/expected_wizard.rbi +123 -60
  122. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +26 -2
  123. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +123 -60
  124. data/spec/test_data/v5.1/expected_application_job.rbi +2 -2
  125. data/spec/test_data/v5.1/expected_award_house_point_hourglasses.rbi +2 -2
  126. data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
  127. data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
  128. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
  129. data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
  130. data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  131. data/spec/test_data/v5.1/expected_headmaster.rbi +26 -2
  132. data/spec/test_data/v5.1/expected_internal_metadata.rbi +2 -2
  133. data/spec/test_data/v5.1/expected_potion.rbi +14 -2
  134. data/spec/test_data/v5.1/expected_robe.rbi +14 -2
  135. data/spec/test_data/v5.1/expected_routes.rbi +4 -0
  136. data/spec/test_data/v5.1/expected_schema_migration.rbi +2 -2
  137. data/spec/test_data/v5.1/expected_school.rbi +14 -2
  138. data/spec/test_data/v5.1/expected_spell.rbi +2 -2
  139. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +26 -2
  140. data/spec/test_data/v5.1/expected_spell_book.rbi +23 -11
  141. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +26 -2
  142. data/spec/test_data/v5.1/expected_squib.rbi +65 -2
  143. data/spec/test_data/v5.1/expected_subject.rbi +2 -2
  144. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +26 -2
  145. data/spec/test_data/v5.1/expected_wand.rbi +24 -12
  146. data/spec/test_data/v5.1/expected_wizard.rbi +123 -60
  147. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +26 -2
  148. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +123 -60
  149. data/spec/test_data/v5.2/expected_application_job.rbi +2 -2
  150. data/spec/test_data/v5.2/expected_attachment.rbi +26 -2
  151. data/spec/test_data/v5.2/expected_award_house_point_hourglasses.rbi +2 -2
  152. data/spec/test_data/v5.2/expected_blob.rbi +27 -3
  153. data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
  154. data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
  155. data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
  156. data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
  157. data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  158. data/spec/test_data/v5.2/expected_headmaster.rbi +26 -2
  159. data/spec/test_data/v5.2/expected_internal_metadata.rbi +2 -2
  160. data/spec/test_data/v5.2/expected_potion.rbi +14 -2
  161. data/spec/test_data/v5.2/expected_robe.rbi +14 -2
  162. data/spec/test_data/v5.2/expected_routes.rbi +4 -0
  163. data/spec/test_data/v5.2/expected_schema_migration.rbi +2 -2
  164. data/spec/test_data/v5.2/expected_school.rbi +14 -2
  165. data/spec/test_data/v5.2/expected_spell.rbi +2 -2
  166. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +26 -2
  167. data/spec/test_data/v5.2/expected_spell_book.rbi +23 -11
  168. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +26 -2
  169. data/spec/test_data/v5.2/expected_squib.rbi +91 -4
  170. data/spec/test_data/v5.2/expected_subject.rbi +2 -2
  171. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +26 -2
  172. data/spec/test_data/v5.2/expected_wand.rbi +24 -12
  173. data/spec/test_data/v5.2/expected_wizard.rbi +149 -62
  174. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +26 -2
  175. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +149 -62
  176. data/spec/test_data/v6.0/expected_application_job.rbi +2 -2
  177. data/spec/test_data/v6.0/expected_attachment.rbi +26 -2
  178. data/spec/test_data/v6.0/expected_award_house_point_hourglasses.rbi +2 -2
  179. data/spec/test_data/v6.0/expected_blob.rbi +27 -3
  180. data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
  181. data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
  182. data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  183. data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  184. data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  185. data/spec/test_data/v6.0/expected_headmaster.rbi +26 -2
  186. data/spec/test_data/v6.0/expected_internal_metadata.rbi +2 -2
  187. data/spec/test_data/v6.0/expected_potion.rbi +14 -2
  188. data/spec/test_data/v6.0/expected_robe.rbi +14 -2
  189. data/spec/test_data/v6.0/expected_routes.rbi +4 -0
  190. data/spec/test_data/v6.0/expected_schema_migration.rbi +2 -2
  191. data/spec/test_data/v6.0/expected_school.rbi +14 -2
  192. data/spec/test_data/v6.0/expected_spell.rbi +2 -2
  193. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +26 -2
  194. data/spec/test_data/v6.0/expected_spell_book.rbi +23 -11
  195. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +26 -2
  196. data/spec/test_data/v6.0/expected_squib.rbi +91 -4
  197. data/spec/test_data/v6.0/expected_subject.rbi +2 -2
  198. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +26 -2
  199. data/spec/test_data/v6.0/expected_wand.rbi +24 -12
  200. data/spec/test_data/v6.0/expected_wizard.rbi +149 -62
  201. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +26 -2
  202. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +149 -62
  203. data/spec/tstruct_comparable.rb +13 -0
  204. metadata +61 -15
  205. data/lib/bundled_rbi/parameters.rbi +0 -28
  206. data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -42
  207. data/lib/sorbet-rails/custom_types/integer_string.rb +0 -45
  208. data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -57
  209. data/spec/boolean_string_spec.rb +0 -59
  210. data/spec/custom_params_methods_spec.rb +0 -138
  211. data/spec/integer_string_spec.rb +0 -46
@@ -31,14 +31,38 @@ module SpellBook::HABTM_Spells::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::SpellBook)) }
32
32
  def left_side; end
33
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
+
34
43
  sig { params(value: T.nilable(::SpellBook)).void }
35
44
  def left_side=(value); end
36
45
 
46
+ sig { returns(T.nilable(::SpellBook)) }
47
+ def reload_left_side; end
48
+
37
49
  sig { returns(::Spell) }
38
50
  def spell; end
39
51
 
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
53
+ def build_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
+
58
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
59
+ def create_spell!(*args, &block); end
60
+
40
61
  sig { params(value: ::Spell).void }
41
62
  def spell=(value); end
63
+
64
+ sig { returns(::Spell) }
65
+ def reload_spell; end
42
66
  end
43
67
 
44
68
  module SpellBook::HABTM_Spells::CustomFinderMethods
@@ -159,7 +183,7 @@ module SpellBook::HABTM_Spells::QueryMethodsReturningRelation
159
183
  load: T.nilable(T::Boolean),
160
184
  error_on_ignore: T.nilable(T::Boolean),
161
185
  block: T.nilable(T.proc.params(e: SpellBook::HABTM_Spells::ActiveRecord_Relation).void)
162
- ).returns(T::Enumerable[SpellBook::HABTM_Spells::ActiveRecord_Relation])
186
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
163
187
  end
164
188
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
165
189
  end
@@ -257,7 +281,7 @@ module SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
257
281
  load: T.nilable(T::Boolean),
258
282
  error_on_ignore: T.nilable(T::Boolean),
259
283
  block: T.nilable(T.proc.params(e: SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation).void)
260
- ).returns(T::Enumerable[SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation])
284
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
261
285
  end
262
286
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
263
287
  end
@@ -111,6 +111,44 @@ module Squib::ActiveRelation_WhereNot
111
111
  def not(opts, *rest); end
112
112
  end
113
113
 
114
+ module Squib::GeneratedSerializedAttributeMethods
115
+ sig { returns(T.nilable(T.any(T::Array[T.untyped], T::Boolean, Float, T::Hash[T.untyped, T.untyped], Integer, String))) }
116
+ def newt_subjects; end
117
+
118
+ sig { params(value: T.nilable(T.any(T::Array[T.untyped], T::Boolean, Float, T::Hash[T.untyped, T.untyped], Integer, String))).void }
119
+ def newt_subjects=(value); end
120
+
121
+ sig { returns(T::Boolean) }
122
+ def newt_subjects?; end
123
+
124
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
125
+ def owl_results; end
126
+
127
+ sig { params(value: T.nilable(T::Hash[T.untyped, T.untyped])).void }
128
+ def owl_results=(value); end
129
+
130
+ sig { returns(T::Boolean) }
131
+ def owl_results?; end
132
+
133
+ sig { returns(T.nilable(T.any(T::Array[T.untyped], T::Boolean, Float, T::Hash[T.untyped, T.untyped], Integer, String))) }
134
+ def patronus_characteristics; end
135
+
136
+ sig { params(value: T.nilable(T.any(T::Array[T.untyped], T::Boolean, Float, T::Hash[T.untyped, T.untyped], Integer, String))).void }
137
+ def patronus_characteristics=(value); end
138
+
139
+ sig { returns(T::Boolean) }
140
+ def patronus_characteristics?; end
141
+
142
+ sig { returns(T.nilable(T::Array[T.untyped])) }
143
+ def pets; end
144
+
145
+ sig { params(value: T.nilable(T::Array[T.untyped])).void }
146
+ def pets=(value); end
147
+
148
+ sig { returns(T::Boolean) }
149
+ def pets?; end
150
+ end
151
+
114
152
  module Squib::GeneratedAttributeMethods
115
153
  sig { returns(T.nilable(String)) }
116
154
  def broom; end
@@ -252,9 +290,21 @@ module Squib::GeneratedAssociationMethods
252
290
  sig { returns(T.nilable(::School)) }
253
291
  def school; end
254
292
 
293
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
294
+ def build_school(*args, &block); end
295
+
296
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
297
+ def create_school(*args, &block); end
298
+
299
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
300
+ def create_school!(*args, &block); end
301
+
255
302
  sig { params(value: T.nilable(::School)).void }
256
303
  def school=(value); end
257
304
 
305
+ sig { returns(T.nilable(::School)) }
306
+ def reload_school; end
307
+
258
308
  sig { returns(::SpellBook::ActiveRecord_Associations_CollectionProxy) }
259
309
  def spell_books; end
260
310
 
@@ -276,8 +326,20 @@ module Squib::GeneratedAssociationMethods
276
326
  sig { returns(T.nilable(::Wand)) }
277
327
  def wand; end
278
328
 
329
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
330
+ def build_wand(*args, &block); end
331
+
332
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
333
+ def create_wand(*args, &block); end
334
+
335
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
336
+ def create_wand!(*args, &block); end
337
+
279
338
  sig { params(value: T.nilable(::Wand)).void }
280
339
  def wand=(value); end
340
+
341
+ sig { returns(T.nilable(::Wand)) }
342
+ def reload_wand; end
281
343
  end
282
344
 
283
345
  module Squib::CustomFinderMethods
@@ -299,6 +361,7 @@ end
299
361
 
300
362
  class Squib < Wizard
301
363
  include Squib::EnumInstanceMethods
364
+ include Squib::GeneratedSerializedAttributeMethods
302
365
  include Squib::GeneratedAttributeMethods
303
366
  include Squib::GeneratedAssociationMethods
304
367
  extend Squib::CustomFinderMethods
@@ -665,7 +728,7 @@ module Squib::QueryMethodsReturningRelation
665
728
  load: T.nilable(T::Boolean),
666
729
  error_on_ignore: T.nilable(T::Boolean),
667
730
  block: T.nilable(T.proc.params(e: Squib::ActiveRecord_Relation).void)
668
- ).returns(T::Enumerable[Squib::ActiveRecord_Relation])
731
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
669
732
  end
670
733
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
671
734
  end
@@ -763,7 +826,7 @@ module Squib::QueryMethodsReturningAssociationRelation
763
826
  load: T.nilable(T::Boolean),
764
827
  error_on_ignore: T.nilable(T::Boolean),
765
828
  block: T.nilable(T.proc.params(e: Squib::ActiveRecord_AssociationRelation).void)
766
- ).returns(T::Enumerable[Squib::ActiveRecord_AssociationRelation])
829
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
767
830
  end
768
831
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
769
832
  end
@@ -156,7 +156,7 @@ module Subject::QueryMethodsReturningRelation
156
156
  load: T.nilable(T::Boolean),
157
157
  error_on_ignore: T.nilable(T::Boolean),
158
158
  block: T.nilable(T.proc.params(e: Subject::ActiveRecord_Relation).void)
159
- ).returns(T::Enumerable[Subject::ActiveRecord_Relation])
159
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
160
160
  end
161
161
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
162
162
  end
@@ -254,7 +254,7 @@ module Subject::QueryMethodsReturningAssociationRelation
254
254
  load: T.nilable(T::Boolean),
255
255
  error_on_ignore: T.nilable(T::Boolean),
256
256
  block: T.nilable(T.proc.params(e: Subject::ActiveRecord_AssociationRelation).void)
257
- ).returns(T::Enumerable[Subject::ActiveRecord_AssociationRelation])
257
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
258
258
  end
259
259
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
260
260
  end
@@ -31,14 +31,38 @@ module Subject::HABTM_Wizards::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::Subject)) }
32
32
  def left_side; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
35
+ def build_left_side(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
38
+ def create_left_side(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
41
+ def create_left_side!(*args, &block); end
42
+
34
43
  sig { params(value: T.nilable(::Subject)).void }
35
44
  def left_side=(value); end
36
45
 
46
+ sig { returns(T.nilable(::Subject)) }
47
+ def reload_left_side; end
48
+
37
49
  sig { returns(T.nilable(::Wizard)) }
38
50
  def wizard; end
39
51
 
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
53
+ def build_wizard(*args, &block); end
54
+
55
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
56
+ def create_wizard(*args, &block); end
57
+
58
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
59
+ def create_wizard!(*args, &block); end
60
+
40
61
  sig { params(value: T.nilable(::Wizard)).void }
41
62
  def wizard=(value); end
63
+
64
+ sig { returns(T.nilable(::Wizard)) }
65
+ def reload_wizard; end
42
66
  end
43
67
 
44
68
  module Subject::HABTM_Wizards::CustomFinderMethods
@@ -159,7 +183,7 @@ module Subject::HABTM_Wizards::QueryMethodsReturningRelation
159
183
  load: T.nilable(T::Boolean),
160
184
  error_on_ignore: T.nilable(T::Boolean),
161
185
  block: T.nilable(T.proc.params(e: Subject::HABTM_Wizards::ActiveRecord_Relation).void)
162
- ).returns(T::Enumerable[Subject::HABTM_Wizards::ActiveRecord_Relation])
186
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
163
187
  end
164
188
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
165
189
  end
@@ -257,7 +281,7 @@ module Subject::HABTM_Wizards::QueryMethodsReturningAssociationRelation
257
281
  load: T.nilable(T::Boolean),
258
282
  error_on_ignore: T.nilable(T::Boolean),
259
283
  block: T.nilable(T.proc.params(e: Subject::HABTM_Wizards::ActiveRecord_AssociationRelation).void)
260
- ).returns(T::Enumerable[Subject::HABTM_Wizards::ActiveRecord_AssociationRelation])
284
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
261
285
  end
262
286
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
263
287
  end
@@ -152,22 +152,24 @@ module Wand::GeneratedAttributeMethods
152
152
  def wood_type?; end
153
153
  end
154
154
 
155
- class Wand::CoreType < T::Enum
156
- enums do
157
- PhoenixFeather = new(%q{phoenix_feather})
158
- DragonHeartstring = new(%q{dragon_heartstring})
159
- UnicornTailHair = new(%q{unicorn_tail_hair})
160
- BasiliskHorn = new(%q{basilisk_horn})
161
- end
162
-
163
- end
164
-
165
155
  module Wand::GeneratedAssociationMethods
166
156
  sig { returns(::Wizard) }
167
157
  def wizard; end
168
158
 
159
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
160
+ def build_wizard(*args, &block); end
161
+
162
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
163
+ def create_wizard(*args, &block); end
164
+
165
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
166
+ def create_wizard!(*args, &block); end
167
+
169
168
  sig { params(value: ::Wizard).void }
170
169
  def wizard=(value); end
170
+
171
+ sig { returns(::Wizard) }
172
+ def reload_wizard; end
171
173
  end
172
174
 
173
175
  module Wand::CustomFinderMethods
@@ -216,6 +218,16 @@ class Wand < ApplicationRecord
216
218
  sig { params(value: T.nilable(Wand::CoreType)).void }
217
219
  def typed_core_type=(value); end
218
220
 
221
+ class CoreType < T::Enum
222
+ enums do
223
+ PhoenixFeather = new(%q{phoenix_feather})
224
+ DragonHeartstring = new(%q{dragon_heartstring})
225
+ UnicornTailHair = new(%q{unicorn_tail_hair})
226
+ BasiliskHorn = new(%q{basilisk_horn})
227
+ end
228
+
229
+ end
230
+
219
231
  sig { returns(T::Array[Wand]) }
220
232
  def self.mythicals; end
221
233
  end
@@ -381,7 +393,7 @@ module Wand::QueryMethodsReturningRelation
381
393
  load: T.nilable(T::Boolean),
382
394
  error_on_ignore: T.nilable(T::Boolean),
383
395
  block: T.nilable(T.proc.params(e: Wand::ActiveRecord_Relation).void)
384
- ).returns(T::Enumerable[Wand::ActiveRecord_Relation])
396
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
385
397
  end
386
398
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
387
399
  end
@@ -479,7 +491,7 @@ module Wand::QueryMethodsReturningAssociationRelation
479
491
  load: T.nilable(T::Boolean),
480
492
  error_on_ignore: T.nilable(T::Boolean),
481
493
  block: T.nilable(T.proc.params(e: Wand::ActiveRecord_AssociationRelation).void)
482
- ).returns(T::Enumerable[Wand::ActiveRecord_AssociationRelation])
494
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
483
495
  end
484
496
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
485
497
  end
@@ -111,6 +111,44 @@ module Wizard::ActiveRelation_WhereNot
111
111
  def not(opts, *rest); end
112
112
  end
113
113
 
114
+ module Wizard::GeneratedSerializedAttributeMethods
115
+ sig { returns(T.nilable(T.any(T::Array[T.untyped], T::Boolean, Float, T::Hash[T.untyped, T.untyped], Integer, String))) }
116
+ def newt_subjects; end
117
+
118
+ sig { params(value: T.nilable(T.any(T::Array[T.untyped], T::Boolean, Float, T::Hash[T.untyped, T.untyped], Integer, String))).void }
119
+ def newt_subjects=(value); end
120
+
121
+ sig { returns(T::Boolean) }
122
+ def newt_subjects?; end
123
+
124
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
125
+ def owl_results; end
126
+
127
+ sig { params(value: T.nilable(T::Hash[T.untyped, T.untyped])).void }
128
+ def owl_results=(value); end
129
+
130
+ sig { returns(T::Boolean) }
131
+ def owl_results?; end
132
+
133
+ sig { returns(T.nilable(T.any(T::Array[T.untyped], T::Boolean, Float, T::Hash[T.untyped, T.untyped], Integer, String))) }
134
+ def patronus_characteristics; end
135
+
136
+ sig { params(value: T.nilable(T.any(T::Array[T.untyped], T::Boolean, Float, T::Hash[T.untyped, T.untyped], Integer, String))).void }
137
+ def patronus_characteristics=(value); end
138
+
139
+ sig { returns(T::Boolean) }
140
+ def patronus_characteristics?; end
141
+
142
+ sig { returns(T.nilable(T::Array[T.untyped])) }
143
+ def pets; end
144
+
145
+ sig { params(value: T.nilable(T::Array[T.untyped])).void }
146
+ def pets=(value); end
147
+
148
+ sig { returns(T::Boolean) }
149
+ def pets?; end
150
+ end
151
+
114
152
  module Wizard::GeneratedAttributeMethods
115
153
  sig { returns(T::Boolean) }
116
154
  def broom?; end
@@ -230,71 +268,25 @@ module Wizard::GeneratedAttributeMethods
230
268
  def updated_at?; end
231
269
  end
232
270
 
233
- class Wizard::Broom < T::Enum
234
- enums do
235
- Nimbus = new(%q{nimbus})
236
- Firebolt = new(%q{firebolt})
237
- end
238
-
239
- end
240
-
241
- class Wizard::EyeColor < T::Enum
242
- enums do
243
- Brown = new(%q{brown})
244
- Green = new(%q{green})
245
- Blue = new(%q{blue})
246
- end
247
-
248
- end
249
-
250
- class Wizard::HairColor < T::Enum
251
- enums do
252
- Brown = new(%q{brown})
253
- Black = new(%q{black})
254
- Blonde = new(%q{blonde})
255
- end
256
-
257
- end
258
-
259
- class Wizard::House < T::Enum
260
- enums do
261
- Gryffindor = new(%q{Gryffindor})
262
- Hufflepuff = new(%q{Hufflepuff})
263
- Ravenclaw = new(%q{Ravenclaw})
264
- Slytherin = new(%q{Slytherin})
265
- end
266
-
267
- end
268
-
269
- class Wizard::ProfessorEnum < T::Enum
270
- enums do
271
- SeverusSnape = new(%q{Severus Snape})
272
- MinervaMcGonagall = new(%q{Minerva McGonagall})
273
- PomonaSprout = new(%q{Pomona Sprout})
274
- FiliusFlitwick = new(%q{Filius Flitwick})
275
- Hagrid = new(%q{Hagrid})
276
- AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
277
- end
278
-
279
- end
280
-
281
- class Wizard::QuidditchPosition < T::Enum
282
- enums do
283
- Keeper = new(%q{keeper})
284
- Seeker = new(%q{seeker})
285
- Beater = new(%q{beater})
286
- Chaser = new(%q{chaser})
287
- end
288
-
289
- end
290
-
291
271
  module Wizard::GeneratedAssociationMethods
292
272
  sig { returns(T.nilable(::School)) }
293
273
  def school; end
294
274
 
275
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
276
+ def build_school(*args, &block); end
277
+
278
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
279
+ def create_school(*args, &block); end
280
+
281
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
282
+ def create_school!(*args, &block); end
283
+
295
284
  sig { params(value: T.nilable(::School)).void }
296
285
  def school=(value); end
297
286
 
287
+ sig { returns(T.nilable(::School)) }
288
+ def reload_school; end
289
+
298
290
  sig { returns(::SpellBook::ActiveRecord_Associations_CollectionProxy) }
299
291
  def spell_books; end
300
292
 
@@ -316,8 +308,20 @@ module Wizard::GeneratedAssociationMethods
316
308
  sig { returns(T.nilable(::Wand)) }
317
309
  def wand; end
318
310
 
311
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
312
+ def build_wand(*args, &block); end
313
+
314
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
315
+ def create_wand(*args, &block); end
316
+
317
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
318
+ def create_wand!(*args, &block); end
319
+
319
320
  sig { params(value: T.nilable(::Wand)).void }
320
321
  def wand=(value); end
322
+
323
+ sig { returns(T.nilable(::Wand)) }
324
+ def reload_wand; end
321
325
  end
322
326
 
323
327
  module Wizard::CustomFinderMethods
@@ -339,6 +343,7 @@ end
339
343
 
340
344
  class Wizard < ApplicationRecord
341
345
  include Wizard::EnumInstanceMethods
346
+ include Wizard::GeneratedSerializedAttributeMethods
342
347
  include Wizard::GeneratedAttributeMethods
343
348
  include Wizard::GeneratedAssociationMethods
344
349
  extend Wizard::CustomFinderMethods
@@ -452,6 +457,64 @@ class Wizard < ApplicationRecord
452
457
 
453
458
  sig { params(value: T.nilable(Wizard::QuidditchPosition)).void }
454
459
  def typed_quidditch_position=(value); end
460
+
461
+ class Broom < T::Enum
462
+ enums do
463
+ Nimbus = new(%q{nimbus})
464
+ Firebolt = new(%q{firebolt})
465
+ end
466
+
467
+ end
468
+
469
+ class EyeColor < T::Enum
470
+ enums do
471
+ Brown = new(%q{brown})
472
+ Green = new(%q{green})
473
+ Blue = new(%q{blue})
474
+ end
475
+
476
+ end
477
+
478
+ class HairColor < T::Enum
479
+ enums do
480
+ Brown = new(%q{brown})
481
+ Black = new(%q{black})
482
+ Blonde = new(%q{blonde})
483
+ end
484
+
485
+ end
486
+
487
+ class House < T::Enum
488
+ enums do
489
+ Gryffindor = new(%q{Gryffindor})
490
+ Hufflepuff = new(%q{Hufflepuff})
491
+ Ravenclaw = new(%q{Ravenclaw})
492
+ Slytherin = new(%q{Slytherin})
493
+ end
494
+
495
+ end
496
+
497
+ class ProfessorEnum < T::Enum
498
+ enums do
499
+ SeverusSnape = new(%q{Severus Snape})
500
+ MinervaMcGonagall = new(%q{Minerva McGonagall})
501
+ PomonaSprout = new(%q{Pomona Sprout})
502
+ FiliusFlitwick = new(%q{Filius Flitwick})
503
+ Hagrid = new(%q{Hagrid})
504
+ AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
505
+ end
506
+
507
+ end
508
+
509
+ class QuidditchPosition < T::Enum
510
+ enums do
511
+ Keeper = new(%q{keeper})
512
+ Seeker = new(%q{seeker})
513
+ Beater = new(%q{beater})
514
+ Chaser = new(%q{chaser})
515
+ end
516
+
517
+ end
455
518
  end
456
519
 
457
520
  class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
@@ -741,7 +804,7 @@ module Wizard::QueryMethodsReturningRelation
741
804
  load: T.nilable(T::Boolean),
742
805
  error_on_ignore: T.nilable(T::Boolean),
743
806
  block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_Relation).void)
744
- ).returns(T::Enumerable[Wizard::ActiveRecord_Relation])
807
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
745
808
  end
746
809
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
747
810
  end
@@ -839,7 +902,7 @@ module Wizard::QueryMethodsReturningAssociationRelation
839
902
  load: T.nilable(T::Boolean),
840
903
  error_on_ignore: T.nilable(T::Boolean),
841
904
  block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_AssociationRelation).void)
842
- ).returns(T::Enumerable[Wizard::ActiveRecord_AssociationRelation])
905
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
843
906
  end
844
907
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
845
908
  end