sorbet-rails 0.5.8.1 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/README.md +27 -4
  4. data/lib/bundled_rbi/active_record_relation.rbi +79 -0
  5. data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +47 -0
  6. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +20 -1
  7. data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +33 -0
  8. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +22 -6
  9. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +10 -2
  10. data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +46 -35
  11. data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +40 -34
  12. data/lib/sorbet-rails/model_plugins/plugins.rb +6 -0
  13. data/lib/sorbet-rails/routes_rbi_formatter.rb +4 -0
  14. data/lib/sorbet-rails/tasks/rails_rbi.rake +2 -1
  15. data/sorbet-rails.gemspec +2 -2
  16. data/spec/generators/rails-template.rb +25 -3
  17. data/spec/generators/sorbet_test_cases.rb +5 -0
  18. data/spec/model_rbi_formatter_spec.rb +1 -1
  19. data/spec/rake_rails_rbi_models_spec.rb +1 -0
  20. data/spec/support/v5.0/Gemfile +1 -1
  21. data/spec/support/v5.0/Gemfile.lock +18 -14
  22. data/spec/support/v5.0/app/models/school.rb +3 -0
  23. data/spec/support/v5.0/app/models/spell_book.rb +3 -1
  24. data/spec/support/v5.0/app/models/wizard.rb +3 -0
  25. data/spec/support/v5.0/config/environments/development.rb +1 -1
  26. data/spec/support/v5.0/config/initializers/sorbet_rails.rb +1 -1
  27. data/spec/support/v5.0/db/migrate/20190620000003_create_spell_books.rb +1 -1
  28. data/spec/support/v5.0/db/migrate/20190620000008_add_robe_to_wizard.rb +1 -1
  29. data/spec/support/v5.0/db/migrate/20190620000009_add_school.rb +10 -0
  30. data/spec/support/v5.0/db/schema.rb +9 -4
  31. data/spec/support/v5.0/sorbet_test_cases.rb +5 -0
  32. data/spec/support/v5.1/Gemfile +1 -1
  33. data/spec/support/v5.1/Gemfile.lock +18 -14
  34. data/spec/support/v5.1/app/models/school.rb +3 -0
  35. data/spec/support/v5.1/app/models/spell_book.rb +3 -1
  36. data/spec/support/v5.1/app/models/wizard.rb +3 -0
  37. data/spec/support/v5.1/config/environments/test.rb +1 -1
  38. data/spec/support/v5.1/config/initializers/sorbet_rails.rb +1 -1
  39. data/spec/support/v5.1/db/migrate/20190620000003_create_spell_books.rb +1 -1
  40. data/spec/support/v5.1/db/migrate/20190620000008_add_robe_to_wizard.rb +1 -1
  41. data/spec/support/v5.1/db/migrate/20190620000009_add_school.rb +10 -0
  42. data/spec/support/v5.1/db/schema.rb +9 -4
  43. data/spec/support/v5.1/sorbet_test_cases.rb +5 -0
  44. data/spec/support/v5.2/Gemfile +1 -1
  45. data/spec/support/v5.2/Gemfile.lock +54 -50
  46. data/spec/support/v5.2/app/models/school.rb +3 -0
  47. data/spec/support/v5.2/app/models/spell_book.rb +3 -1
  48. data/spec/support/v5.2/app/models/wizard.rb +3 -0
  49. data/spec/support/v5.2/config/environments/development.rb +1 -1
  50. data/spec/support/v5.2/config/initializers/sorbet_rails.rb +1 -1
  51. data/spec/support/v5.2/db/migrate/20190620000003_create_spell_books.rb +1 -1
  52. data/spec/support/v5.2/db/migrate/20190620000008_add_robe_to_wizard.rb +1 -1
  53. data/spec/support/v5.2/db/migrate/20190620000009_add_school.rb +10 -0
  54. data/spec/support/v5.2/db/schema.rb +9 -4
  55. data/spec/support/v5.2/sorbet_test_cases.rb +5 -0
  56. data/spec/support/v6.0/Gemfile +1 -1
  57. data/spec/support/v6.0/Gemfile.lock +70 -66
  58. data/spec/support/v6.0/app/models/school.rb +3 -0
  59. data/spec/support/v6.0/app/models/spell_book.rb +3 -1
  60. data/spec/support/v6.0/app/models/wizard.rb +3 -0
  61. data/spec/support/v6.0/config/environments/development.rb +1 -1
  62. data/spec/support/v6.0/config/initializers/sorbet_rails.rb +1 -1
  63. data/spec/support/v6.0/db/migrate/20190620000003_create_spell_books.rb +1 -1
  64. data/spec/support/v6.0/db/migrate/20190620000008_add_robe_to_wizard.rb +1 -1
  65. data/spec/support/v6.0/db/migrate/20190620000009_add_school.rb +10 -0
  66. data/spec/support/v6.0/db/schema.rb +10 -4
  67. data/spec/support/v6.0/sorbet_test_cases.rb +5 -0
  68. data/spec/test_data/v5.0/expected_internal_metadata.rbi +0 -77
  69. data/spec/test_data/v5.0/expected_potion.rbi +0 -77
  70. data/spec/test_data/v5.0/expected_robe.rbi +23 -77
  71. data/spec/test_data/v5.0/expected_routes.rbi +4 -0
  72. data/spec/test_data/v5.0/expected_schema_migration.rbi +0 -77
  73. data/spec/test_data/v5.0/expected_school.rbi +651 -0
  74. data/spec/test_data/v5.0/expected_spell_book.rbi +3 -80
  75. data/spec/test_data/v5.0/expected_squib.rbi +17 -79
  76. data/spec/test_data/v5.0/expected_wand.rbi +4 -81
  77. data/spec/test_data/v5.0/expected_wizard.rbi +17 -79
  78. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +17 -79
  79. data/spec/test_data/v5.1/expected_internal_metadata.rbi +0 -77
  80. data/spec/test_data/v5.1/expected_potion.rbi +0 -77
  81. data/spec/test_data/v5.1/expected_robe.rbi +23 -77
  82. data/spec/test_data/v5.1/expected_routes.rbi +4 -0
  83. data/spec/test_data/v5.1/expected_schema_migration.rbi +0 -77
  84. data/spec/test_data/v5.1/expected_school.rbi +663 -0
  85. data/spec/test_data/v5.1/expected_spell_book.rbi +3 -80
  86. data/spec/test_data/v5.1/expected_squib.rbi +17 -79
  87. data/spec/test_data/v5.1/expected_wand.rbi +4 -81
  88. data/spec/test_data/v5.1/expected_wizard.rbi +17 -79
  89. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +17 -79
  90. data/spec/test_data/v5.2/expected_attachment.rbi +0 -77
  91. data/spec/test_data/v5.2/expected_blob.rbi +0 -77
  92. data/spec/test_data/v5.2/expected_internal_metadata.rbi +0 -77
  93. data/spec/test_data/v5.2/expected_potion.rbi +0 -77
  94. data/spec/test_data/v5.2/expected_robe.rbi +23 -77
  95. data/spec/test_data/v5.2/expected_routes.rbi +4 -0
  96. data/spec/test_data/v5.2/expected_schema_migration.rbi +0 -77
  97. data/spec/test_data/v5.2/expected_school.rbi +663 -0
  98. data/spec/test_data/v5.2/expected_spell_book.rbi +3 -80
  99. data/spec/test_data/v5.2/expected_squib.rbi +17 -79
  100. data/spec/test_data/v5.2/expected_wand.rbi +4 -81
  101. data/spec/test_data/v5.2/expected_wizard.rbi +17 -79
  102. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +17 -79
  103. data/spec/test_data/v6.0/expected_attachment.rbi +0 -77
  104. data/spec/test_data/v6.0/expected_blob.rbi +0 -77
  105. data/spec/test_data/v6.0/expected_internal_metadata.rbi +0 -77
  106. data/spec/test_data/v6.0/expected_potion.rbi +0 -77
  107. data/spec/test_data/v6.0/expected_robe.rbi +23 -77
  108. data/spec/test_data/v6.0/expected_routes.rbi +4 -0
  109. data/spec/test_data/v6.0/expected_schema_migration.rbi +0 -77
  110. data/spec/test_data/v6.0/expected_school.rbi +711 -0
  111. data/spec/test_data/v6.0/expected_spell_book.rbi +3 -80
  112. data/spec/test_data/v6.0/expected_squib.rbi +17 -79
  113. data/spec/test_data/v6.0/expected_wand.rbi +4 -81
  114. data/spec/test_data/v6.0/expected_wizard.rbi +17 -79
  115. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +17 -79
  116. metadata +31 -4
