sorbet-rails 0.6.5.1 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) 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 +66 -13
  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 +6 -6
  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/dependent_gem_rbis/parlour.rbi +1896 -0
  15. data/lib/sorbet-rails/deprecation.rb +1 -0
  16. data/lib/sorbet-rails/gem_plugins/attr_json_plugin.rb +137 -0
  17. data/lib/sorbet-rails/gem_plugins/flag_shih_tzu_plugin.rb +201 -0
  18. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +28 -0
  19. data/lib/sorbet-rails/gem_plugins/shrine_plugin.rb +1 -1
  20. data/lib/sorbet-rails/helper_rbi_formatter.rb +1 -1
  21. data/lib/sorbet-rails/job_rbi_formatter.rb +75 -62
  22. data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
  23. data/lib/sorbet-rails/model_column_utils.rb +129 -0
  24. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +40 -1
  25. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +12 -112
  26. data/lib/sorbet-rails/model_plugins/active_record_serialized_attribute.rb +68 -0
  27. data/lib/sorbet-rails/model_plugins/base.rb +6 -8
  28. data/lib/sorbet-rails/model_plugins/plugins.rb +9 -0
  29. data/lib/sorbet-rails/model_rbi_formatter.rb +3 -3
  30. data/lib/sorbet-rails/model_utils.rb +5 -2
  31. data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
  32. data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +54 -7
  33. data/lib/sorbet-rails/railtie.rb +0 -2
  34. data/lib/sorbet-rails/routes_rbi_formatter.rb +6 -2
  35. data/lib/sorbet-rails/sorbet_utils.rb +152 -150
  36. data/lib/sorbet-rails/tasks/rails_rbi.rake +9 -8
  37. data/sorbet-rails.gemspec +2 -2
  38. data/spec/bin/run_spec.sh +1 -1
  39. data/spec/generators/rails-template.rb +16 -0
  40. data/spec/generators/sorbet_test_cases.rb +28 -56
  41. data/spec/job_rbi_formatter_spec.rb +1 -1
  42. data/spec/pluck_to_tstruct_spec.rb +115 -16
  43. data/spec/rails_helper.rb +3 -7
  44. data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
  45. data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
  46. data/spec/sorbet_spec.rb +5 -5
  47. data/spec/support/v5.0/Gemfile +1 -1
  48. data/spec/support/v5.0/Gemfile.lock +23 -19
  49. data/spec/support/v5.0/app/controllers/application_controller.rb +1 -1
  50. data/spec/support/v5.0/app/models/headmaster.rb +1 -1
  51. data/spec/support/v5.0/app/models/potion.rb +1 -1
  52. data/spec/support/v5.0/app/models/robe.rb +1 -1
  53. data/spec/support/v5.0/app/models/school.rb +1 -1
  54. data/spec/support/v5.0/app/models/spell.rb +1 -1
  55. data/spec/support/v5.0/app/models/subject.rb +1 -1
  56. data/spec/support/v5.0/app/models/wizard.rb +5 -0
  57. data/spec/support/v5.0/config/environments/development.rb +1 -1
  58. data/spec/support/v5.0/config/environments/production.rb +1 -1
  59. data/spec/support/v5.0/config/environments/test.rb +1 -1
  60. data/spec/support/v5.0/config/routes.rb +1 -1
  61. data/spec/support/v5.0/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  62. data/spec/support/v5.0/db/schema.rb +8 -4
  63. data/spec/support/v5.0/sorbet_test_cases.rb +28 -56
  64. data/spec/support/v5.1/Gemfile.lock +21 -17
  65. data/spec/support/v5.1/app/controllers/application_controller.rb +1 -1
  66. data/spec/support/v5.1/app/models/headmaster.rb +1 -1
  67. data/spec/support/v5.1/app/models/school.rb +1 -1
  68. data/spec/support/v5.1/app/models/wizard.rb +5 -0
  69. data/spec/support/v5.1/config/environments/production.rb +1 -1
  70. data/spec/support/v5.1/config/routes.rb +1 -1
  71. data/spec/support/v5.1/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  72. data/spec/support/v5.1/db/schema.rb +5 -1
  73. data/spec/support/v5.1/sorbet_test_cases.rb +28 -56
  74. data/spec/support/v5.2/Gemfile +1 -1
  75. data/spec/support/v5.2/Gemfile.lock +23 -19
  76. data/spec/support/v5.2/app/models/headmaster.rb +1 -1
  77. data/spec/support/v5.2/app/models/school.rb +1 -1
  78. data/spec/support/v5.2/app/models/wizard.rb +5 -0
  79. data/spec/support/v5.2/config/environments/development.rb +1 -1
  80. data/spec/support/v5.2/config/environments/production.rb +1 -1
  81. data/spec/support/v5.2/config/environments/test.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 +28 -56
  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 +89 -84
  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 +28 -56
  98. data/spec/support/v6.0/tmp/pids/.keep +0 -0
  99. data/spec/test_data/v5.0/expected_active_record_relation.rbi +0 -1
  100. data/spec/test_data/v5.0/expected_application_job.rbi +2 -2
  101. data/spec/test_data/v5.0/expected_award_house_point_hourglasses.rbi +2 -2
  102. data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
  103. data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
  104. data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  105. data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  106. data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  107. data/spec/test_data/v5.0/expected_headmaster.rbi +24 -0
  108. data/spec/test_data/v5.0/expected_potion.rbi +12 -0
  109. data/spec/test_data/v5.0/expected_robe.rbi +12 -0
  110. data/spec/test_data/v5.0/expected_routes.rbi +4 -0
  111. data/spec/test_data/v5.0/expected_school.rbi +12 -0
  112. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +24 -0
  113. data/spec/test_data/v5.0/expected_spell_book.rbi +21 -9
  114. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +24 -0
  115. data/spec/test_data/v5.0/expected_squib.rbi +63 -0
  116. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +24 -0
  117. data/spec/test_data/v5.0/expected_wand.rbi +22 -10
  118. data/spec/test_data/v5.0/expected_wizard.rbi +121 -58
  119. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +24 -0
  120. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +121 -58
  121. data/spec/test_data/v5.1/expected_active_record_relation.rbi +0 -1
  122. data/spec/test_data/v5.1/expected_application_job.rbi +2 -2
  123. data/spec/test_data/v5.1/expected_award_house_point_hourglasses.rbi +2 -2
  124. data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
  125. data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
  126. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
  127. data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
  128. data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  129. data/spec/test_data/v5.1/expected_headmaster.rbi +24 -0
  130. data/spec/test_data/v5.1/expected_potion.rbi +12 -0
  131. data/spec/test_data/v5.1/expected_robe.rbi +12 -0
  132. data/spec/test_data/v5.1/expected_routes.rbi +4 -0
  133. data/spec/test_data/v5.1/expected_school.rbi +12 -0
  134. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +24 -0
  135. data/spec/test_data/v5.1/expected_spell_book.rbi +21 -9
  136. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +24 -0
  137. data/spec/test_data/v5.1/expected_squib.rbi +63 -0
  138. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +24 -0
  139. data/spec/test_data/v5.1/expected_wand.rbi +22 -10
  140. data/spec/test_data/v5.1/expected_wizard.rbi +121 -58
  141. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +24 -0
  142. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +121 -58
  143. data/spec/test_data/v5.2/expected_active_record_relation.rbi +0 -1
  144. data/spec/test_data/v5.2/expected_application_job.rbi +2 -2
  145. data/spec/test_data/v5.2/expected_attachment.rbi +24 -0
  146. data/spec/test_data/v5.2/expected_award_house_point_hourglasses.rbi +2 -2
  147. data/spec/test_data/v5.2/expected_blob.rbi +25 -1
  148. data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
  149. data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
  150. data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
  151. data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
  152. data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  153. data/spec/test_data/v5.2/expected_headmaster.rbi +24 -0
  154. data/spec/test_data/v5.2/expected_potion.rbi +12 -0
  155. data/spec/test_data/v5.2/expected_robe.rbi +12 -0
  156. data/spec/test_data/v5.2/expected_routes.rbi +4 -0
  157. data/spec/test_data/v5.2/expected_school.rbi +12 -0
  158. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +24 -0
  159. data/spec/test_data/v5.2/expected_spell_book.rbi +21 -9
  160. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +24 -0
  161. data/spec/test_data/v5.2/expected_squib.rbi +89 -2
  162. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +24 -0
  163. data/spec/test_data/v5.2/expected_wand.rbi +22 -10
  164. data/spec/test_data/v5.2/expected_wizard.rbi +147 -60
  165. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +24 -0
  166. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +147 -60
  167. data/spec/test_data/v6.0/expected_active_record_relation.rbi +0 -1
  168. data/spec/test_data/v6.0/expected_application_job.rbi +2 -2
  169. data/spec/test_data/v6.0/expected_attachment.rbi +24 -0
  170. data/spec/test_data/v6.0/expected_award_house_point_hourglasses.rbi +2 -2
  171. data/spec/test_data/v6.0/expected_blob.rbi +25 -1
  172. data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
  173. data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
  174. data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  175. data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  176. data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  177. data/spec/test_data/v6.0/expected_headmaster.rbi +24 -0
  178. data/spec/test_data/v6.0/expected_potion.rbi +12 -0
  179. data/spec/test_data/v6.0/expected_robe.rbi +12 -0
  180. data/spec/test_data/v6.0/expected_routes.rbi +4 -0
  181. data/spec/test_data/v6.0/expected_school.rbi +12 -0
  182. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +24 -0
  183. data/spec/test_data/v6.0/expected_spell_book.rbi +21 -9
  184. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +24 -0
  185. data/spec/test_data/v6.0/expected_squib.rbi +89 -2
  186. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +24 -0
  187. data/spec/test_data/v6.0/expected_wand.rbi +22 -10
  188. data/spec/test_data/v6.0/expected_wizard.rbi +147 -60
  189. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +24 -0
  190. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +147 -60
  191. data/spec/tstruct_comparable.rb +13 -0
  192. metadata +64 -15
  193. data/lib/bundled_rbi/parameters.rbi +0 -28
  194. data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -42
  195. data/lib/sorbet-rails/custom_types/integer_string.rb +0 -45
  196. data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -57
  197. data/spec/boolean_string_spec.rb +0 -59
  198. data/spec/custom_params_methods_spec.rb +0 -138
  199. data/spec/integer_string_spec.rb +0 -46
