sorbet-rails 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -0
  3. data/README.md +3 -3
  4. data/lib/bundled_rbi/typed_enum.rbi +7 -0
  5. data/lib/sorbet-rails.rb +0 -2
  6. data/lib/sorbet-rails/active_record_rbi_formatter.rb +301 -0
  7. data/lib/sorbet-rails/config.rb +0 -1
  8. data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +11 -0
  9. data/lib/sorbet-rails/deprecation.rb +5 -0
  10. data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
  11. data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
  12. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +36 -8
  13. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +20 -9
  14. data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
  15. data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
  16. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +34 -3
  17. data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
  18. data/lib/sorbet-rails/model_plugins/base.rb +10 -0
  19. data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +0 -50
  20. data/lib/sorbet-rails/model_plugins/plugins.rb +0 -3
  21. data/lib/sorbet-rails/model_rbi_formatter.rb +6 -10
  22. data/lib/sorbet-rails/model_utils.rb +83 -36
  23. data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
  24. data/lib/sorbet-rails/railtie.rb +0 -2
  25. data/lib/sorbet-rails/tasks/rails_rbi.rake +32 -24
  26. data/sorbet-rails.gemspec +2 -2
  27. data/spec/active_record_rbi_formatter_spec.rb +24 -0
  28. data/spec/generators/rails-template.rb +90 -6
  29. data/spec/generators/sorbet_test_cases.rb +204 -122
  30. data/spec/model_rbi_formatter_spec.rb +1 -1
  31. data/spec/rails_helper.rb +14 -1
  32. data/spec/rake_rails_rbi_active_record_spec.rb +21 -0
  33. data/spec/rake_rails_rbi_models_spec.rb +7 -0
  34. data/spec/sorbet_spec.rb +12 -1
  35. data/spec/support/v5.0/Gemfile.lock +8 -8
  36. data/spec/support/v5.0/app/models/headmaster.rb +8 -0
  37. data/spec/support/v5.0/app/models/school.rb +2 -0
  38. data/spec/support/v5.0/app/models/spell.rb +5 -0
  39. data/spec/support/v5.0/app/models/spell_book.rb +5 -0
  40. data/spec/support/v5.0/app/models/subject.rb +5 -0
  41. data/spec/support/v5.0/app/models/wizard.rb +6 -1
  42. data/spec/support/v5.0/db/migrate/20190620000010_add_subject.rb +8 -0
  43. data/spec/support/v5.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  44. data/spec/support/v5.0/db/migrate/20190620000012_add_spell.rb +8 -0
  45. data/spec/support/v5.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  46. data/spec/support/v5.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
  47. data/spec/support/v5.0/db/schema.rb +28 -1
  48. data/spec/support/v5.0/lib/mythical_rbi_plugin.rb +1 -1
  49. data/spec/support/v5.0/sorbet_test_cases.rb +204 -122
  50. data/spec/support/v5.1/Gemfile.lock +8 -8
  51. data/spec/support/v5.1/app/models/headmaster.rb +8 -0
  52. data/spec/support/v5.1/app/models/school.rb +2 -0
  53. data/spec/support/v5.1/app/models/spell.rb +5 -0
  54. data/spec/support/v5.1/app/models/spell_book.rb +5 -0
  55. data/spec/support/v5.1/app/models/subject.rb +5 -0
  56. data/spec/support/v5.1/app/models/wizard.rb +6 -1
  57. data/spec/support/v5.1/db/migrate/20190620000010_add_subject.rb +8 -0
  58. data/spec/support/v5.1/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  59. data/spec/support/v5.1/db/migrate/20190620000012_add_spell.rb +8 -0
  60. data/spec/support/v5.1/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  61. data/spec/support/v5.1/db/migrate/20190620000014_create_headmasters.rb +9 -0
  62. data/spec/support/v5.1/db/schema.rb +28 -1
  63. data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +1 -1
  64. data/spec/support/v5.1/sorbet_test_cases.rb +204 -122
  65. data/spec/support/v5.2/Gemfile +1 -1
  66. data/spec/support/v5.2/Gemfile.lock +9 -9
  67. data/spec/support/v5.2/app/models/headmaster.rb +8 -0
  68. data/spec/support/v5.2/app/models/school.rb +2 -0
  69. data/spec/support/v5.2/app/models/spell.rb +5 -0
  70. data/spec/support/v5.2/app/models/spell_book.rb +5 -0
  71. data/spec/support/v5.2/app/models/subject.rb +5 -0
  72. data/spec/support/v5.2/app/models/wizard.rb +5 -0
  73. data/spec/support/v5.2/config/puma.rb +3 -0
  74. data/spec/support/v5.2/db/migrate/20190620000010_add_subject.rb +8 -0
  75. data/spec/support/v5.2/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  76. data/spec/support/v5.2/db/migrate/20190620000012_add_spell.rb +8 -0
  77. data/spec/support/v5.2/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  78. data/spec/support/v5.2/db/migrate/20190620000014_create_headmasters.rb +9 -0
  79. data/spec/support/v5.2/db/schema.rb +28 -1
  80. data/spec/support/v5.2/lib/mythical_rbi_plugin.rb +1 -1
  81. data/spec/support/v5.2/sorbet_test_cases.rb +204 -122
  82. data/spec/support/v6.0/Gemfile.lock +8 -8
  83. data/spec/support/v6.0/app/models/headmaster.rb +8 -0
  84. data/spec/support/v6.0/app/models/school.rb +2 -0
  85. data/spec/support/v6.0/app/models/spell.rb +5 -0
  86. data/spec/support/v6.0/app/models/spell_book.rb +5 -0
  87. data/spec/support/v6.0/app/models/subject.rb +5 -0
  88. data/spec/support/v6.0/app/models/wizard.rb +6 -1
  89. data/spec/support/v6.0/db/migrate/20190620000010_add_subject.rb +8 -0
  90. data/spec/support/v6.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  91. data/spec/support/v6.0/db/migrate/20190620000012_add_spell.rb +8 -0
  92. data/spec/support/v6.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  93. data/spec/support/v6.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
  94. data/spec/support/v6.0/db/schema.rb +28 -1
  95. data/spec/support/v6.0/lib/mythical_rbi_plugin.rb +1 -1
  96. data/spec/support/v6.0/sorbet_test_cases.rb +204 -122
  97. data/spec/test_data/v5.0/expected_active_record_base.rbi +113 -0
  98. data/spec/test_data/v5.0/expected_active_record_relation.rbi +199 -0
  99. data/spec/test_data/v5.0/expected_habtm_subjects.rbi +660 -0
  100. data/spec/test_data/v5.0/expected_habtm_wizards.rbi +660 -0
  101. data/spec/test_data/v5.0/expected_headmaster.rbi +304 -0
  102. data/spec/test_data/v5.0/expected_internal_metadata.rbi +38 -401
  103. data/spec/test_data/v5.0/expected_potion.rbi +38 -401
  104. data/spec/test_data/v5.0/expected_robe.rbi +38 -403
  105. data/spec/test_data/v5.0/expected_schema_migration.rbi +38 -401
  106. data/spec/test_data/v5.0/expected_school.rbi +47 -401
  107. data/spec/test_data/v5.0/expected_spell.rbi +292 -0
  108. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +295 -0
  109. data/spec/test_data/v5.0/expected_spell_book.rbi +86 -432
  110. data/spec/test_data/v5.0/expected_spell_book/habtm_spell_books.rbi +637 -0
  111. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +295 -0
  112. data/spec/test_data/v5.0/expected_squib.rbi +122 -477
  113. data/spec/test_data/v5.0/expected_subject.rbi +292 -0
  114. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +295 -0
  115. data/spec/test_data/v5.0/expected_wand.rbi +75 -442
  116. data/spec/test_data/v5.0/expected_wizard.rbi +144 -498
  117. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +295 -0
  118. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +138 -498
  119. data/spec/test_data/v5.1/expected_active_record_base.rbi +113 -0
  120. data/spec/test_data/v5.1/expected_active_record_relation.rbi +178 -0
  121. data/spec/test_data/v5.1/expected_habtm_subjects.rbi +672 -0
  122. data/spec/test_data/v5.1/expected_habtm_wizards.rbi +672 -0
  123. data/spec/test_data/v5.1/expected_headmaster.rbi +310 -0
  124. data/spec/test_data/v5.1/expected_internal_metadata.rbi +38 -407
  125. data/spec/test_data/v5.1/expected_potion.rbi +38 -407
  126. data/spec/test_data/v5.1/expected_robe.rbi +38 -409
  127. data/spec/test_data/v5.1/expected_schema_migration.rbi +38 -407
  128. data/spec/test_data/v5.1/expected_school.rbi +47 -407
  129. data/spec/test_data/v5.1/expected_spell.rbi +298 -0
  130. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +301 -0
  131. data/spec/test_data/v5.1/expected_spell_book.rbi +86 -438
  132. data/spec/test_data/v5.1/expected_spell_book/habtm_spell_books.rbi +649 -0
  133. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +301 -0
  134. data/spec/test_data/v5.1/expected_squib.rbi +123 -484
  135. data/spec/test_data/v5.1/expected_subject.rbi +298 -0
  136. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +301 -0
  137. data/spec/test_data/v5.1/expected_wand.rbi +75 -448
  138. data/spec/test_data/v5.1/expected_wizard.rbi +145 -505
  139. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +301 -0
  140. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +139 -505
  141. data/spec/test_data/v5.2/expected_active_record_base.rbi +113 -0
  142. data/spec/test_data/v5.2/expected_active_record_relation.rbi +175 -0
  143. data/spec/test_data/v5.2/expected_attachment.rbi +38 -407
  144. data/spec/test_data/v5.2/expected_blob.rbi +60 -426
  145. data/spec/test_data/v5.2/expected_habtm_subjects.rbi +672 -0
  146. data/spec/test_data/v5.2/expected_habtm_wizards.rbi +672 -0
  147. data/spec/test_data/v5.2/expected_headmaster.rbi +310 -0
  148. data/spec/test_data/v5.2/expected_internal_metadata.rbi +38 -407
  149. data/spec/test_data/v5.2/expected_potion.rbi +38 -407
  150. data/spec/test_data/v5.2/expected_robe.rbi +38 -409
  151. data/spec/test_data/v5.2/expected_schema_migration.rbi +38 -407
  152. data/spec/test_data/v5.2/expected_school.rbi +47 -407
  153. data/spec/test_data/v5.2/expected_spell.rbi +298 -0
  154. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +301 -0
  155. data/spec/test_data/v5.2/expected_spell_book.rbi +86 -438
  156. data/spec/test_data/v5.2/expected_spell_book/habtm_spell_books.rbi +649 -0
  157. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +301 -0
  158. data/spec/test_data/v5.2/expected_squib.rbi +133 -488
  159. data/spec/test_data/v5.2/expected_subject.rbi +298 -0
  160. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +301 -0
  161. data/spec/test_data/v5.2/expected_wand.rbi +75 -448
  162. data/spec/test_data/v5.2/expected_wizard.rbi +155 -509
  163. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +301 -0
  164. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +149 -509
  165. data/spec/test_data/v6.0/expected_active_record_base.rbi +113 -0
  166. data/spec/test_data/v6.0/expected_active_record_relation.rbi +175 -0
  167. data/spec/test_data/v6.0/expected_attachment.rbi +38 -431
  168. data/spec/test_data/v6.0/expected_blob.rbi +60 -450
  169. data/spec/test_data/v6.0/expected_habtm_subjects.rbi +720 -0
  170. data/spec/test_data/v6.0/expected_habtm_wizards.rbi +720 -0
  171. data/spec/test_data/v6.0/expected_headmaster.rbi +334 -0
  172. data/spec/test_data/v6.0/expected_internal_metadata.rbi +38 -431
  173. data/spec/test_data/v6.0/expected_potion.rbi +38 -431
  174. data/spec/test_data/v6.0/expected_robe.rbi +38 -433
  175. data/spec/test_data/v6.0/expected_routes.rbi +14 -7
  176. data/spec/test_data/v6.0/expected_schema_migration.rbi +38 -431
  177. data/spec/test_data/v6.0/expected_school.rbi +47 -431
  178. data/spec/test_data/v6.0/expected_spell.rbi +322 -0
  179. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +325 -0
  180. data/spec/test_data/v6.0/expected_spell_book.rbi +98 -474
  181. data/spec/test_data/v6.0/expected_spell_book/habtm_spell_books.rbi +697 -0
  182. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +325 -0
  183. data/spec/test_data/v6.0/expected_squib.rbi +162 -541
  184. data/spec/test_data/v6.0/expected_subject.rbi +322 -0
  185. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +325 -0
  186. data/spec/test_data/v6.0/expected_wand.rbi +91 -488
  187. data/spec/test_data/v6.0/expected_wizard.rbi +184 -562
  188. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +325 -0
  189. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +178 -562
  190. metadata +170 -24
  191. data/lib/bundled_rbi/active_record_base.rbi +0 -83
  192. data/lib/bundled_rbi/active_record_relation.rbi +0 -122
  193. data/lib/bundled_rbi/parameters.rbi +0 -28
  194. data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -32
  195. data/lib/sorbet-rails/custom_types/integer_string.rb +0 -35
  196. data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +0 -131
  197. data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -46
  198. data/spec/boolean_string_spec.rb +0 -59
  199. data/spec/custom_params_methods_spec.rb +0 -138
  200. data/spec/integer_string_spec.rb +0 -46
  201. data/spec/support/v5.0/typed-override.yaml +0 -2
  202. data/spec/support/v5.1/typed-override.yaml +0 -2
  203. data/spec/support/v5.2/typed-override.yaml +0 -2
  204. data/spec/support/v6.0/typed-override.yaml +0 -2
