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,298 @@
1
+ # This is an autogenerated file for dynamic methods in Spell
2
+ # Please rerun bundle exec rake rails_rbi:models[Spell] to regenerate.
3
+
4
+ # typed: strong
5
+ module Spell::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 Spell::GeneratedAttributeMethods
11
+ sig { returns(Integer) }
12
+ def id; end
13
+
14
+ sig { params(value: T.any(Numeric, ActiveSupport::Duration)).void }
15
+ def id=(value); end
16
+
17
+ sig { returns(T::Boolean) }
18
+ def id?; end
19
+
20
+ sig { returns(T.nilable(String)) }
21
+ def name; end
22
+
23
+ sig { params(value: T.nilable(T.any(String, Symbol))).void }
24
+ def name=(value); end
25
+
26
+ sig { returns(T::Boolean) }
27
+ def name?; end
28
+ end
29
+
30
+ module Spell::GeneratedAssociationMethods
31
+ sig { returns(::SpellBook::ActiveRecord_Associations_CollectionProxy) }
32
+ def spell_books; end
33
+
34
+ sig { returns(T::Array[Integer]) }
35
+ def spell_book_ids; end
36
+
37
+ sig { params(value: T::Enumerable[::SpellBook]).void }
38
+ def spell_books=(value); end
39
+ end
40
+
41
+ module Spell::CustomFinderMethods
42
+ sig { params(limit: Integer).returns(T::Array[Spell]) }
43
+ def first_n(limit); end
44
+
45
+ sig { params(limit: Integer).returns(T::Array[Spell]) }
46
+ def last_n(limit); end
47
+
48
+ sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[Spell]) }
49
+ def find_n(*args); end
50
+
51
+ sig { params(id: Integer).returns(T.nilable(Spell)) }
52
+ def find_by_id(id); end
53
+
54
+ sig { params(id: Integer).returns(Spell) }
55
+ def find_by_id!(id); end
56
+ end
57
+
58
+ class Spell < ApplicationRecord
59
+ include Spell::GeneratedAttributeMethods
60
+ include Spell::GeneratedAssociationMethods
61
+ extend Spell::CustomFinderMethods
62
+ extend Spell::QueryMethodsReturningRelation
63
+ RelationType = T.type_alias { T.any(Spell::ActiveRecord_Relation, Spell::ActiveRecord_Associations_CollectionProxy, Spell::ActiveRecord_AssociationRelation) }
64
+ end
65
+
66
+ module Spell::QueryMethodsReturningRelation
67
+ sig { returns(Spell::ActiveRecord_Relation) }
68
+ def all; end
69
+
70
+ sig { params(block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_Relation) }
71
+ def unscoped(&block); end
72
+
73
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
74
+ def select(*args); end
75
+
76
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
77
+ def order(*args); end
78
+
79
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
80
+ def reorder(*args); end
81
+
82
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
83
+ def group(*args); end
84
+
85
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
86
+ def limit(*args); end
87
+
88
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
89
+ def offset(*args); end
90
+
91
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
92
+ def joins(*args); end
93
+
94
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
95
+ def left_joins(*args); end
96
+
97
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
98
+ def left_outer_joins(*args); end
99
+
100
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
101
+ def where(*args); end
102
+
103
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
104
+ def rewhere(*args); end
105
+
106
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
107
+ def preload(*args); end
108
+
109
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
110
+ def eager_load(*args); end
111
+
112
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
113
+ def includes(*args); end
114
+
115
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
116
+ def from(*args); end
117
+
118
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
119
+ def lock(*args); end
120
+
121
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
122
+ def readonly(*args); end
123
+
124
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
125
+ def or(*args); end
126
+
127
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
128
+ def having(*args); end
129
+
130
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
131
+ def create_with(*args); end
132
+
133
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
134
+ def distinct(*args); end
135
+
136
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
137
+ def references(*args); end
138
+
139
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
140
+ def none(*args); end
141
+
142
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
143
+ def unscope(*args); end
144
+
145
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
146
+ def merge(*args); end
147
+
148
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_Relation) }
149
+ def except(*args); end
150
+
151
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_Relation) }
152
+ def extending(*args, &block); end
153
+
154
+ sig do
155
+ params(
156
+ of: T.nilable(Integer),
157
+ start: T.nilable(Integer),
158
+ finish: T.nilable(Integer),
159
+ load: T.nilable(T::Boolean),
160
+ error_on_ignore: T.nilable(T::Boolean),
161
+ block: T.nilable(T.proc.params(e: Spell::ActiveRecord_Relation).void)
162
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
163
+ end
164
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
165
+ end
166
+
167
+ module Spell::QueryMethodsReturningAssociationRelation
168
+ sig { returns(Spell::ActiveRecord_AssociationRelation) }
169
+ def all; end
170
+
171
+ sig { params(block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_Relation) }
172
+ def unscoped(&block); end
173
+
174
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
175
+ def select(*args); end
176
+
177
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
178
+ def order(*args); end
179
+
180
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
181
+ def reorder(*args); end
182
+
183
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
184
+ def group(*args); end
185
+
186
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
187
+ def limit(*args); end
188
+
189
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
190
+ def offset(*args); end
191
+
192
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
193
+ def joins(*args); end
194
+
195
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
196
+ def left_joins(*args); end
197
+
198
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
199
+ def left_outer_joins(*args); end
200
+
201
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
202
+ def where(*args); end
203
+
204
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
205
+ def rewhere(*args); end
206
+
207
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
208
+ def preload(*args); end
209
+
210
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
211
+ def eager_load(*args); end
212
+
213
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
214
+ def includes(*args); end
215
+
216
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
217
+ def from(*args); end
218
+
219
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
220
+ def lock(*args); end
221
+
222
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
223
+ def readonly(*args); end
224
+
225
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
226
+ def or(*args); end
227
+
228
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
229
+ def having(*args); end
230
+
231
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
232
+ def create_with(*args); end
233
+
234
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
235
+ def distinct(*args); end
236
+
237
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
238
+ def references(*args); end
239
+
240
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
241
+ def none(*args); end
242
+
243
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
244
+ def unscope(*args); end
245
+
246
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
247
+ def merge(*args); end
248
+
249
+ sig { params(args: T.untyped).returns(Spell::ActiveRecord_AssociationRelation) }
250
+ def except(*args); end
251
+
252
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_AssociationRelation) }
253
+ def extending(*args, &block); end
254
+
255
+ sig do
256
+ params(
257
+ of: T.nilable(Integer),
258
+ start: T.nilable(Integer),
259
+ finish: T.nilable(Integer),
260
+ load: T.nilable(T::Boolean),
261
+ error_on_ignore: T.nilable(T::Boolean),
262
+ block: T.nilable(T.proc.params(e: Spell::ActiveRecord_AssociationRelation).void)
263
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
264
+ end
265
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
266
+ end
267
+
268
+ class Spell::ActiveRecord_Relation < ActiveRecord::Relation
269
+ include Spell::ActiveRelation_WhereNot
270
+ include Spell::CustomFinderMethods
271
+ include Spell::QueryMethodsReturningRelation
272
+ Elem = type_member(fixed: Spell)
273
+ end
274
+
275
+ class Spell::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
276
+ include Spell::ActiveRelation_WhereNot
277
+ include Spell::CustomFinderMethods
278
+ include Spell::QueryMethodsReturningAssociationRelation
279
+ Elem = type_member(fixed: Spell)
280
+ end
281
+
282
+ class Spell::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
283
+ include Spell::CustomFinderMethods
284
+ include Spell::QueryMethodsReturningAssociationRelation
285
+ Elem = type_member(fixed: Spell)
286
+
287
+ sig { params(records: T.any(Spell, T::Array[Spell])).returns(T.self_type) }
288
+ def <<(*records); end
289
+
290
+ sig { params(records: T.any(Spell, T::Array[Spell])).returns(T.self_type) }
291
+ def append(*records); end
292
+
293
+ sig { params(records: T.any(Spell, T::Array[Spell])).returns(T.self_type) }
294
+ def push(*records); end
295
+
296
+ sig { params(records: T.any(Spell, T::Array[Spell])).returns(T.self_type) }
297
+ def concat(*records); end
298
+ end
@@ -0,0 +1,301 @@
1
+ # This is an autogenerated file for dynamic methods in Spell::HABTM_SpellBooks
2
+ # Please rerun bundle exec rake rails_rbi:models[Spell::HABTM_SpellBooks] to regenerate.
3
+
4
+ # typed: strong
5
+ module Spell::HABTM_SpellBooks::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 Spell::HABTM_SpellBooks::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 Spell::HABTM_SpellBooks::GeneratedAssociationMethods
31
+ sig { returns(T.nilable(::Spell)) }
32
+ def left_side; end
33
+
34
+ sig { params(value: T.nilable(::Spell)).void }
35
+ def left_side=(value); end
36
+
37
+ sig { returns(::SpellBook) }
38
+ def spell_book; end
39
+
40
+ sig { params(value: ::SpellBook).void }
41
+ def spell_book=(value); end
42
+ end
43
+
44
+ module Spell::HABTM_SpellBooks::CustomFinderMethods
45
+ sig { params(limit: Integer).returns(T::Array[Spell::HABTM_SpellBooks]) }
46
+ def first_n(limit); end
47
+
48
+ sig { params(limit: Integer).returns(T::Array[Spell::HABTM_SpellBooks]) }
49
+ def last_n(limit); end
50
+
51
+ sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[Spell::HABTM_SpellBooks]) }
52
+ def find_n(*args); end
53
+
54
+ sig { params(id: Integer).returns(T.nilable(Spell::HABTM_SpellBooks)) }
55
+ def find_by_id(id); end
56
+
57
+ sig { params(id: Integer).returns(Spell::HABTM_SpellBooks) }
58
+ def find_by_id!(id); end
59
+ end
60
+
61
+ class Spell::HABTM_SpellBooks < ActiveRecord::Base
62
+ include Spell::HABTM_SpellBooks::GeneratedAttributeMethods
63
+ include Spell::HABTM_SpellBooks::GeneratedAssociationMethods
64
+ extend Spell::HABTM_SpellBooks::CustomFinderMethods
65
+ extend Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
66
+ RelationType = T.type_alias { T.any(Spell::HABTM_SpellBooks::ActiveRecord_Relation, Spell::HABTM_SpellBooks::ActiveRecord_Associations_CollectionProxy, Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
67
+ end
68
+
69
+ module Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
70
+ sig { returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
71
+ def all; end
72
+
73
+ sig { params(block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
74
+ def unscoped(&block); end
75
+
76
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
77
+ def select(*args); end
78
+
79
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
80
+ def order(*args); end
81
+
82
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
83
+ def reorder(*args); end
84
+
85
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
86
+ def group(*args); end
87
+
88
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
89
+ def limit(*args); end
90
+
91
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
92
+ def offset(*args); end
93
+
94
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
95
+ def joins(*args); end
96
+
97
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
98
+ def left_joins(*args); end
99
+
100
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
101
+ def left_outer_joins(*args); end
102
+
103
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
104
+ def where(*args); end
105
+
106
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
107
+ def rewhere(*args); end
108
+
109
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
110
+ def preload(*args); end
111
+
112
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
113
+ def eager_load(*args); end
114
+
115
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
116
+ def includes(*args); end
117
+
118
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
119
+ def from(*args); end
120
+
121
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
122
+ def lock(*args); end
123
+
124
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
125
+ def readonly(*args); end
126
+
127
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
128
+ def or(*args); end
129
+
130
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
131
+ def having(*args); end
132
+
133
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
134
+ def create_with(*args); end
135
+
136
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
137
+ def distinct(*args); end
138
+
139
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
140
+ def references(*args); end
141
+
142
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
143
+ def none(*args); end
144
+
145
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
146
+ def unscope(*args); end
147
+
148
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
149
+ def merge(*args); end
150
+
151
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
152
+ def except(*args); end
153
+
154
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
155
+ def extending(*args, &block); end
156
+
157
+ sig do
158
+ params(
159
+ of: T.nilable(Integer),
160
+ start: T.nilable(Integer),
161
+ finish: T.nilable(Integer),
162
+ load: T.nilable(T::Boolean),
163
+ error_on_ignore: T.nilable(T::Boolean),
164
+ block: T.nilable(T.proc.params(e: Spell::HABTM_SpellBooks::ActiveRecord_Relation).void)
165
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
166
+ end
167
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
168
+ end
169
+
170
+ module Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
171
+ sig { returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
172
+ def all; end
173
+
174
+ sig { params(block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
175
+ def unscoped(&block); end
176
+
177
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
178
+ def select(*args); end
179
+
180
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
181
+ def order(*args); end
182
+
183
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
184
+ def reorder(*args); end
185
+
186
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
187
+ def group(*args); end
188
+
189
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
190
+ def limit(*args); end
191
+
192
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
193
+ def offset(*args); end
194
+
195
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
196
+ def joins(*args); end
197
+
198
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
199
+ def left_joins(*args); end
200
+
201
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
202
+ def left_outer_joins(*args); end
203
+
204
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
205
+ def where(*args); end
206
+
207
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
208
+ def rewhere(*args); end
209
+
210
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
211
+ def preload(*args); end
212
+
213
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
214
+ def eager_load(*args); end
215
+
216
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
217
+ def includes(*args); end
218
+
219
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
220
+ def from(*args); end
221
+
222
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
223
+ def lock(*args); end
224
+
225
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
226
+ def readonly(*args); end
227
+
228
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
229
+ def or(*args); end
230
+
231
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
232
+ def having(*args); end
233
+
234
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
235
+ def create_with(*args); end
236
+
237
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
238
+ def distinct(*args); end
239
+
240
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
241
+ def references(*args); end
242
+
243
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
244
+ def none(*args); end
245
+
246
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
247
+ def unscope(*args); end
248
+
249
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
250
+ def merge(*args); end
251
+
252
+ sig { params(args: T.untyped).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
253
+ def except(*args); end
254
+
255
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
256
+ def extending(*args, &block); end
257
+
258
+ sig do
259
+ params(
260
+ of: T.nilable(Integer),
261
+ start: T.nilable(Integer),
262
+ finish: T.nilable(Integer),
263
+ load: T.nilable(T::Boolean),
264
+ error_on_ignore: T.nilable(T::Boolean),
265
+ block: T.nilable(T.proc.params(e: Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation).void)
266
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
267
+ end
268
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
269
+ end
270
+
271
+ class Spell::HABTM_SpellBooks::ActiveRecord_Relation < ActiveRecord::Relation
272
+ include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
273
+ include Spell::HABTM_SpellBooks::CustomFinderMethods
274
+ include Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
275
+ Elem = type_member(fixed: Spell::HABTM_SpellBooks)
276
+ end
277
+
278
+ class Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
279
+ include Spell::HABTM_SpellBooks::ActiveRelation_WhereNot
280
+ include Spell::HABTM_SpellBooks::CustomFinderMethods
281
+ include Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
282
+ Elem = type_member(fixed: Spell::HABTM_SpellBooks)
283
+ end
284
+
285
+ class Spell::HABTM_SpellBooks::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
286
+ include Spell::HABTM_SpellBooks::CustomFinderMethods
287
+ include Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
288
+ Elem = type_member(fixed: Spell::HABTM_SpellBooks)
289
+
290
+ sig { params(records: T.any(Spell::HABTM_SpellBooks, T::Array[Spell::HABTM_SpellBooks])).returns(T.self_type) }
291
+ def <<(*records); end
292
+
293
+ sig { params(records: T.any(Spell::HABTM_SpellBooks, T::Array[Spell::HABTM_SpellBooks])).returns(T.self_type) }
294
+ def append(*records); end
295
+
296
+ sig { params(records: T.any(Spell::HABTM_SpellBooks, T::Array[Spell::HABTM_SpellBooks])).returns(T.self_type) }
297
+ def push(*records); end
298
+
299
+ sig { params(records: T.any(Spell::HABTM_SpellBooks, T::Array[Spell::HABTM_SpellBooks])).returns(T.self_type) }
300
+ def concat(*records); end
301
+ end