@@ -170,22 +170,24 @@ module Wand::GeneratedAttributeMethods
170
170
  def wood_type?; end
171
171
  end
172
172
 
173
- class Wand::CoreType < T::Enum
174
- enums do
175
- PhoenixFeather = new(%q{phoenix_feather})
176
- DragonHeartstring = new(%q{dragon_heartstring})
177
- UnicornTailHair = new(%q{unicorn_tail_hair})
178
- BasiliskHorn = new(%q{basilisk_horn})
179
- end
180
-
181
- end
182
-
183
173
  module Wand::GeneratedAssociationMethods
184
174
  sig { returns(::Wizard) }
185
175
  def wizard; end
186
176
 
177
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
178
+ def build_wizard(*args, &block); end
179
+
180
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
181
+ def create_wizard(*args, &block); end
182
+
183
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
184
+ def create_wizard!(*args, &block); end
185
+
187
186
  sig { params(value: ::Wizard).void }
188
187
  def wizard=(value); end
188
+
189
+ sig { returns(::Wizard) }
190
+ def reload_wizard; end
189
191
  end
190
192
 
191
193
  module Wand::CustomFinderMethods
@@ -234,6 +236,16 @@ class Wand < ApplicationRecord
234
236
  sig { params(value: T.nilable(Wand::CoreType)).void }