@@ -0,0 +1,325 @@
1
+ # This is an autogenerated file for dynamic methods in SpellBook::HABTM_Spells
2
+ # Please rerun bundle exec rake rails_rbi:models[SpellBook::HABTM_Spells] to regenerate.
3
+
4
+ # typed: strong
5
+ module SpellBook::HABTM_Spells::ActiveRelation_WhereNot
6
+ sig { params(opts: T.untyped, rest: T.untyped).returns(T.self_type) }
7
+ def not(opts, *rest); end
8
+ end
9
+
10
+ module SpellBook::HABTM_Spells::GeneratedAttributeMethods
11
+ sig { returns(Integer) }
12
+ def spell_book_id; end
13
+
14
+ sig { params(value: T.any(Numeric, ActiveSupport::Duration)).void }
15
+ def spell_book_id=(value); end
16
+
17
+ sig { returns(T::Boolean) }
18
+ def spell_book_id?; end
19
+
20
+ sig { returns(Integer) }
21
+ def spell_id; end
22
+
23
+ sig { params(value: T.any(Numeric, ActiveSupport::Duration)).void }
24
+ def spell_id=(value); end
25
+
26
+ sig { returns(T::Boolean) }
27
+ def spell_id?; end
28
+ end
29
+
30
+ module SpellBook::HABTM_Spells::GeneratedAssociationMethods
31
+ sig { returns(T.nilable(::SpellBook)) }
32
+ def left_side; end
33
+
34
+ sig { params(value: T.nilable(::SpellBook)).void }
35
+ def left_side=(value); end
36
+
37
+ sig { returns(::Spell) }
38
+ def spell; end
39
+
40
+ sig { params(value: ::Spell).void }
41
+ def spell=(value); end
42
+ end
43
+
44
+ module SpellBook::HABTM_Spells::CustomFinderMethods
45
+ sig { params(limit: Integer).returns(T::Array[SpellBook::HABTM_Spells]) }
46
+ def first_n(limit); end
47
+
48
+ sig { params(limit: Integer).returns(T::Array[SpellBook::HABTM_Spells]) }
49
+ def last_n(limit); end
50
+
51
+ sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[SpellBook::HABTM_Spells]) }
52
+ def find_n(*args); end
53
+
54
+ sig { params(id: Integer).returns(T.nilable(SpellBook::HABTM_Spells)) }
55
+ def find_by_id(id); end
56
+
57
+ sig { params(id: Integer).returns(SpellBook::HABTM_Spells) }
58
+ def find_by_id!(id); end
59
+ end
60
+
61
+ class SpellBook::HABTM_Spells < ActiveRecord::Base
62
+ include SpellBook::HABTM_Spells::GeneratedAttributeMethods
63
+ include SpellBook::HABTM_Spells::GeneratedAssociationMethods
64
+ extend SpellBook::HABTM_Spells::CustomFinderMethods
65
+ extend SpellBook::HABTM_Spells::QueryMethodsReturningRelation
66
+ RelationType = T.type_alias { T.any(SpellBook::HABTM_Spells::ActiveRecord_Relation, SpellBook::HABTM_Spells::ActiveRecord_Associations_CollectionProxy, SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
67
+ end
68
+
69
+ module SpellBook::HABTM_Spells::QueryMethodsReturningRelation
70
+ sig { returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
71
+ def all; end
72
+
73
+ sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
74
+ def unscoped(&block); end
75
+
76
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
77
+ def select(*args); end
78
+
79
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
80
+ def reselect(*args); end
81
+
82
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
83
+ def order(*args); end
84
+
85
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
86
+ def reorder(*args); end
87
+
88
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
89
+ def group(*args); end
90
+
91
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
92
+ def limit(*args); end
93
+
94
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
95
+ def offset(*args); end
96
+
97
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
98
+ def joins(*args); end
99
+
100
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
101
+ def left_joins(*args); end
102
+
103
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
104
+ def left_outer_joins(*args); end
105
+
106
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
107
+ def where(*args); end
108
+
109
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
110
+ def rewhere(*args); end
111
+
112
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
113
+ def preload(*args); end
114
+
115
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
116
+ def extract_associated(*args); end
117
+
118
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
119
+ def eager_load(*args); end
120
+
121
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
122
+ def includes(*args); end
123
+
124
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
125
+ def from(*args); end
126
+
127
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
128
+ def lock(*args); end
129
+
130
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
131
+ def readonly(*args); end
132
+
133
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
134
+ def or(*args); end
135
+
136
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
137
+ def having(*args); end
138
+
139
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
140
+ def create_with(*args); end
141
+
142
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
143
+ def distinct(*args); end
144
+
145
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
146
+ def references(*args); end
147
+
148
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
149
+ def none(*args); end
150
+
151
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
152
+ def unscope(*args); end
153
+
154
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
155
+ def optimizer_hints(*args); end
156
+
157
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
158
+ def merge(*args); end
159
+
160
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
161
+ def except(*args); end
162
+
163
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
164
+ def only(*args); end
165
+
166
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
167
+ def extending(*args, &block); end
168
+
169
+ sig do
170
+ params(
171
+ of: T.nilable(Integer),
172
+ start: T.nilable(Integer),
173
+ finish: T.nilable(Integer),
174
+ load: T.nilable(T::Boolean),
175
+ error_on_ignore: T.nilable(T::Boolean),
176
+ block: T.nilable(T.proc.params(e: SpellBook::HABTM_Spells::ActiveRecord_Relation).void)
177
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
178
+ end
179
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
180
+ end
181
+
182
+ module SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
183
+ sig { returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
184
+ def all; end
185
+
186
+ sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
187
+ def unscoped(&block); end
188
+
189
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
190
+ def select(*args); end
191
+
192
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
193
+ def reselect(*args); end
194
+
195
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
196
+ def order(*args); end
197
+
198
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
199
+ def reorder(*args); end
200
+
201
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
202
+ def group(*args); end
203
+
204
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
205
+ def limit(*args); end
206
+
207
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
208
+ def offset(*args); end
209
+
210
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
211
+ def joins(*args); end
212
+
213
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
214
+ def left_joins(*args); end
215
+
216
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
217
+ def left_outer_joins(*args); end
218
+
219
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
220
+ def where(*args); end
221
+
222
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
223
+ def rewhere(*args); end
224
+
225
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
226
+ def preload(*args); end
227
+
228
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
229
+ def extract_associated(*args); end
230
+
231
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
232
+ def eager_load(*args); end
233
+
234
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
235
+ def includes(*args); end
236
+
237
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
238
+ def from(*args); end
239
+
240
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
241
+ def lock(*args); end
242
+
243
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
244
+ def readonly(*args); end
245
+
246
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
247
+ def or(*args); end
248
+
249
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
250
+ def having(*args); end
251
+
252
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
253
+ def create_with(*args); end
254
+
255
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
256
+ def distinct(*args); end
257
+
258
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
259
+ def references(*args); end
260
+
261
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
262
+ def none(*args); end
263
+
264
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
265
+ def unscope(*args); end
266
+
267
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
268
+ def optimizer_hints(*args); end
269
+
270
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
271
+ def merge(*args); end
272
+
273
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
274
+ def except(*args); end
275
+
276
+ sig { params(args: T.untyped).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
277
+ def only(*args); end
278
+
279
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
280
+ def extending(*args, &block); end
281
+
282
+ sig do
283
+ params(
284
+ of: T.nilable(Integer),
285
+ start: T.nilable(Integer),
286
+ finish: T.nilable(Integer),
287
+ load: T.nilable(T::Boolean),
288
+ error_on_ignore: T.nilable(T::Boolean),
289
+ block: T.nilable(T.proc.params(e: SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation).void)
290
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
291
+ end
292
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
293
+ end
294
+
295
+ class SpellBook::HABTM_Spells::ActiveRecord_Relation < ActiveRecord::Relation
296
+ include SpellBook::HABTM_Spells::ActiveRelation_WhereNot
297
+ include SpellBook::HABTM_Spells::CustomFinderMethods
298
+ include SpellBook::HABTM_Spells::QueryMethodsReturningRelation
299
+ Elem = type_member(fixed: SpellBook::HABTM_Spells)
300
+ end
301
+
302
+ class SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
303
+ include SpellBook::HABTM_Spells::ActiveRelation_WhereNot
304
+ include SpellBook::HABTM_Spells::CustomFinderMethods
305
+ include SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
306
+ Elem = type_member(fixed: SpellBook::HABTM_Spells)
307
+ end
308
+
309
+ class SpellBook::HABTM_Spells::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
310
+ include SpellBook::HABTM_Spells::CustomFinderMethods
311
+ include SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
312
+ Elem = type_member(fixed: SpellBook::HABTM_Spells)
313
+
314
+ sig { params(records: T.any(SpellBook::HABTM_Spells, T::Array[SpellBook::HABTM_Spells])).returns(T.self_type) }
315
+ def <<(*records); end
316
+
317
+ sig { params(records: T.any(SpellBook::HABTM_Spells, T::Array[SpellBook::HABTM_Spells])).returns(T.self_type) }
318
+ def append(*records); end
319
+
320
+ sig { params(records: T.any(SpellBook::HABTM_Spells, T::Array[SpellBook::HABTM_Spells])).returns(T.self_type) }
321
+ def push(*records); end
322
+
323
+ sig { params(records: T.any(SpellBook::HABTM_Spells, T::Array[SpellBook::HABTM_Spells])).returns(T.self_type) }
324
+ def concat(*records); end
325
+ end
@@ -3,8 +3,6 @@
3
3
 
4
4
  # typed: strong
5
5
  module Squib::EnumInstanceMethods
6
- extend T::Sig
7
-
8
6
  sig { returns(T::Boolean) }
9
7
  def broom_nimbus?; end
10
8
 
@@ -114,8 +112,6 @@ module Squib::ActiveRelation_WhereNot
114
112
  end
115
113
 
116
114
  module Squib::GeneratedAttributeMethods
117
- extend T::Sig
118
-
119
115
  sig { returns(T.nilable(String)) }
120
116
  def broom; end
121
117
 
@@ -179,10 +175,10 @@ module Squib::GeneratedAttributeMethods
179
175
  sig { returns(T::Boolean) }
180
176
  def id?; end
181
177
 
182
- sig { returns(T.nilable(String)) }
178
+ sig { returns(String) }
183
179
  def name; end
184
180
 
185
- sig { params(value: T.nilable(T.any(String, Symbol))).void }
181
+ sig { params(value: T.any(String, Symbol)).void }
186
182
  def name=(value); end
187
183
 
188
184
  sig { returns(T::Boolean) }
@@ -274,8 +270,7 @@ class Squib < Wizard
274
270
  include Squib::GeneratedAttributeMethods
275
271
  include Squib::GeneratedAssociationMethods
276
272
  extend Squib::CustomFinderMethods
277
- extend T::Sig
278
- extend T::Generic
273
+ extend Squib::QueryMethodsReturningRelation
279
274
  RelationType = T.type_alias { T.any(Squib::ActiveRecord_Relation, Squib::ActiveRecord_Associations_CollectionProxy, Squib::ActiveRecord_AssociationRelation) }
280
275
 
281
276
  sig { returns(T::Hash[T.any(String, Symbol), String]) }
@@ -406,131 +401,12 @@ class Squib < Wizard
406
401
 
407
402
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
408
403
  def self.with_attached_school_photo(*args); end
409
-
410
- sig { returns(Squib::ActiveRecord_Relation) }
411
- def self.all; end
412
-
413
- sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
414
- def self.unscoped(&block); end
415
-
416
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
417
- def self.select(*args); end
418
-
419
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
420
- def self.reselect(*args); end
421
-
422
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
423
- def self.order(*args); end
424
-
425
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
426
- def self.reorder(*args); end
427
-
428
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
429
- def self.group(*args); end
430
-
431
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
432
- def self.limit(*args); end
433
-
434
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
435
- def self.offset(*args); end
436
-
437
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
438
- def self.joins(*args); end
439
-
440
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
441
- def self.left_joins(*args); end
442
-
443
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
444
- def self.left_outer_joins(*args); end
445
-
446
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
447
- def self.where(*args); end
448
-
449
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
450
- def self.rewhere(*args); end
451
-
452
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
453
- def self.preload(*args); end
454
-
455
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
456
- def self.extract_associated(*args); end
457
-
458
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
459
- def self.eager_load(*args); end
460
-
461
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
462
- def self.includes(*args); end
463
-
464
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
465
- def self.from(*args); end
466
-
467
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
468
- def self.lock(*args); end
469
-
470
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
471
- def self.readonly(*args); end
472
-
473
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
474
- def self.or(*args); end
475
-
476
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
477
- def self.having(*args); end
478
-
479
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
480
- def self.create_with(*args); end
481
-
482
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
483
- def self.distinct(*args); end
484
-
485
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
486
- def self.references(*args); end
487
-
488
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
489
- def self.none(*args); end
490
-
491
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
492
- def self.unscope(*args); end
493
-
494
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
495
- def self.optimizer_hints(*args); end
496
-
497
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
498
- def self.merge(*args); end
499
-
500
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
501
- def self.except(*args); end
502
-
503
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
504
- def self.only(*args); end
505
-
506
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
507
- def self.extending(*args, &block); end
508
-
509
- sig { params(conditions: T.untyped).returns(T::Boolean) }
510
- def self.exists?(conditions = nil); end
511
-
512
- sig { params(args: T.untyped).returns(T::Boolean) }
513
- def self.any?(*args); end
514
-
515
- sig { params(args: T.untyped).returns(T::Boolean) }
516
- def self.many?(*args); end
517
-
518
- sig { params(args: T.untyped).returns(T::Boolean) }
519
- def self.none?(*args); end
520
-
521
- sig { params(args: T.untyped).returns(T::Boolean) }
522
- def self.one?(*args); end
523
-
524
- sig { params(args: T.untyped).returns(T::Boolean) }
525
- def self.empty?(*args); end
526
404
  end
527
405
 
528
406
  class Squib::ActiveRecord_Relation < ActiveRecord::Relation
529
407
  include Squib::ActiveRelation_WhereNot
530
408
  include Squib::CustomFinderMethods
531
- include Enumerable
532
- extend T::Sig
533
- extend T::Generic
409
+ include Squib::QueryMethodsReturningRelation
534
410
  Elem = type_member(fixed: Squib)
535
411
 
536
412
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
@@ -643,131 +519,12 @@ class Squib::ActiveRecord_Relation < ActiveRecord::Relation
643
519
 
644
520
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
645
521
  def with_attached_school_photo(*args); end
646
-
647
- sig { returns(Squib::ActiveRecord_Relation) }
648
- def all; end
649
-
650
- sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
651
- def unscoped(&block); end
652
-
653
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
654
- def select(*args); end
655
-
656
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
657
- def reselect(*args); end
658
-
659
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
660
- def order(*args); end
661
-
662
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
663
- def reorder(*args); end
664
-
665
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
666
- def group(*args); end
667
-
668
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
669
- def limit(*args); end
670
-
671
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
672
- def offset(*args); end
673
-
674
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
675
- def joins(*args); end
676
-
677
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
678
- def left_joins(*args); end
679
-
680
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
681
- def left_outer_joins(*args); end
682
-
683
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
684
- def where(*args); end
685
-
686
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
687
- def rewhere(*args); end
688
-
689
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
690
- def preload(*args); end
691
-
692
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
693
- def extract_associated(*args); end
694
-
695
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
696
- def eager_load(*args); end
697
-
698
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
699
- def includes(*args); end
700
-
701
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
702
- def from(*args); end
703
-
704
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
705
- def lock(*args); end
706
-
707
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
708
- def readonly(*args); end
709
-
710
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
711
- def or(*args); end
712
-
713
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
714
- def having(*args); end
715
-
716
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
717
- def create_with(*args); end
718
-
719
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
720
- def distinct(*args); end
721
-
722
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
723
- def references(*args); end
724
-
725
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
726
- def none(*args); end
727
-
728
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
729
- def unscope(*args); end
730
-
731
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
732
- def optimizer_hints(*args); end
733
-
734
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
735
- def merge(*args); end
736
-
737
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
738
- def except(*args); end
739
-
740
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
741
- def only(*args); end
742
-
743
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
744
- def extending(*args, &block); end
745
-
746
- sig { params(conditions: T.untyped).returns(T::Boolean) }
747
- def exists?(conditions = nil); end
748
-
749
- sig { params(args: T.untyped).returns(T::Boolean) }
750
- def any?(*args); end
751
-
752
- sig { params(args: T.untyped).returns(T::Boolean) }
753
- def many?(*args); end
754
-
755
- sig { params(args: T.untyped).returns(T::Boolean) }
756
- def none?(*args); end
757
-
758
- sig { params(args: T.untyped).returns(T::Boolean) }
759
- def one?(*args); end
760
-
761
- sig { params(args: T.untyped).returns(T::Boolean) }
762
- def empty?(*args); end
763
522
  end
764
523
 
765
524
  class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
766
525
  include Squib::ActiveRelation_WhereNot
767
526
  include Squib::CustomFinderMethods
768
- include Enumerable
769
- extend T::Sig
770
- extend T::Generic
527
+ include Squib::QueryMethodsReturningAssociationRelation
771
528
  Elem = type_member(fixed: Squib)
772
529
 
773
530
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
@@ -880,201 +637,11 @@ class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelatio
880
637
 
881
638
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
882
639
  def with_attached_school_photo(*args); end
883
-
884
- sig { returns(Squib::ActiveRecord_AssociationRelation) }
885
- def all; end
886
-
887
- sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
888
- def unscoped(&block); end
889
-
890
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
891
- def select(*args); end
892
-
893
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
894
- def reselect(*args); end
895
-
896
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
897
- def order(*args); end
898
-
899
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
900
- def reorder(*args); end
901
-
902
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
903
- def group(*args); end
904
-
905
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
906
- def limit(*args); end
907
-
908
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
909
- def offset(*args); end
910
-
911
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
912
- def joins(*args); end
913
-
914
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
915
- def left_joins(*args); end
916
-
917
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
918
- def left_outer_joins(*args); end
919
-
920
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
921
- def where(*args); end
922
-
923
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
924
- def rewhere(*args); end
925
-
926
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
927
- def preload(*args); end
928
-
929
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
930
- def extract_associated(*args); end
931
-
932
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
933
- def eager_load(*args); end
934
-
935
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
936
- def includes(*args); end
937
-
938
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
939
- def from(*args); end
940
-
941
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
942
- def lock(*args); end
943
-
944
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
945
- def readonly(*args); end
946
-
947
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
948
- def or(*args); end
949
-
950
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
951
- def having(*args); end
952
-
953
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
954
- def create_with(*args); end
955
-
956
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
957
- def distinct(*args); end
958
-
959
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
960
- def references(*args); end
961
-
962
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
963
- def none(*args); end
964
-
965
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
966
- def unscope(*args); end
967
-
968
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
969
- def optimizer_hints(*args); end
970
-
971
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
972
- def merge(*args); end
973
-
974
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
975
- def except(*args); end
976
-
977
- sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
978
- def only(*args); end
979
-
980
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
981
- def extending(*args, &block); end
982
-
983
- sig { params(args: T.untyped).returns(Squib) }
984
- def find(*args); end
985
-
986
- sig { params(args: T.untyped).returns(T.nilable(Squib)) }
987
- def find_by(*args); end
988
-
989
- sig { params(args: T.untyped).returns(Squib) }
990
- def find_by!(*args); end
991
-
992
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
993
- def find_or_initialize_by(attributes, &block); end
994
-
995
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
996
- def find_or_create_by(attributes, &block); end
997
-
998
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
999
- def find_or_create_by!(attributes, &block); end
1000
-
1001
- sig { returns(T.nilable(Squib)) }
1002
- def first; end
1003
-
1004
- sig { returns(Squib) }
1005
- def first!; end
1006
-
1007
- sig { returns(T.nilable(Squib)) }
1008
- def second; end
1009
-
1010
- sig { returns(Squib) }
1011
- def second!; end
1012
-
1013
- sig { returns(T.nilable(Squib)) }
1014
- def third; end
1015
-
1016
- sig { returns(Squib) }
1017
- def third!; end
1018
-
1019
- sig { returns(T.nilable(Squib)) }
1020
- def third_to_last; end
1021
-
1022
- sig { returns(Squib) }
1023
- def third_to_last!; end
1024
-
1025
- sig { returns(T.nilable(Squib)) }
1026
- def second_to_last; end
1027
-
1028
- sig { returns(Squib) }
1029
- def second_to_last!; end
1030
-
1031
- sig { returns(T.nilable(Squib)) }
1032
- def last; end
1033
-
1034
- sig { returns(Squib) }
1035
- def last!; end
1036
-
1037
- sig { params(conditions: T.untyped).returns(T::Boolean) }
1038
- def exists?(conditions = nil); end
1039
-
1040
- sig { params(args: T.untyped).returns(T::Boolean) }
1041
- def any?(*args); end
1042
-
1043
- sig { params(args: T.untyped).returns(T::Boolean) }
1044
- def many?(*args); end
1045
-
1046
- sig { params(args: T.untyped).returns(T::Boolean) }
1047
- def none?(*args); end
1048
-
1049
- sig { params(args: T.untyped).returns(T::Boolean) }
1050
- def one?(*args); end
1051
-
1052
- sig { params(args: T.untyped).returns(T::Boolean) }
1053
- def empty?(*args); end
1054
-
1055
- sig { override.params(block: T.proc.params(e: Squib).void).returns(T::Array[Squib]) }
1056
- def each(&block); end
1057
-
1058
- sig { params(level: T.nilable(Integer)).returns(T::Array[Squib]) }
1059
- def flatten(level); end
1060
-
1061
- sig { returns(T::Array[Squib]) }
1062
- def to_a; end
1063
-
1064
- sig do
1065
- type_parameters(:U).params(
1066
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
1067
- )
1068
- .returns(T::Array[T.type_parameter(:U)])
1069
- end
1070
- def map(&blk); end
1071
640
  end
1072
641
 
1073
642
  class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
1074
643
  include Squib::CustomFinderMethods
1075
- include Enumerable
1076
- extend T::Sig
1077
- extend T::Generic
644
+ include Squib::QueryMethodsReturningAssociationRelation
1078
645
  Elem = type_member(fixed: Squib)
1079
646
 
1080
647
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
@@ -1188,10 +755,137 @@ class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associati
1188
755
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
1189
756
  def with_attached_school_photo(*args); end
1190
757
 
758
+ sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
759
+ def <<(*records); end
760
+
761
+ sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
762
+ def append(*records); end
763
+
764
+ sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
765
+ def push(*records); end
766
+
767
+ sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
768
+ def concat(*records); end
769
+ end
770
+
771
+ module Squib::QueryMethodsReturningRelation
772
+ sig { returns(Squib::ActiveRecord_Relation) }
773
+ def all; end
774
+
775
+ sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
776
+ def unscoped(&block); end
777
+
778
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
779
+ def select(*args); end
780
+
781
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
782
+ def reselect(*args); end
783
+
784
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
785
+ def order(*args); end
786
+
787
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
788
+ def reorder(*args); end
789
+
790
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
791
+ def group(*args); end
792
+
793
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
794
+ def limit(*args); end
795
+
796
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
797
+ def offset(*args); end
798
+
799
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
800
+ def joins(*args); end
801
+
802
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
803
+ def left_joins(*args); end
804
+
805
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
806
+ def left_outer_joins(*args); end
807
+
808
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
809
+ def where(*args); end
810
+
811
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
812
+ def rewhere(*args); end
813
+
814
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
815
+ def preload(*args); end
816
+
817
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
818
+ def extract_associated(*args); end
819
+
820
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
821
+ def eager_load(*args); end
822
+
823
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
824
+ def includes(*args); end
825
+
826
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
827
+ def from(*args); end
828
+
829
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
830
+ def lock(*args); end
831
+
832
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
833
+ def readonly(*args); end
834
+
835
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
836
+ def or(*args); end
837
+
838
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
839
+ def having(*args); end
840
+
841
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
842
+ def create_with(*args); end
843
+
844
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
845
+ def distinct(*args); end
846
+
847
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
848
+ def references(*args); end
849
+
850
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
851
+ def none(*args); end
852
+
853
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
854
+ def unscope(*args); end
855
+
856
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
857
+ def optimizer_hints(*args); end
858
+
859
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
860
+ def merge(*args); end
861
+
862
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
863
+ def except(*args); end
864
+
865
+ sig { params(args: T.untyped).returns(Squib::ActiveRecord_Relation) }
866
+ def only(*args); end
867
+
868
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
869
+ def extending(*args, &block); end
870
+
871
+ sig do
872
+ params(
873
+ of: T.nilable(Integer),
874
+ start: T.nilable(Integer),
875
+ finish: T.nilable(Integer),
876
+ load: T.nilable(T::Boolean),
877
+ error_on_ignore: T.nilable(T::Boolean),
878
+ block: T.nilable(T.proc.params(e: Squib::ActiveRecord_Relation).void)
879
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
880
+ end
881
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
882
+ end
883
+
884
+ module Squib::QueryMethodsReturningAssociationRelation
1191
885
  sig { returns(Squib::ActiveRecord_AssociationRelation) }
1192
886
  def all; end
1193
887
 
1194
- sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
888
+ sig { params(block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
1195
889
  def unscoped(&block); end
1196
890
 
1197
891
  sig { params(args: T.untyped).returns(Squib::ActiveRecord_AssociationRelation) }
@@ -1287,120 +981,35 @@ class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associati
1287
981
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
1288
982
  def extending(*args, &block); end
1289
983
 
1290
- sig { params(args: T.untyped).returns(Squib) }
1291
- def find(*args); end
1292
-
1293
- sig { params(args: T.untyped).returns(T.nilable(Squib)) }
1294
- def find_by(*args); end
1295
-
1296
- sig { params(args: T.untyped).returns(Squib) }
1297
- def find_by!(*args); end
1298
-
1299
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
1300
- def find_or_initialize_by(attributes, &block); end
1301
-
1302
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
1303
- def find_or_create_by(attributes, &block); end
1304
-
1305
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
1306
- def find_or_create_by!(attributes, &block); end
1307
-
1308
- sig { returns(T.nilable(Squib)) }
1309
- def first; end
1310
-
1311
- sig { returns(Squib) }
1312
- def first!; end
1313
-
1314
- sig { returns(T.nilable(Squib)) }
1315
- def second; end
1316
-
1317
- sig { returns(Squib) }
1318
- def second!; end
1319
-
1320
- sig { returns(T.nilable(Squib)) }
1321
- def third; end
1322
-
1323
- sig { returns(Squib) }
1324
- def third!; end
1325
-
1326
- sig { returns(T.nilable(Squib)) }
1327
- def third_to_last; end
1328
-
1329
- sig { returns(Squib) }
1330
- def third_to_last!; end
1331
-
1332
- sig { returns(T.nilable(Squib)) }
1333
- def second_to_last; end
1334
-
1335
- sig { returns(Squib) }
1336
- def second_to_last!; end
1337
-
1338
- sig { returns(T.nilable(Squib)) }
1339
- def last; end
1340
-
1341
- sig { returns(Squib) }
1342
- def last!; end
1343
-
1344
- sig { params(conditions: T.untyped).returns(T::Boolean) }
1345
- def exists?(conditions = nil); end
1346
-
1347
- sig { params(args: T.untyped).returns(T::Boolean) }
1348
- def any?(*args); end
1349
-
1350
- sig { params(args: T.untyped).returns(T::Boolean) }
1351
- def many?(*args); end
1352
-
1353
- sig { params(args: T.untyped).returns(T::Boolean) }
1354
- def none?(*args); end
1355
-
1356
- sig { params(args: T.untyped).returns(T::Boolean) }
1357
- def one?(*args); end
1358
-
1359
- sig { params(args: T.untyped).returns(T::Boolean) }
1360
- def empty?(*args); end
1361
-
1362
- sig { override.params(block: T.proc.params(e: Squib).void).returns(T::Array[Squib]) }
1363
- def each(&block); end
1364
-
1365
- sig { params(level: T.nilable(Integer)).returns(T::Array[Squib]) }
1366
- def flatten(level); end
1367
-
1368
- sig { returns(T::Array[Squib]) }
1369
- def to_a; end
1370
-
1371
984
  sig do
1372
- type_parameters(:U).params(
1373
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
1374
- )
1375
- .returns(T::Array[T.type_parameter(:U)])
985
+ params(
986
+ of: T.nilable(Integer),
987
+ start: T.nilable(Integer),
988
+ finish: T.nilable(Integer),
989
+ load: T.nilable(T::Boolean),
990
+ error_on_ignore: T.nilable(T::Boolean),
991
+ block: T.nilable(T.proc.params(e: Squib::ActiveRecord_AssociationRelation).void)
992
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
1376
993
  end
1377
- def map(&blk); end
1378
-
1379
- sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
1380
- def <<(*records); end
1381
-
1382
- sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
1383
- def append(*records); end
1384
-
1385
- sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
1386
- def push(*records); end
1387
-
1388
- sig { params(records: T.any(Squib, T::Array[Squib])).returns(T.self_type) }
1389
- def concat(*records); end
994
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
1390
995
  end
1391
996
 
1392
997
  module Squib::GeneratedAssociationMethods
1393
- extend T::Sig
1394
-
1395
998
  sig { returns(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
1396
999
  def hats_attachments; end
1397
1000
 
1001
+ sig { returns(T::Array[Integer]) }
1002
+ def hats_attachment_ids; end
1003
+
1398
1004
  sig { params(value: T::Enumerable[::ActiveStorage::Attachment]).void }
1399
1005
  def hats_attachments=(value); end
1400
1006
 
1401
1007
  sig { returns(::ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy) }
1402
1008
  def hats_blobs; end
1403
1009
 
1010
+ sig { returns(T::Array[Integer]) }
1011
+ def hats_blob_ids; end
1012
+
1404
1013
  sig { params(value: T::Enumerable[::ActiveStorage::Blob]).void }
1405
1014
  def hats_blobs=(value); end
1406
1015
 
@@ -1425,9 +1034,21 @@ module Squib::GeneratedAssociationMethods
1425
1034
  sig { returns(::SpellBook::ActiveRecord_Associations_CollectionProxy) }
1426
1035
  def spell_books; end
1427
1036
 
1037
+ sig { returns(T::Array[Integer]) }
1038
+ def spell_book_ids; end
1039
+
1428
1040
  sig { params(value: T::Enumerable[::SpellBook]).void }
1429
1041
  def spell_books=(value); end
1430
1042
 
1043
+ sig { returns(::Subject::ActiveRecord_Associations_CollectionProxy) }
1044
+ def subjects; end
1045
+
1046
+ sig { returns(T::Array[Integer]) }
1047
+ def subject_ids; end
1048
+
1049
+ sig { params(value: T::Enumerable[::Subject]).void }
1050
+ def subjects=(value); end
1051
+
1431
1052
  sig { returns(T.nilable(::Wand)) }
1432
1053
  def wand; end
1433
1054
 
@@ -1444,5 +1065,5 @@ module Squib::GeneratedAssociationMethods
1444
1065
  def hats; end
1445
1066
 
1446
1067
  sig { params(attachables: T.untyped).returns(T.untyped) }
1447
- def hats=(*attachables); end
1068
+ def hats=(attachables); end
1448
1069
  end