@@ -0,0 +1,663 @@
1
+ # This is an autogenerated file for dynamic methods in School
2
+ # Please rerun rake rails_rbi:models[School] to regenerate.
3
+
4
+ # typed: strong
5
+ module School::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 School::GeneratedAttributeMethods
11
+ extend T::Sig
12
+
13
+ sig { returns(Integer) }
14
+ def id; end
15
+
16
+ sig { params(value: T.any(Integer, Float, ActiveSupport::Duration)).void }
17
+ def id=(value); end
18
+
19
+ sig { returns(T::Boolean) }
20
+ def id?; end
21
+
22
+ sig { returns(T.nilable(String)) }
23
+ def name; end
24
+
25
+ sig { params(value: T.nilable(String)).void }
26
+ def name=(value); end
27
+
28
+ sig { returns(T::Boolean) }
29
+ def name?; end
30
+ end
31
+
32
+ module School::CustomFinderMethods
33
+ sig { params(limit: Integer).returns(T::Array[School]) }
34
+ def first_n(limit); end
35
+
36
+ sig { params(limit: Integer).returns(T::Array[School]) }
37
+ def last_n(limit); end
38
+
39
+ sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[School]) }
40
+ def find_n(*args); end
41
+
42
+ sig { params(id: Integer).returns(T.nilable(School)) }
43
+ def find_by_id(id); end
44
+
45
+ sig { params(id: Integer).returns(School) }
46
+ def find_by_id!(id); end
47
+ end
48
+
49
+ class School < ApplicationRecord
50
+ include School::GeneratedAttributeMethods
51
+ extend School::CustomFinderMethods
52
+ extend T::Sig
53
+ extend T::Generic
54
+
55
+ sig { returns(School::ActiveRecord_Relation) }
56
+ def self.all; end
57
+
58
+ sig { params(block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
59
+ def self.unscoped(&block); end
60
+
61
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
62
+ def self.select(*args); end
63
+
64
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
65
+ def self.order(*args); end
66
+
67
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
68
+ def self.reorder(*args); end
69
+
70
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
71
+ def self.group(*args); end
72
+
73
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
74
+ def self.limit(*args); end
75
+
76
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
77
+ def self.offset(*args); end
78
+
79
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
80
+ def self.joins(*args); end
81
+
82
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
83
+ def self.left_joins(*args); end
84
+
85
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
86
+ def self.left_outer_joins(*args); end
87
+
88
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
89
+ def self.where(*args); end
90
+
91
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
92
+ def self.rewhere(*args); end
93
+
94
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
95
+ def self.preload(*args); end
96
+
97
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
98
+ def self.eager_load(*args); end
99
+
100
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
101
+ def self.includes(*args); end
102
+
103
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
104
+ def self.from(*args); end
105
+
106
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
107
+ def self.lock(*args); end
108
+
109
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
110
+ def self.readonly(*args); end
111
+
112
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
113
+ def self.or(*args); end
114
+
115
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
116
+ def self.having(*args); end
117
+
118
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
119
+ def self.create_with(*args); end
120
+
121
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
122
+ def self.distinct(*args); end
123
+
124
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
125
+ def self.references(*args); end
126
+
127
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
128
+ def self.none(*args); end
129
+
130
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
131
+ def self.unscope(*args); end
132
+
133
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
134
+ def self.merge(*args); end
135
+
136
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
137
+ def self.except(*args); end
138
+
139
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
140
+ def self.extending(*args, &block); end
141
+
142
+ sig { params(args: T.untyped).returns(School) }
143
+ def self.find(*args); end
144
+
145
+ sig { params(args: T.untyped).returns(T.nilable(School)) }
146
+ def self.find_by(*args); end
147
+
148
+ sig { params(args: T.untyped).returns(School) }
149
+ def self.find_by!(*args); end
150
+
151
+ sig { returns(T.nilable(School)) }
152
+ def self.first; end
153
+
154
+ sig { returns(School) }
155
+ def self.first!; end
156
+
157
+ sig { returns(T.nilable(School)) }
158
+ def self.second; end
159
+
160
+ sig { returns(School) }
161
+ def self.second!; end
162
+
163
+ sig { returns(T.nilable(School)) }
164
+ def self.third; end
165
+
166
+ sig { returns(School) }
167
+ def self.third!; end
168
+
169
+ sig { returns(T.nilable(School)) }
170
+ def self.third_to_last; end
171
+
172
+ sig { returns(School) }
173
+ def self.third_to_last!; end
174
+
175
+ sig { returns(T.nilable(School)) }
176
+ def self.second_to_last; end
177
+
178
+ sig { returns(School) }
179
+ def self.second_to_last!; end
180
+
181
+ sig { returns(T.nilable(School)) }
182
+ def self.last; end
183
+
184
+ sig { returns(School) }
185
+ def self.last!; end
186
+
187
+ sig { params(conditions: T.untyped).returns(T::Boolean) }
188
+ def self.exists?(conditions = nil); end
189
+
190
+ sig { params(args: T.untyped).returns(T::Boolean) }
191
+ def self.any?(*args); end
192
+
193
+ sig { params(args: T.untyped).returns(T::Boolean) }
194
+ def self.many?(*args); end
195
+
196
+ sig { params(args: T.untyped).returns(T::Boolean) }
197
+ def self.none?(*args); end
198
+
199
+ sig { params(args: T.untyped).returns(T::Boolean) }
200
+ def self.one?(*args); end
201
+
202
+ sig { params(attributes: T.untyped, block: T.untyped).returns(School) }
203
+ def self.create(attributes = nil, &block); end
204
+
205
+ sig { params(attributes: T.untyped, block: T.untyped).returns(School) }
206
+ def self.create!(attributes = nil, &block); end
207
+
208
+ sig { params(attributes: T.untyped, block: T.untyped).returns(School) }
209
+ def self.new(attributes = nil, &block); end
210
+ end
211
+
212
+ class School::ActiveRecord_Relation < ActiveRecord::Relation
213
+ include School::ActiveRelation_WhereNot
214
+ include School::CustomFinderMethods
215
+ include Enumerable
216
+ extend T::Sig
217
+ extend T::Generic
218
+ Elem = type_member(fixed: School)
219
+
220
+ sig { returns(School::ActiveRecord_Relation) }
221
+ def all; end
222
+
223
+ sig { params(block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
224
+ def unscoped(&block); end
225
+
226
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
227
+ def select(*args); end
228
+
229
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
230
+ def order(*args); end
231
+
232
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
233
+ def reorder(*args); end
234
+
235
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
236
+ def group(*args); end
237
+
238
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
239
+ def limit(*args); end
240
+
241
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
242
+ def offset(*args); end
243
+
244
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
245
+ def joins(*args); end
246
+
247
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
248
+ def left_joins(*args); end
249
+
250
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
251
+ def left_outer_joins(*args); end
252
+
253
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
254
+ def where(*args); end
255
+
256
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
257
+ def rewhere(*args); end
258
+
259
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
260
+ def preload(*args); end
261
+
262
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
263
+ def eager_load(*args); end
264
+
265
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
266
+ def includes(*args); end
267
+
268
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
269
+ def from(*args); end
270
+
271
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
272
+ def lock(*args); end
273
+
274
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
275
+ def readonly(*args); end
276
+
277
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
278
+ def or(*args); end
279
+
280
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
281
+ def having(*args); end
282
+
283
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
284
+ def create_with(*args); end
285
+
286
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
287
+ def distinct(*args); end
288
+
289
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
290
+ def references(*args); end
291
+
292
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
293
+ def none(*args); end
294
+
295
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
296
+ def unscope(*args); end
297
+
298
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
299
+ def merge(*args); end
300
+
301
+ sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
302
+ def except(*args); end
303
+
304
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
305
+ def extending(*args, &block); end
306
+ end
307
+
308
+ class School::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
309
+ include School::ActiveRelation_WhereNot
310
+ include School::CustomFinderMethods
311
+ include Enumerable
312
+ extend T::Sig
313
+ extend T::Generic
314
+ Elem = type_member(fixed: School)
315
+
316
+ sig { returns(School::ActiveRecord_AssociationRelation) }
317
+ def all; end
318
+
319
+ sig { params(block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
320
+ def unscoped(&block); end
321
+
322
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
323
+ def select(*args); end
324
+
325
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
326
+ def order(*args); end
327
+
328
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
329
+ def reorder(*args); end
330
+
331
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
332
+ def group(*args); end
333
+
334
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
335
+ def limit(*args); end
336
+
337
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
338
+ def offset(*args); end
339
+
340
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
341
+ def joins(*args); end
342
+
343
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
344
+ def left_joins(*args); end
345
+
346
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
347
+ def left_outer_joins(*args); end
348
+
349
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
350
+ def where(*args); end
351
+
352
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
353
+ def rewhere(*args); end
354
+
355
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
356
+ def preload(*args); end
357
+
358
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
359
+ def eager_load(*args); end
360
+
361
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
362
+ def includes(*args); end
363
+
364
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
365
+ def from(*args); end
366
+
367
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
368
+ def lock(*args); end
369
+
370
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
371
+ def readonly(*args); end
372
+
373
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
374
+ def or(*args); end
375
+
376
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
377
+ def having(*args); end
378
+
379
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
380
+ def create_with(*args); end
381
+
382
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
383
+ def distinct(*args); end
384
+
385
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
386
+ def references(*args); end
387
+
388
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
389
+ def none(*args); end
390
+
391
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
392
+ def unscope(*args); end
393
+
394
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
395
+ def merge(*args); end
396
+
397
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
398
+ def except(*args); end
399
+
400
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
401
+ def extending(*args, &block); end
402
+
403
+ sig { params(args: T.untyped).returns(School) }
404
+ def find(*args); end
405
+
406
+ sig { params(args: T.untyped).returns(T.nilable(School)) }
407
+ def find_by(*args); end
408
+
409
+ sig { params(args: T.untyped).returns(School) }
410
+ def find_by!(*args); end
411
+
412
+ sig { returns(T.nilable(School)) }
413
+ def first; end
414
+
415
+ sig { returns(School) }
416
+ def first!; end
417
+
418
+ sig { returns(T.nilable(School)) }
419
+ def second; end
420
+
421
+ sig { returns(School) }
422
+ def second!; end
423
+
424
+ sig { returns(T.nilable(School)) }
425
+ def third; end
426
+
427
+ sig { returns(School) }
428
+ def third!; end
429
+
430
+ sig { returns(T.nilable(School)) }
431
+ def third_to_last; end
432
+
433
+ sig { returns(School) }
434
+ def third_to_last!; end
435
+
436
+ sig { returns(T.nilable(School)) }
437
+ def second_to_last; end
438
+
439
+ sig { returns(School) }
440
+ def second_to_last!; end
441
+
442
+ sig { returns(T.nilable(School)) }
443
+ def last; end
444
+
445
+ sig { returns(School) }
446
+ def last!; end
447
+
448
+ sig { params(conditions: T.untyped).returns(T::Boolean) }
449
+ def exists?(conditions = nil); end
450
+
451
+ sig { params(args: T.untyped).returns(T::Boolean) }
452
+ def any?(*args); end
453
+
454
+ sig { params(args: T.untyped).returns(T::Boolean) }
455
+ def many?(*args); end
456
+
457
+ sig { params(args: T.untyped).returns(T::Boolean) }
458
+ def none?(*args); end
459
+
460
+ sig { params(args: T.untyped).returns(T::Boolean) }
461
+ def one?(*args); end
462
+
463
+ sig { override.params(block: T.proc.params(e: School).void).returns(T::Array[School]) }
464
+ def each(&block); end
465
+
466
+ sig { params(level: T.nilable(Integer)).returns(T::Array[School]) }
467
+ def flatten(level); end
468
+
469
+ sig { returns(T::Array[School]) }
470
+ def to_a; end
471
+
472
+ sig do
473
+ type_parameters(:U).params(
474
+ blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
475
+ )
476
+ .returns(T::Array[T.type_parameter(:U)])
477
+ end
478
+ def map(&blk); end
479
+ end
480
+
481
+ class School::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
482
+ include School::CustomFinderMethods
483
+ include Enumerable
484
+ extend T::Sig
485
+ extend T::Generic
486
+ Elem = type_member(fixed: School)
487
+
488
+ sig { returns(School::ActiveRecord_AssociationRelation) }
489
+ def all; end
490
+
491
+ sig { params(block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
492
+ def unscoped(&block); end
493
+
494
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
495
+ def select(*args); end
496
+
497
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
498
+ def order(*args); end
499
+
500
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
501
+ def reorder(*args); end
502
+
503
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
504
+ def group(*args); end
505
+
506
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
507
+ def limit(*args); end
508
+
509
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
510
+ def offset(*args); end
511
+
512
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
513
+ def joins(*args); end
514
+
515
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
516
+ def left_joins(*args); end
517
+
518
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
519
+ def left_outer_joins(*args); end
520
+
521
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
522
+ def where(*args); end
523
+
524
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
525
+ def rewhere(*args); end
526
+
527
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
528
+ def preload(*args); end
529
+
530
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
531
+ def eager_load(*args); end
532
+
533
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
534
+ def includes(*args); end
535
+
536
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
537
+ def from(*args); end
538
+
539
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
540
+ def lock(*args); end
541
+
542
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
543
+ def readonly(*args); end
544
+
545
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
546
+ def or(*args); end
547
+
548
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
549
+ def having(*args); end
550
+
551
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
552
+ def create_with(*args); end
553
+
554
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
555
+ def distinct(*args); end
556
+
557
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
558
+ def references(*args); end
559
+
560
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
561
+ def none(*args); end
562
+
563
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
564
+ def unscope(*args); end
565
+
566
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
567
+ def merge(*args); end
568
+
569
+ sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
570
+ def except(*args); end
571
+
572
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
573
+ def extending(*args, &block); end
574
+
575
+ sig { params(args: T.untyped).returns(School) }
576
+ def find(*args); end
577
+
578
+ sig { params(args: T.untyped).returns(T.nilable(School)) }
579
+ def find_by(*args); end
580
+
581
+ sig { params(args: T.untyped).returns(School) }
582
+ def find_by!(*args); end
583
+
584
+ sig { returns(T.nilable(School)) }
585
+ def first; end
586
+
587
+ sig { returns(School) }
588
+ def first!; end
589
+
590
+ sig { returns(T.nilable(School)) }
591
+ def second; end
592
+
593
+ sig { returns(School) }
594
+ def second!; end
595
+
596
+ sig { returns(T.nilable(School)) }
597
+ def third; end
598
+
599
+ sig { returns(School) }
600
+ def third!; end
601
+
602
+ sig { returns(T.nilable(School)) }
603
+ def third_to_last; end
604
+
605
+ sig { returns(School) }
606
+ def third_to_last!; end
607
+
608
+ sig { returns(T.nilable(School)) }
609
+ def second_to_last; end
610
+
611
+ sig { returns(School) }
612
+ def second_to_last!; end
613
+
614
+ sig { returns(T.nilable(School)) }
615
+ def last; end
616
+
617
+ sig { returns(School) }
618
+ def last!; end
619
+
620
+ sig { params(conditions: T.untyped).returns(T::Boolean) }
621
+ def exists?(conditions = nil); end
622
+
623
+ sig { params(args: T.untyped).returns(T::Boolean) }
624
+ def any?(*args); end
625
+
626
+ sig { params(args: T.untyped).returns(T::Boolean) }
627
+ def many?(*args); end
628
+
629
+ sig { params(args: T.untyped).returns(T::Boolean) }
630
+ def none?(*args); end
631
+
632
+ sig { params(args: T.untyped).returns(T::Boolean) }
633
+ def one?(*args); end
634
+
635
+ sig { override.params(block: T.proc.params(e: School).void).returns(T::Array[School]) }
636
+ def each(&block); end
637
+
638
+ sig { params(level: T.nilable(Integer)).returns(T::Array[School]) }
639
+ def flatten(level); end
640
+
641
+ sig { returns(T::Array[School]) }
642
+ def to_a; end
643
+
644
+ sig do
645
+ type_parameters(:U).params(
646
+ blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
647
+ )
648
+ .returns(T::Array[T.type_parameter(:U)])
649
+ end
650
+ def map(&blk); end
651
+
652
+ sig { params(records: T.any(School, T::Array[School])).returns(T.self_type) }
653
+ def <<(*records); end
654
+
655
+ sig { params(records: T.any(School, T::Array[School])).returns(T.self_type) }
656
+ def append(*records); end
657
+
658
+ sig { params(records: T.any(School, T::Array[School])).returns(T.self_type) }
659
+ def push(*records); end
660
+
661
+ sig { params(records: T.any(School, T::Array[School])).returns(T.self_type) }
662
+ def concat(*records); end
663
+ end