235
237
  def typed_core_type=(value); end
236
238
 
239
+ class CoreType < T::Enum
240
+ enums do
241
+ PhoenixFeather = new(%q{phoenix_feather})
242
+ DragonHeartstring = new(%q{dragon_heartstring})
243
+ UnicornTailHair = new(%q{unicorn_tail_hair})
244
+ BasiliskHorn = new(%q{basilisk_horn})
245
+ end
246
+
247
+ end
248
+
237
249
  sig { returns(T::Array[Wand]) }
238
250
  def self.mythicals; end
239
251
  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,69 +268,11 @@ 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(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
293
273
  def hats_attachments; end
294
274
 
295
- sig { returns(T::Array[Integer]) }
275
+ sig { returns(T::Array[T.untyped]) }
296
276
  def hats_attachment_ids; end
297
277
 
298
278
  sig { params(value: T::Enumerable[::ActiveStorage::Attachment]).void }
@@ -301,7 +281,7 @@ module Wizard::GeneratedAssociationMethods
301
281
  sig { returns(::ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy) }
302
282
  def hats_blobs; end
303
283
 
304
- sig { returns(T::Array[Integer]) }
284
+ sig { returns(T::Array[T.untyped]) }
305
285
  def hats_blob_ids; end
306
286
 
307
287
  sig { params(value: T::Enumerable[::ActiveStorage::Blob]).void }
@@ -310,21 +290,57 @@ module Wizard::GeneratedAssociationMethods
310
290
  sig { returns(T.nilable(::School)) }
311
291
  def school; end
312
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
+
313
302
  sig { params(value: T.nilable(::School)).void }
314
303
  def school=(value); end
315
304
 
305
+ sig { returns(T.nilable(::School)) }
306
+ def reload_school; end
307
+
316
308
  sig { returns(T.nilable(::ActiveStorage::Attachment)) }
317
309
  def school_photo_attachment; end
318
310
 
311
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
312
+ def build_school_photo_attachment(*args, &block); end
313
+
314
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
315
+ def create_school_photo_attachment(*args, &block); end
316
+
317
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
318
+ def create_school_photo_attachment!(*args, &block); end
319
+
319
320
  sig { params(value: T.nilable(::ActiveStorage::Attachment)).void }
320
321
  def school_photo_attachment=(value); end
321
322
 
323
+ sig { returns(T.nilable(::ActiveStorage::Attachment)) }
324
+ def reload_school_photo_attachment; end
325
+
322
326
  sig { returns(T.nilable(::ActiveStorage::Blob)) }
323
327
  def school_photo_blob; end
324
328
 
329
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
330
+ def build_school_photo_blob(*args, &block); end
331
+
332
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
333
+ def create_school_photo_blob(*args, &block); end
334
+
335
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
336
+ def create_school_photo_blob!(*args, &block); end
337
+
325
338
  sig { params(value: T.nilable(::ActiveStorage::Blob)).void }
326
339
  def school_photo_blob=(value); end
327
340
 
341
+ sig { returns(T.nilable(::ActiveStorage::Blob)) }
342
+ def reload_school_photo_blob; end
343
+
328
344
  sig { returns(::SpellBook::ActiveRecord_Associations_CollectionProxy) }
329
345
  def spell_books; end
330
346
 
@@ -346,8 +362,20 @@ module Wizard::GeneratedAssociationMethods
346
362
  sig { returns(T.nilable(::Wand)) }
347
363
  def wand; end
348
364
 
365
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
366
+ def build_wand(*args, &block); end
367
+
368
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
369
+ def create_wand(*args, &block); end
370
+
371
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
372
+ def create_wand!(*args, &block); end
373
+
349
374
  sig { params(value: T.nilable(::Wand)).void }
350
375
  def wand=(value); end
376
+
377
+ sig { returns(T.nilable(::Wand)) }
378
+ def reload_wand; end
351
379
  end
352
380
 
353
381
  module Wizard::CustomFinderMethods
@@ -369,6 +397,7 @@ end
369
397
 
370
398
  class Wizard < ApplicationRecord
371
399
  include Wizard::EnumInstanceMethods
400
+ include Wizard::GeneratedSerializedAttributeMethods
372
401
  include Wizard::GeneratedAttributeMethods
373
402
  include Wizard::GeneratedAssociationMethods
374
403
  extend Wizard::CustomFinderMethods
@@ -488,6 +517,64 @@ class Wizard < ApplicationRecord
488
517
 
489
518
  sig { params(value: T.nilable(Wizard::QuidditchPosition)).void }
490
519
  def typed_quidditch_position=(value); end
520
+
521
+ class Broom < T::Enum
522
+ enums do
523
+ Nimbus = new(%q{nimbus})
524
+ Firebolt = new(%q{firebolt})
525
+ end
526
+
527
+ end
528
+
529
+ class EyeColor < T::Enum
530
+ enums do
531
+ Brown = new(%q{brown})
532
+ Green = new(%q{green})
533
+ Blue = new(%q{blue})
534
+ end
535
+
536
+ end
537
+
538
+ class HairColor < T::Enum
539
+ enums do
540
+ Brown = new(%q{brown})
541
+ Black = new(%q{black})
542
+ Blonde = new(%q{blonde})
543
+ end
544
+
545
+ end
546
+
547
+ class House < T::Enum
548
+ enums do
549
+ Gryffindor = new(%q{Gryffindor})
550
+ Hufflepuff = new(%q{Hufflepuff})
551
+ Ravenclaw = new(%q{Ravenclaw})
552
+ Slytherin = new(%q{Slytherin})
553
+ end
554
+
555
+ end
556
+
557
+ class ProfessorEnum < T::Enum
558
+ enums do
559
+ SeverusSnape = new(%q{Severus Snape})
560
+ MinervaMcGonagall = new(%q{Minerva McGonagall})
561
+ PomonaSprout = new(%q{Pomona Sprout})
562
+ FiliusFlitwick = new(%q{Filius Flitwick})
563
+ Hagrid = new(%q{Hagrid})
564
+ AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
565
+ end
566
+
567
+ end
568
+
569
+ class QuidditchPosition < T::Enum
570
+ enums do
571
+ Keeper = new(%q{keeper})
572
+ Seeker = new(%q{seeker})
573
+ Beater = new(%q{beater})
574
+ Chaser = new(%q{chaser})
575
+ end
576
+
577
+ end
491
578
  end
492
579
 
493
580
  class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
@@ -31,14 +31,38 @@ module Wizard::HABTM_Subjects::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::Wizard)) }
32
32
  def left_side; end
