sorbet-rails 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/README.md +48 -17
  4. data/lib/bundled_rbi/parameters.rbi +50 -0
  5. data/lib/sorbet-rails.rb +1 -0
  6. data/lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb +1 -1
  7. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +1 -1
  8. data/lib/sorbet-rails/gem_plugins/pg_search_plugin.rb +1 -1
  9. data/lib/sorbet-rails/mailer_rbi_formatter.rb +2 -2
  10. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +1 -1
  11. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +1 -1
  12. data/lib/sorbet-rails/model_plugins/active_record_enum.rb +1 -1
  13. data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +1 -1
  14. data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +1 -1
  15. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +1 -1
  16. data/lib/sorbet-rails/model_plugins/active_relation_where_not.rb +1 -1
  17. data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
  18. data/lib/sorbet-rails/model_plugins/base.rb +1 -1
  19. data/lib/sorbet-rails/model_plugins/custom_finder_methods.rb +1 -1
  20. data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +1 -1
  21. data/lib/sorbet-rails/model_plugins/plugins.rb +0 -1
  22. data/lib/sorbet-rails/model_rbi_formatter.rb +5 -3
  23. data/lib/sorbet-rails/{model_plugins → rails_mixins}/active_record_overrides.rb +0 -0
  24. data/lib/sorbet-rails/{custom_finder_methods.rb → rails_mixins/custom_finder_methods.rb} +1 -1
  25. data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +46 -0
  26. data/lib/sorbet-rails/railtie.rb +8 -1
  27. data/lib/sorbet-rails/routes_rbi_formatter.rb +1 -2
  28. data/lib/sorbet-rails/tasks/rails_rbi.rake +22 -0
  29. data/lib/sorbet-rails/type_assert/type_assert.rb +18 -0
  30. data/lib/sorbet-rails/type_assert/type_assert_impl.rb +26 -0
  31. data/lib/sorbet-rails/type_assert/type_assert_interface.rb +16 -0
  32. data/sorbet-rails.gemspec +2 -2
  33. data/spec/custom_finder_methods_spec.rb +5 -0
  34. data/spec/custom_params_methods_spec.rb +138 -0
  35. data/spec/generators/sorbet_test_cases.rb +49 -0
  36. data/spec/model_rbi_formatter_spec.rb +10 -3
  37. data/spec/sorbet_spec.rb +1 -5
  38. data/spec/support/v4.2/Gemfile.lock +3 -3
  39. data/spec/support/v4.2/sorbet_test_cases.rb +49 -0
  40. data/spec/support/v5.0/Gemfile.lock +3 -3
  41. data/spec/support/v5.0/sorbet_test_cases.rb +49 -0
  42. data/spec/support/v5.1/Gemfile.lock +3 -3
  43. data/spec/support/v5.1/sorbet_test_cases.rb +49 -0
  44. data/spec/support/v5.2/Gemfile.lock +3 -3
  45. data/spec/support/v5.2/sorbet_test_cases.rb +49 -0
  46. data/spec/support/v6.0/Gemfile.lock +3 -3
  47. data/spec/support/v6.0/sorbet_test_cases.rb +49 -0
  48. data/spec/test_data/v4.2/expected_helpers.rbi +1 -1
  49. data/spec/test_data/v4.2/expected_helpers_with_application_and_devise_helpers.rbi +1 -1
  50. data/spec/test_data/v4.2/expected_potion.rbi +3 -3
  51. data/spec/test_data/v4.2/expected_spell_book.rbi +3 -3
  52. data/spec/test_data/v4.2/expected_wand.rbi +3 -3
  53. data/spec/test_data/v4.2/expected_wizard.rbi +3 -3
  54. data/spec/test_data/v4.2/expected_wizard_wo_spellbook.rbi +3 -3
  55. data/spec/test_data/v5.0/expected_helpers.rbi +1 -1
  56. data/spec/test_data/v5.0/expected_helpers_with_application_and_devise_helpers.rbi +1 -1
  57. data/spec/test_data/v5.0/expected_internal_metadata.rbi +3 -3
  58. data/spec/test_data/v5.0/expected_potion.rbi +3 -3
  59. data/spec/test_data/v5.0/expected_schema_migration.rbi +3 -3
  60. data/spec/test_data/v5.0/expected_spell_book.rbi +3 -3
  61. data/spec/test_data/v5.0/expected_wand.rbi +3 -3
  62. data/spec/test_data/v5.0/expected_wizard.rbi +3 -3
  63. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +3 -3
  64. data/spec/test_data/v5.1/expected_helpers.rbi +1 -1
  65. data/spec/test_data/v5.1/expected_helpers_with_application_and_devise_helpers.rbi +1 -1
  66. data/spec/test_data/v5.1/expected_internal_metadata.rbi +3 -3
  67. data/spec/test_data/v5.1/expected_potion.rbi +3 -3
  68. data/spec/test_data/v5.1/expected_schema_migration.rbi +3 -3
  69. data/spec/test_data/v5.1/expected_spell_book.rbi +3 -3
  70. data/spec/test_data/v5.1/expected_wand.rbi +3 -3
  71. data/spec/test_data/v5.1/expected_wizard.rbi +3 -3
  72. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +3 -3
  73. data/spec/test_data/v5.2/expected_attachment.rbi +3 -3
  74. data/spec/test_data/v5.2/expected_blob.rbi +3 -3
  75. data/spec/test_data/v5.2/expected_helpers.rbi +1 -1
  76. data/spec/test_data/v5.2/expected_helpers_with_application_and_devise_helpers.rbi +1 -1
  77. data/spec/test_data/v5.2/expected_internal_metadata.rbi +3 -3
  78. data/spec/test_data/v5.2/expected_potion.rbi +3 -3
  79. data/spec/test_data/v5.2/expected_schema_migration.rbi +3 -3
  80. data/spec/test_data/v5.2/expected_spell_book.rbi +3 -3
  81. data/spec/test_data/v5.2/expected_wand.rbi +3 -3
  82. data/spec/test_data/v5.2/expected_wizard.rbi +3 -3
  83. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +3 -3
  84. data/spec/test_data/v6.0/expected_attachment.rbi +3 -3
  85. data/spec/test_data/v6.0/expected_blob.rbi +3 -3
  86. data/spec/test_data/v6.0/expected_helpers.rbi +1 -1
  87. data/spec/test_data/v6.0/expected_helpers_with_application_and_devise_helpers.rbi +1 -1
  88. data/spec/test_data/v6.0/expected_internal_metadata.rbi +3 -3
  89. data/spec/test_data/v6.0/expected_potion.rbi +3 -3
  90. data/spec/test_data/v6.0/expected_schema_migration.rbi +3 -3
  91. data/spec/test_data/v6.0/expected_spell_book.rbi +3 -3
  92. data/spec/test_data/v6.0/expected_wand.rbi +3 -3
  93. data/spec/test_data/v6.0/expected_wizard.rbi +3 -3
  94. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +3 -3
  95. metadata +12 -33
  96. data/spec/test_data/v5.2-no-sorbet/expected_attachment.rbi +0 -725
  97. data/spec/test_data/v5.2-no-sorbet/expected_blob.rbi +0 -755
  98. data/spec/test_data/v5.2-no-sorbet/expected_helpers.rbi +0 -22
  99. data/spec/test_data/v5.2-no-sorbet/expected_helpers_with_application_and_devise_helpers.rbi +0 -29
  100. data/spec/test_data/v5.2-no-sorbet/expected_internal_metadata.rbi +0 -749
  101. data/spec/test_data/v5.2-no-sorbet/expected_no_routes.rbi +0 -4
  102. data/spec/test_data/v5.2-no-sorbet/expected_potion.rbi +0 -708
  103. data/spec/test_data/v5.2-no-sorbet/expected_routes.rbi +0 -54
  104. data/spec/test_data/v5.2-no-sorbet/expected_schema_migration.rbi +0 -722
  105. data/spec/test_data/v5.2-no-sorbet/expected_spell_book.rbi +0 -822
  106. data/spec/test_data/v5.2-no-sorbet/expected_srb_tc_output.txt +0 -1
  107. data/spec/test_data/v5.2-no-sorbet/expected_wand.rbi +0 -933
  108. data/spec/test_data/v5.2-no-sorbet/expected_wizard.rbi +0 -885
  109. data/spec/test_data/v5.2-no-sorbet/expected_wizard_wo_spellbook.rbi +0 -885