33
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
+
34
43
  sig { params(value: T.nilable(::Wizard)).void }
35
44
  def left_side=(value); end
36
45
 
46
+ sig { returns(T.nilable(::Wizard)) }
47
+ def reload_left_side; end
48
+
37
49
  sig { returns(T.nilable(::Subject)) }
38
50
  def subject; end
39
51
 
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
53
+ def build_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
+
58
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
59
+ def create_subject!(*args, &block); end
60
+
40
61
  sig { params(value: T.nilable(::Subject)).void }
41
62
  def subject=(value); end
63
+
64
+ sig { returns(T.nilable(::Subject)) }
65
+ def reload_subject; end
42
66
  end
43
67
 
44
68
  module Wizard::HABTM_Subjects::CustomFinderMethods
@@ -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,69 +268,11 @@ 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(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
293
273
  def hats_attachments; end
294
274
 
295
- sig { returns(T::Array[Integer]) }
275
+ sig { returns(T::Array[T.untyped]) }
296
276
  def hats_attachment_ids; end
297
277
 
298
278
  sig { params(value: T::Enumerable[::ActiveStorage::Attachment]).void }
@@ -301,7 +281,7 @@ module Wizard::GeneratedAssociationMethods
301
281
  sig { returns(::ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy) }
302
282
  def hats_blobs; end
303
283
 
304
- sig { returns(T::Array[Integer]) }
284
+ sig { returns(T::Array[T.untyped]) }
305
285
  def hats_blob_ids; end
306
286
 
307
287
  sig { params(value: T::Enumerable[::ActiveStorage::Blob]).void }
@@ -310,21 +290,57 @@ module Wizard::GeneratedAssociationMethods
310
290
  sig { returns(T.nilable(T.untyped)) }
311
291
  def school; end
312
292
 
293
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
294
+ def build_school(*args, &block); end
295
+
296
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
297
+ def create_school(*args, &block); end
298
+
299
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
300
+ def create_school!(*args, &block); end
301
+
313
302
  sig { params(value: T.nilable(T.untyped)).void }
314
303
  def school=(value); end
315
304
 
305
+ sig { returns(T.nilable(T.untyped)) }
306
+ def reload_school; end
307
+
316
308
  sig { returns(T.nilable(::ActiveStorage::Attachment)) }
317
309
  def school_photo_attachment; end
318
310
 
311
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
312
+ def build_school_photo_attachment(*args, &block); end
313
+
314
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
315
+ def create_school_photo_attachment(*args, &block); end
316
+
317
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
318
+ def create_school_photo_attachment!(*args, &block); end
319
+
319
320
  sig { params(value: T.nilable(::ActiveStorage::Attachment)).void }
320
321
  def school_photo_attachment=(value); end
321
322
 
323
+ sig { returns(T.nilable(::ActiveStorage::Attachment)) }
324
+ def reload_school_photo_attachment; end
325
+
322
326
  sig { returns(T.nilable(::ActiveStorage::Blob)) }
323
327
  def school_photo_blob; end
324
328
 
329
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
330
+ def build_school_photo_blob(*args, &block); end
331
+
332
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
333
+ def create_school_photo_blob(*args, &block); end
334
+
335
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
336
+ def create_school_photo_blob!(*args, &block); end
337
+
325
338
  sig { params(value: T.nilable(::ActiveStorage::Blob)).void }
326
339
  def school_photo_blob=(value); end
327
340
 
341
+ sig { returns(T.nilable(::ActiveStorage::Blob)) }
342
+ def reload_school_photo_blob; end
343
+
328
344
  sig { returns(ActiveRecord::Associations::CollectionProxy) }
329
345
  def spell_books; end
330
346
 
@@ -340,8 +356,20 @@ module Wizard::GeneratedAssociationMethods
340
356
  sig { returns(T.nilable(::Wand)) }
341
357
  def wand; end
342
358
 
359
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
360
+ def build_wand(*args, &block); end
361
+
362
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
363
+ def create_wand(*args, &block); end
364
+
365
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
366
+ def create_wand!(*args, &block); end
367
+
343
368
  sig { params(value: T.nilable(::Wand)).void }
344
369
  def wand=(value); end
370
+
371
+ sig { returns(T.nilable(::Wand)) }
372
+ def reload_wand; end
345
373
  end
346
374
 
347
375
  module Wizard::CustomFinderMethods
@@ -363,6 +391,7 @@ end
363
391
 
364
392
  class Wizard < ApplicationRecord
365
393
  include Wizard::EnumInstanceMethods
394
+ include Wizard::GeneratedSerializedAttributeMethods
366
395
  include Wizard::GeneratedAttributeMethods
367
396
  include Wizard::GeneratedAssociationMethods
368
397
  extend Wizard::CustomFinderMethods
@@ -482,6 +511,64 @@ class Wizard < ApplicationRecord
482
511
 
483
512
  sig { params(value: T.nilable(Wizard::QuidditchPosition)).void }
484
513
  def typed_quidditch_position=(value); end
514
+
515
+ class Broom < T::Enum
516
+ enums do
517
+ Nimbus = new(%q{nimbus})
518
+ Firebolt = new(%q{firebolt})
519
+ end
520
+
521
+ end
522
+
523
+ class EyeColor < T::Enum
524
+ enums do
525
+ Brown = new(%q{brown})
526
+ Green = new(%q{green})
527
+ Blue = new(%q{blue})
528
+ end
529
+
530
+ end
531
+
532
+ class HairColor < T::Enum
533
+ enums do
534
+ Brown = new(%q{brown})
535
+ Black = new(%q{black})
536
+ Blonde = new(%q{blonde})
537
+ end
538
+
539
+ end
540
+
541
+ class House < T::Enum
542
+ enums do
543
+ Gryffindor = new(%q{Gryffindor})
544
+ Hufflepuff = new(%q{Hufflepuff})
545
+ Ravenclaw = new(%q{Ravenclaw})
546
+ Slytherin = new(%q{Slytherin})
547
+ end
548
+
549
+ end
550
+
551
+ class ProfessorEnum < T::Enum
552
+ enums do
553
+ SeverusSnape = new(%q{Severus Snape})
554
+ MinervaMcGonagall = new(%q{Minerva McGonagall})
555
+ PomonaSprout = new(%q{Pomona Sprout})
556
+ FiliusFlitwick = new(%q{Filius Flitwick})
557
+ Hagrid = new(%q{Hagrid})
558
+ AlastorMadEyeMoody = new(%q{Alastor 'Mad-Eye' Moody})
559
+ end
560
+
561
+ end
562
+
563
+ class QuidditchPosition < T::Enum
564
+ enums do
565
+ Keeper = new(%q{keeper})
566
+ Seeker = new(%q{seeker})
567
+ Beater = new(%q{beater})
568
+ Chaser = new(%q{chaser})
569
+ end
570
+
571
+ end
485
572
  end
486
573
 
487
574
  class Wizard::ActiveRecord_Relation < ActiveRecord::Relation