@@ -1,822 +0,0 @@
1
- # This is an autogenerated file for dynamic methods in SpellBook
2
- # Please rerun rake rails_rbi:models[SpellBook] to regenerate.
3
-
4
- # typed: strong
5
- module SpellBook::EnumInstanceMethods
6
- extend T::Sig
7
-
8
- sig { returns(T::Boolean) }
9
- def unclassified?; end
10
-
11
- sig { void }
12
- def unclassified!; end
13
-
14
- sig { returns(T::Boolean) }
15
- def biology?; end
16
-
17
- sig { void }
18
- def biology!; end
19
-
20
- sig { returns(T::Boolean) }
21
- def dark_art?; end
22
-
23
- sig { void }
24
- def dark_art!; end
25
- end
26
-
27
- module SpellBook::ActiveRelation_WhereNot
28
- sig { params(opts: T.untyped, rest: T.untyped).returns(T.self_type) }
29
- def not(opts, *rest); end
30
- end
31
-
32
- module SpellBook::GeneratedAttributeMethods
33
- extend T::Sig
34
-
35
- sig { returns(String) }
36
- def book_type; end
37
-
38
- sig { params(value: T.any(Integer, String, Symbol)).void }
39
- def book_type=(value); end
40
-
41
- sig { returns(T::Boolean) }
42
- def book_type?; end
43
-
44
- sig { returns(Integer) }
45
- def id; end
46
-
47
- sig { params(value: Integer).void }
48
- def id=(value); end
49
-
50
- sig { returns(T::Boolean) }
51
- def id?; end
52
-
53
- sig { returns(T.nilable(String)) }
54
- def name; end
55
-
56
- sig { params(value: T.nilable(String)).void }
57
- def name=(value); end
58
-
59
- sig { returns(T::Boolean) }
60
- def name?; end
61
-
62
- sig { returns(T.nilable(Integer)) }
63
- def wizard_id; end
64
-
65
- sig { params(value: T.nilable(Integer)).void }
66
- def wizard_id=(value); end
67
-
68
- sig { returns(T::Boolean) }
69
- def wizard_id?; end
70
- end
71
-
72
- module SpellBook::GeneratedAssociationMethods
73
- extend T::Sig
74
-
75
- sig { returns(T.nilable(::Wizard)) }
76
- def wizard; end
77
-
78
- sig { params(value: T.nilable(::Wizard)).void }
79
- def wizard=(value); end
80
- end
81
-
82
- module SpellBook::CustomFinderMethods
83
- sig { params(limit: Integer).returns(T::Array[SpellBook]) }
84
- def first_n(limit); end
85
-
86
- sig { params(limit: Integer).returns(T::Array[SpellBook]) }
87
- def last_n(limit); end
88
-
89
- sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[SpellBook]) }
90
- def find_n(*args); end
91
-
92
- sig { params(id: Integer).returns(T.nilable(SpellBook)) }
93
- def find_by_id(id); end
94
-
95
- sig { params(id: Integer).returns(SpellBook) }
96
- def find_by_id!(id); end
97
- end
98
-
99
- class SpellBook < ApplicationRecord
100
- include SpellBook::EnumInstanceMethods
101
- include SpellBook::GeneratedAttributeMethods
102
- include SpellBook::GeneratedAssociationMethods
103
- extend SpellBook::CustomFinderMethods
104
- extend T::Sig
105
- extend T::Generic
106
-
107
- sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
108
- def self.book_types; end
109
-
110
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
111
- def self.biology(*args); end
112
-
113
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
114
- def self.dark_art(*args); end
115
-
116
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
117
- def self.unclassified(*args); end
118
-
119
- sig { returns(SpellBook::ActiveRecord_Relation) }
120
- def self.all; end
121
-
122
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
123
- def self.unscoped(&block); end
124
-
125
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
126
- def self.select(*args, &block); end
127
-
128
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
129
- def self.order(*args, &block); end
130
-
131
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
132
- def self.reorder(*args, &block); end
133
-
134
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
135
- def self.group(*args, &block); end
136
-
137
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
138
- def self.limit(*args, &block); end
139
-
140
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
141
- def self.offset(*args, &block); end
142
-
143
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
144
- def self.joins(*args, &block); end
145
-
146
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
147
- def self.left_joins(*args, &block); end
148
-
149
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
150
- def self.left_outer_joins(*args, &block); end
151
-
152
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
153
- def self.where(*args, &block); end
154
-
155
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
156
- def self.rewhere(*args, &block); end
157
-
158
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
159
- def self.preload(*args, &block); end
160
-
161
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
162
- def self.eager_load(*args, &block); end
163
-
164
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
165
- def self.includes(*args, &block); end
166
-
167
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
168
- def self.from(*args, &block); end
169
-
170
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
171
- def self.lock(*args, &block); end
172
-
173
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
174
- def self.readonly(*args, &block); end
175
-
176
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
177
- def self.extending(*args, &block); end
178
-
179
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
180
- def self.or(*args, &block); end
181
-
182
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
183
- def self.having(*args, &block); end
184
-
185
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
186
- def self.create_with(*args, &block); end
187
-
188
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
189
- def self.distinct(*args, &block); end
190
-
191
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
192
- def self.references(*args, &block); end
193
-
194
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
195
- def self.none(*args, &block); end
196
-
197
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
198
- def self.unscope(*args, &block); end
199
-
200
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
201
- def self.merge(*args, &block); end
202
-
203
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
204
- def self.except(*args, &block); end
205
-
206
- sig { params(args: T.untyped).returns(SpellBook) }
207
- def self.find(*args); end
208
-
209
- sig { params(args: T.untyped).returns(T.nilable(SpellBook)) }
210
- def self.find_by(*args); end
211
-
212
- sig { params(args: T.untyped).returns(SpellBook) }
213
- def self.find_by!(*args); end
214
-
215
- sig { returns(T.nilable(SpellBook)) }
216
- def self.first; end
217
-
218
- sig { returns(SpellBook) }
219
- def self.first!; end
220
-
221
- sig { returns(T.nilable(SpellBook)) }
222
- def self.second; end
223
-
224
- sig { returns(SpellBook) }
225
- def self.second!; end
226
-
227
- sig { returns(T.nilable(SpellBook)) }
228
- def self.third; end
229
-
230
- sig { returns(SpellBook) }
231
- def self.third!; end
232
-
233
- sig { returns(T.nilable(SpellBook)) }
234
- def self.third_to_last; end
235
-
236
- sig { returns(SpellBook) }
237
- def self.third_to_last!; end
238
-
239
- sig { returns(T.nilable(SpellBook)) }
240
- def self.second_to_last; end
241
-
242
- sig { returns(SpellBook) }
243
- def self.second_to_last!; end
244
-
245
- sig { returns(T.nilable(SpellBook)) }
246
- def self.last; end
247
-
248
- sig { returns(SpellBook) }
249
- def self.last!; end
250
-
251
- sig { params(conditions: T.untyped).returns(T::Boolean) }
252
- def self.exists?(conditions = nil); end
253
-
254
- sig { params(args: T.untyped).returns(T::Boolean) }
255
- def self.any?(*args); end
256
-
257
- sig { params(args: T.untyped).returns(T::Boolean) }
258
- def self.many?(*args); end
259
-
260
- sig { params(args: T.untyped).returns(T::Boolean) }
261
- def self.none?(*args); end
262
-
263
- sig { params(args: T.untyped).returns(T::Boolean) }
264
- def self.one?(*args); end
265
- end
266
-
267
- class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
268
- include SpellBook::ActiveRelation_WhereNot
269
- include SpellBook::CustomFinderMethods
270
- include Enumerable
271
- extend T::Sig
272
- extend T::Generic
273
- Elem = type_member(fixed: SpellBook)
274
-
275
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
276
- def biology(*args); end
277
-
278
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
279
- def dark_art(*args); end
280
-
281
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
282
- def unclassified(*args); end
283
-
284
- sig { returns(SpellBook::ActiveRecord_Relation) }
285
- def all; end
286
-
287
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
288
- def unscoped(&block); end
289
-
290
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
291
- def select(*args, &block); end
292
-
293
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
294
- def order(*args, &block); end
295
-
296
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
297
- def reorder(*args, &block); end
298
-
299
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
300
- def group(*args, &block); end
301
-
302
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
303
- def limit(*args, &block); end
304
-
305
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
306
- def offset(*args, &block); end
307
-
308
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
309
- def joins(*args, &block); end
310
-
311
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
312
- def left_joins(*args, &block); end
313
-
314
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
315
- def left_outer_joins(*args, &block); end
316
-
317
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
318
- def where(*args, &block); end
319
-
320
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
321
- def rewhere(*args, &block); end
322
-
323
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
324
- def preload(*args, &block); end
325
-
326
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
327
- def eager_load(*args, &block); end
328
-
329
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
330
- def includes(*args, &block); end
331
-
332
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
333
- def from(*args, &block); end
334
-
335
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
336
- def lock(*args, &block); end
337
-
338
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
339
- def readonly(*args, &block); end
340
-
341
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
342
- def extending(*args, &block); end
343
-
344
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
345
- def or(*args, &block); end
346
-
347
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
348
- def having(*args, &block); end
349
-
350
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
351
- def create_with(*args, &block); end
352
-
353
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
354
- def distinct(*args, &block); end
355
-
356
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
357
- def references(*args, &block); end
358
-
359
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
360
- def none(*args, &block); end
361
-
362
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
363
- def unscope(*args, &block); end
364
-
365
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
366
- def merge(*args, &block); end
367
-
368
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
369
- def except(*args, &block); end
370
-
371
- sig { params(args: T.untyped).returns(SpellBook) }
372
- def find(*args); end
373
-
374
- sig { params(args: T.untyped).returns(T.nilable(SpellBook)) }
375
- def find_by(*args); end
376
-
377
- sig { params(args: T.untyped).returns(SpellBook) }
378
- def find_by!(*args); end
379
-
380
- sig { returns(T.nilable(SpellBook)) }
381
- def first; end
382
-
383
- sig { returns(SpellBook) }
384
- def first!; end
385
-
386
- sig { returns(T.nilable(SpellBook)) }
387
- def second; end
388
-
389
- sig { returns(SpellBook) }
390
- def second!; end
391
-
392
- sig { returns(T.nilable(SpellBook)) }
393
- def third; end
394
-
395
- sig { returns(SpellBook) }
396
- def third!; end
397
-
398
- sig { returns(T.nilable(SpellBook)) }
399
- def third_to_last; end
400
-
401
- sig { returns(SpellBook) }
402
- def third_to_last!; end
403
-
404
- sig { returns(T.nilable(SpellBook)) }
405
- def second_to_last; end
406
-
407
- sig { returns(SpellBook) }
408
- def second_to_last!; end
409
-
410
- sig { returns(T.nilable(SpellBook)) }
411
- def last; end
412
-
413
- sig { returns(SpellBook) }
414
- def last!; end
415
-
416
- sig { params(conditions: T.untyped).returns(T::Boolean) }
417
- def exists?(conditions = nil); end
418
-
419
- sig { params(args: T.untyped).returns(T::Boolean) }
420
- def any?(*args); end
421
-
422
- sig { params(args: T.untyped).returns(T::Boolean) }
423
- def many?(*args); end
424
-
425
- sig { params(args: T.untyped).returns(T::Boolean) }
426
- def none?(*args); end
427
-
428
- sig { params(args: T.untyped).returns(T::Boolean) }
429
- def one?(*args); end
430
-
431
- sig { implementation.params(block: T.proc.params(e: SpellBook).void).void }
432
- def each(&block); end
433
-
434
- sig { params(level: T.nilable(Integer)).returns(T::Array[SpellBook]) }
435
- def flatten(level); end
436
-
437
- sig { returns(T::Array[SpellBook]) }
438
- def to_a; end
439
-
440
- sig do
441
- type_parameters(:U).params(
442
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
443
- )
444
- .returns(T::Array[T.type_parameter(:U)])
445
- end
446
- def map(&blk); end
447
- end
448
-
449
- class SpellBook::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
450
- include SpellBook::ActiveRelation_WhereNot
451
- include SpellBook::CustomFinderMethods
452
- include Enumerable
453
- extend T::Sig
454
- extend T::Generic
455
- Elem = type_member(fixed: SpellBook)
456
-
457
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
458
- def biology(*args); end
459
-
460
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
461
- def dark_art(*args); end
462
-
463
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
464
- def unclassified(*args); end
465
-
466
- sig { returns(SpellBook::ActiveRecord_AssociationRelation) }
467
- def all; end
468
-
469
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
470
- def unscoped(&block); end
471
-
472
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
473
- def select(*args, &block); end
474
-
475
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
476
- def order(*args, &block); end
477
-
478
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
479
- def reorder(*args, &block); end
480
-
481
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
482
- def group(*args, &block); end
483
-
484
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
485
- def limit(*args, &block); end
486
-
487
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
488
- def offset(*args, &block); end
489
-
490
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
491
- def joins(*args, &block); end
492
-
493
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
494
- def left_joins(*args, &block); end
495
-
496
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
497
- def left_outer_joins(*args, &block); end
498
-
499
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
500
- def where(*args, &block); end
501
-
502
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
503
- def rewhere(*args, &block); end
504
-
505
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
506
- def preload(*args, &block); end
507
-
508
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
509
- def eager_load(*args, &block); end
510
-
511
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
512
- def includes(*args, &block); end
513
-
514
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
515
- def from(*args, &block); end
516
-
517
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
518
- def lock(*args, &block); end
519
-
520
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
521
- def readonly(*args, &block); end
522
-
523
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
524
- def extending(*args, &block); end
525
-
526
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
527
- def or(*args, &block); end
528
-
529
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
530
- def having(*args, &block); end
531
-
532
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
533
- def create_with(*args, &block); end
534
-
535
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
536
- def distinct(*args, &block); end
537
-
538
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
539
- def references(*args, &block); end
540
-
541
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
542
- def none(*args, &block); end
543
-
544
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
545
- def unscope(*args, &block); end
546
-
547
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
548
- def merge(*args, &block); end
549
-
550
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
551
- def except(*args, &block); end
552
-
553
- sig { params(args: T.untyped).returns(SpellBook) }
554
- def find(*args); end
555
-
556
- sig { params(args: T.untyped).returns(T.nilable(SpellBook)) }
557
- def find_by(*args); end
558
-
559
- sig { params(args: T.untyped).returns(SpellBook) }
560
- def find_by!(*args); end
561
-
562
- sig { returns(T.nilable(SpellBook)) }
563
- def first; end
564
-
565
- sig { returns(SpellBook) }
566
- def first!; end
567
-
568
- sig { returns(T.nilable(SpellBook)) }
569
- def second; end
570
-
571
- sig { returns(SpellBook) }
572
- def second!; end
573
-
574
- sig { returns(T.nilable(SpellBook)) }
575
- def third; end
576
-
577
- sig { returns(SpellBook) }
578
- def third!; end
579
-
580
- sig { returns(T.nilable(SpellBook)) }
581
- def third_to_last; end
582
-
583
- sig { returns(SpellBook) }
584
- def third_to_last!; end
585
-
586
- sig { returns(T.nilable(SpellBook)) }
587
- def second_to_last; end
588
-
589
- sig { returns(SpellBook) }
590
- def second_to_last!; end
591
-
592
- sig { returns(T.nilable(SpellBook)) }
593
- def last; end
594
-
595
- sig { returns(SpellBook) }
596
- def last!; end
597
-
598
- sig { params(conditions: T.untyped).returns(T::Boolean) }
599
- def exists?(conditions = nil); end
600
-
601
- sig { params(args: T.untyped).returns(T::Boolean) }
602
- def any?(*args); end
603
-
604
- sig { params(args: T.untyped).returns(T::Boolean) }
605
- def many?(*args); end
606
-
607
- sig { params(args: T.untyped).returns(T::Boolean) }
608
- def none?(*args); end
609
-
610
- sig { params(args: T.untyped).returns(T::Boolean) }
611
- def one?(*args); end
612
-
613
- sig { implementation.params(block: T.proc.params(e: SpellBook).void).void }
614
- def each(&block); end
615
-
616
- sig { params(level: T.nilable(Integer)).returns(T::Array[SpellBook]) }
617
- def flatten(level); end
618
-
619
- sig { returns(T::Array[SpellBook]) }
620
- def to_a; end
621
-
622
- sig do
623
- type_parameters(:U).params(
624
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
625
- )
626
- .returns(T::Array[T.type_parameter(:U)])
627
- end
628
- def map(&blk); end
629
- end
630
-
631
- class SpellBook::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
632
- include SpellBook::CustomFinderMethods
633
- include Enumerable
634
- extend T::Sig
635
- extend T::Generic
636
- Elem = type_member(fixed: SpellBook)
637
-
638
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
639
- def biology(*args); end
640
-
641
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
642
- def dark_art(*args); end
643
-
644
- sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_AssociationRelation) }
645
- def unclassified(*args); end
646
-
647
- sig { returns(SpellBook::ActiveRecord_AssociationRelation) }
648
- def all; end
649
-
650
- sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
651
- def unscoped(&block); end
652
-
653
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
654
- def select(*args, &block); end
655
-
656
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
657
- def order(*args, &block); end
658
-
659
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
660
- def reorder(*args, &block); end
661
-
662
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
663
- def group(*args, &block); end
664
-
665
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
666
- def limit(*args, &block); end
667
-
668
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
669
- def offset(*args, &block); end
670
-
671
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
672
- def joins(*args, &block); end
673
-
674
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
675
- def left_joins(*args, &block); end
676
-
677
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
678
- def left_outer_joins(*args, &block); end
679
-
680
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
681
- def where(*args, &block); end
682
-
683
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
684
- def rewhere(*args, &block); end
685
-
686
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
687
- def preload(*args, &block); end
688
-
689
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
690
- def eager_load(*args, &block); end
691
-
692
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
693
- def includes(*args, &block); end
694
-
695
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
696
- def from(*args, &block); end
697
-
698
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
699
- def lock(*args, &block); end
700
-
701
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
702
- def readonly(*args, &block); end
703
-
704
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
705
- def extending(*args, &block); end
706
-
707
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
708
- def or(*args, &block); end
709
-
710
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
711
- def having(*args, &block); end
712
-
713
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
714
- def create_with(*args, &block); end
715
-
716
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
717
- def distinct(*args, &block); end
718
-
719
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
720
- def references(*args, &block); end
721
-
722
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
723
- def none(*args, &block); end
724
-
725
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
726
- def unscope(*args, &block); end
727
-
728
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
729
- def merge(*args, &block); end
730
-
731
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
732
- def except(*args, &block); end
733
-
734
- sig { params(args: T.untyped).returns(SpellBook) }
735
- def find(*args); end
736
-
737
- sig { params(args: T.untyped).returns(T.nilable(SpellBook)) }
738
- def find_by(*args); end
739
-
740
- sig { params(args: T.untyped).returns(SpellBook) }
741
- def find_by!(*args); end
742
-
743
- sig { returns(T.nilable(SpellBook)) }
744
- def first; end
745
-
746
- sig { returns(SpellBook) }
747
- def first!; end
748
-
749
- sig { returns(T.nilable(SpellBook)) }
750
- def second; end
751
-
752
- sig { returns(SpellBook) }
753
- def second!; end
754
-
755
- sig { returns(T.nilable(SpellBook)) }
756
- def third; end
757
-
758
- sig { returns(SpellBook) }
759
- def third!; end
760
-
761
- sig { returns(T.nilable(SpellBook)) }
762
- def third_to_last; end
763
-
764
- sig { returns(SpellBook) }
765
- def third_to_last!; end
766
-
767
- sig { returns(T.nilable(SpellBook)) }
768
- def second_to_last; end
769
-
770
- sig { returns(SpellBook) }
771
- def second_to_last!; end
772
-
773
- sig { returns(T.nilable(SpellBook)) }
774
- def last; end
775
-
776
- sig { returns(SpellBook) }
777
- def last!; end
778
-
779
- sig { params(conditions: T.untyped).returns(T::Boolean) }
780
- def exists?(conditions = nil); end
781
-
782
- sig { params(args: T.untyped).returns(T::Boolean) }
783
- def any?(*args); end
784
-
785
- sig { params(args: T.untyped).returns(T::Boolean) }
786
- def many?(*args); end
787
-
788
- sig { params(args: T.untyped).returns(T::Boolean) }
789
- def none?(*args); end
790
-
791
- sig { params(args: T.untyped).returns(T::Boolean) }
792
- def one?(*args); end
793
-
794
- sig { implementation.params(block: T.proc.params(e: SpellBook).void).void }
795
- def each(&block); end
796
-
797
- sig { params(level: T.nilable(Integer)).returns(T::Array[SpellBook]) }
798
- def flatten(level); end
799
-
800
- sig { returns(T::Array[SpellBook]) }
801
- def to_a; end
802
-
803
- sig do
804
- type_parameters(:U).params(
805
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
806
- )
807
- .returns(T::Array[T.type_parameter(:U)])
808
- end
809
- def map(&blk); end
810
-
811
- sig { params(records: T.any(SpellBook, T::Array[SpellBook])).returns(T.self_type) }
812
- def <<(*records); end
813
-
814
- sig { params(records: T.any(SpellBook, T::Array[SpellBook])).returns(T.self_type) }
815
- def append(*records); end
816
-
817
- sig { params(records: T.any(SpellBook, T::Array[SpellBook])).returns(T.self_type) }
818
- def push(*records); end
819
-
820
- sig { params(records: T.any(SpellBook, T::Array[SpellBook])).returns(T.self_type) }
821
- def concat(*records); end
822
- end