sorbet-rails 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +295 -0
- data/lib/sorbet-rails/config.rb +0 -1
- data/lib/sorbet-rails/custom_types/boolean_string.rb +10 -0
- data/lib/sorbet-rails/custom_types/integer_string.rb +10 -0
- data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +11 -0
- data/lib/sorbet-rails/deprecation.rb +5 -0
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +27 -6
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +20 -8
- data/lib/sorbet-rails/model_plugins/base.rb +9 -0
- data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +0 -50
- data/lib/sorbet-rails/model_plugins/plugins.rb +0 -3
- data/lib/sorbet-rails/model_rbi_formatter.rb +2 -2
- data/lib/sorbet-rails/model_utils.rb +15 -6
- data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +11 -0
- data/lib/sorbet-rails/tasks/rails_rbi.rake +20 -4
- data/sorbet-rails.gemspec +2 -2
- data/spec/active_record_rbi_formatter_spec.rb +24 -0
- data/spec/generators/rails-template.rb +88 -1
- data/spec/generators/sorbet_test_cases.rb +146 -42
- data/spec/model_rbi_formatter_spec.rb +1 -1
- data/spec/rails_helper.rb +14 -1
- data/spec/rake_rails_rbi_active_record_spec.rb +21 -0
- data/spec/rake_rails_rbi_models_spec.rb +7 -0
- data/spec/sorbet_spec.rb +12 -1
- data/spec/support/v5.0/Gemfile.lock +8 -8
- data/spec/support/v5.0/app/models/headmaster.rb +8 -0
- data/spec/support/v5.0/app/models/school.rb +2 -0
- data/spec/support/v5.0/app/models/spell.rb +5 -0
- data/spec/support/v5.0/app/models/spell_book.rb +3 -0
- data/spec/support/v5.0/app/models/subject.rb +5 -0
- data/spec/support/v5.0/app/models/wizard.rb +6 -1
- data/spec/support/v5.0/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v5.0/db/schema.rb +28 -1
- data/spec/support/v5.0/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v5.0/sorbet_test_cases.rb +146 -42
- data/spec/support/v5.1/Gemfile.lock +8 -8
- data/spec/support/v5.1/app/models/headmaster.rb +8 -0
- data/spec/support/v5.1/app/models/school.rb +2 -0
- data/spec/support/v5.1/app/models/spell.rb +5 -0
- data/spec/support/v5.1/app/models/spell_book.rb +3 -0
- data/spec/support/v5.1/app/models/subject.rb +5 -0
- data/spec/support/v5.1/app/models/wizard.rb +6 -1
- data/spec/support/v5.1/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v5.1/db/schema.rb +28 -1
- data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v5.1/sorbet_test_cases.rb +146 -42
- data/spec/support/v5.2/Gemfile +1 -1
- data/spec/support/v5.2/Gemfile.lock +9 -9
- data/spec/support/v5.2/app/models/headmaster.rb +8 -0
- data/spec/support/v5.2/app/models/school.rb +2 -0
- data/spec/support/v5.2/app/models/spell.rb +5 -0
- data/spec/support/v5.2/app/models/spell_book.rb +3 -0
- data/spec/support/v5.2/app/models/subject.rb +5 -0
- data/spec/support/v5.2/app/models/wizard.rb +5 -0
- data/spec/support/v5.2/config/puma.rb +3 -0
- data/spec/support/v5.2/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v5.2/db/schema.rb +28 -1
- data/spec/support/v5.2/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v5.2/sorbet_test_cases.rb +146 -42
- data/spec/support/v6.0/Gemfile.lock +8 -8
- data/spec/support/v6.0/app/models/headmaster.rb +8 -0
- data/spec/support/v6.0/app/models/school.rb +2 -0
- data/spec/support/v6.0/app/models/spell.rb +5 -0
- data/spec/support/v6.0/app/models/spell_book.rb +3 -0
- data/spec/support/v6.0/app/models/subject.rb +5 -0
- data/spec/support/v6.0/app/models/wizard.rb +6 -1
- data/spec/support/v6.0/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v6.0/db/schema.rb +28 -1
- data/spec/support/v6.0/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v6.0/sorbet_test_cases.rb +146 -42
- data/spec/test_data/v5.0/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v5.0/expected_active_record_relation.rbi +199 -0
- data/spec/test_data/v5.0/expected_habtm_subjects.rbi +660 -0
- data/spec/test_data/v5.0/expected_habtm_wizards.rbi +660 -0
- data/spec/test_data/v5.0/expected_headmaster.rbi +452 -0
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +0 -217
- data/spec/test_data/v5.0/expected_potion.rbi +0 -217
- data/spec/test_data/v5.0/expected_robe.rbi +0 -217
- data/spec/test_data/v5.0/expected_schema_migration.rbi +0 -217
- data/spec/test_data/v5.0/expected_school.rbi +11 -217
- data/spec/test_data/v5.0/expected_spell.rbi +440 -0
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +443 -0
- data/spec/test_data/v5.0/expected_spell_book.rbi +14 -222
- data/spec/test_data/v5.0/expected_spell_book/habtm_spell_books.rbi +637 -0
- data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +443 -0
- data/spec/test_data/v5.0/expected_squib.rbi +14 -219
- data/spec/test_data/v5.0/expected_subject.rbi +440 -0
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +443 -0
- data/spec/test_data/v5.0/expected_wand.rbi +4 -221
- data/spec/test_data/v5.0/expected_wizard.rbi +36 -240
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +443 -0
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +30 -240
- data/spec/test_data/v5.1/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v5.1/expected_active_record_relation.rbi +178 -0
- data/spec/test_data/v5.1/expected_habtm_subjects.rbi +672 -0
- data/spec/test_data/v5.1/expected_habtm_wizards.rbi +672 -0
- data/spec/test_data/v5.1/expected_headmaster.rbi +464 -0
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +0 -217
- data/spec/test_data/v5.1/expected_potion.rbi +0 -217
- data/spec/test_data/v5.1/expected_robe.rbi +0 -217
- data/spec/test_data/v5.1/expected_schema_migration.rbi +0 -217
- data/spec/test_data/v5.1/expected_school.rbi +11 -217
- data/spec/test_data/v5.1/expected_spell.rbi +452 -0
- data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +455 -0
- data/spec/test_data/v5.1/expected_spell_book.rbi +14 -222
- data/spec/test_data/v5.1/expected_spell_book/habtm_spell_books.rbi +649 -0
- data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +455 -0
- data/spec/test_data/v5.1/expected_squib.rbi +14 -219
- data/spec/test_data/v5.1/expected_subject.rbi +452 -0
- data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +455 -0
- data/spec/test_data/v5.1/expected_wand.rbi +4 -221
- data/spec/test_data/v5.1/expected_wizard.rbi +36 -240
- data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +455 -0
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +30 -240
- data/spec/test_data/v5.2/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v5.2/expected_active_record_relation.rbi +175 -0
- data/spec/test_data/v5.2/expected_attachment.rbi +0 -217
- data/spec/test_data/v5.2/expected_blob.rbi +3 -217
- data/spec/test_data/v5.2/expected_habtm_subjects.rbi +672 -0
- data/spec/test_data/v5.2/expected_habtm_wizards.rbi +672 -0
- data/spec/test_data/v5.2/expected_headmaster.rbi +464 -0
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +0 -217
- data/spec/test_data/v5.2/expected_potion.rbi +0 -217
- data/spec/test_data/v5.2/expected_robe.rbi +0 -217
- data/spec/test_data/v5.2/expected_schema_migration.rbi +0 -217
- data/spec/test_data/v5.2/expected_school.rbi +11 -217
- data/spec/test_data/v5.2/expected_spell.rbi +452 -0
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +455 -0
- data/spec/test_data/v5.2/expected_spell_book.rbi +14 -222
- data/spec/test_data/v5.2/expected_spell_book/habtm_spell_books.rbi +649 -0
- data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +455 -0
- data/spec/test_data/v5.2/expected_squib.rbi +20 -219
- data/spec/test_data/v5.2/expected_subject.rbi +452 -0
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +455 -0
- data/spec/test_data/v5.2/expected_wand.rbi +4 -221
- data/spec/test_data/v5.2/expected_wizard.rbi +42 -240
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +455 -0
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +36 -240
- data/spec/test_data/v6.0/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v6.0/expected_active_record_relation.rbi +175 -0
- data/spec/test_data/v6.0/expected_attachment.rbi +0 -217
- data/spec/test_data/v6.0/expected_blob.rbi +3 -217
- data/spec/test_data/v6.0/expected_habtm_subjects.rbi +720 -0
- data/spec/test_data/v6.0/expected_habtm_wizards.rbi +720 -0
- data/spec/test_data/v6.0/expected_headmaster.rbi +512 -0
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +0 -217
- data/spec/test_data/v6.0/expected_potion.rbi +0 -217
- data/spec/test_data/v6.0/expected_robe.rbi +0 -217
- data/spec/test_data/v6.0/expected_schema_migration.rbi +0 -217
- data/spec/test_data/v6.0/expected_school.rbi +11 -217
- data/spec/test_data/v6.0/expected_spell.rbi +500 -0
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +503 -0
- data/spec/test_data/v6.0/expected_spell_book.rbi +14 -222
- data/spec/test_data/v6.0/expected_spell_book/habtm_spell_books.rbi +697 -0
- data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +503 -0
- data/spec/test_data/v6.0/expected_squib.rbi +20 -219
- data/spec/test_data/v6.0/expected_subject.rbi +500 -0
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +503 -0
- data/spec/test_data/v6.0/expected_wand.rbi +4 -221
- data/spec/test_data/v6.0/expected_wizard.rbi +42 -240
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +503 -0
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +36 -240
- metadata +169 -14
- data/lib/bundled_rbi/active_record_base.rbi +0 -83
- data/lib/bundled_rbi/active_record_relation.rbi +0 -122
- data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +0 -131
- data/spec/support/v5.0/typed-override.yaml +0 -2
- data/spec/support/v5.1/typed-override.yaml +0 -2
- data/spec/support/v5.2/typed-override.yaml +0 -2
- data/spec/support/v6.0/typed-override.yaml +0 -2
@@ -127,30 +127,11 @@ class ActiveRecord::SchemaMigration < ActiveRecord::Base
|
|
127
127
|
|
128
128
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
129
129
|
def self.extending(*args, &block); end
|
130
|
-
|
131
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
132
|
-
def self.exists?(conditions = nil); end
|
133
|
-
|
134
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
135
|
-
def self.any?(*args); end
|
136
|
-
|
137
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
138
|
-
def self.many?(*args); end
|
139
|
-
|
140
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
141
|
-
def self.none?(*args); end
|
142
|
-
|
143
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
144
|
-
def self.one?(*args); end
|
145
|
-
|
146
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
147
|
-
def self.empty?(*args); end
|
148
130
|
end
|
149
131
|
|
150
132
|
class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ActiveRecord::Relation
|
151
133
|
include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
|
152
134
|
include ActiveRecord::SchemaMigration::CustomFinderMethods
|
153
|
-
include Enumerable
|
154
135
|
extend T::Sig
|
155
136
|
extend T::Generic
|
156
137
|
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
@@ -238,30 +219,11 @@ class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ActiveRecord::Relat
|
|
238
219
|
|
239
220
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
240
221
|
def extending(*args, &block); end
|
241
|
-
|
242
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
243
|
-
def exists?(conditions = nil); end
|
244
|
-
|
245
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
246
|
-
def any?(*args); end
|
247
|
-
|
248
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
249
|
-
def many?(*args); end
|
250
|
-
|
251
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
252
|
-
def none?(*args); end
|
253
|
-
|
254
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
255
|
-
def one?(*args); end
|
256
|
-
|
257
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
258
|
-
def empty?(*args); end
|
259
222
|
end
|
260
223
|
|
261
224
|
class ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
262
225
|
include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
|
263
226
|
include ActiveRecord::SchemaMigration::CustomFinderMethods
|
264
|
-
include Enumerable
|
265
227
|
extend T::Sig
|
266
228
|
extend T::Generic
|
267
229
|
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
@@ -349,100 +311,10 @@ class ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation < ActiveRe
|
|
349
311
|
|
350
312
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
351
313
|
def extending(*args, &block); end
|
352
|
-
|
353
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
354
|
-
def find(*args); end
|
355
|
-
|
356
|
-
sig { params(args: T.untyped).returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
357
|
-
def find_by(*args); end
|
358
|
-
|
359
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
360
|
-
def find_by!(*args); end
|
361
|
-
|
362
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
|
363
|
-
def find_or_initialize_by(attributes, &block); end
|
364
|
-
|
365
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
|
366
|
-
def find_or_create_by(attributes, &block); end
|
367
|
-
|
368
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
|
369
|
-
def find_or_create_by!(attributes, &block); end
|
370
|
-
|
371
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
372
|
-
def first; end
|
373
|
-
|
374
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
375
|
-
def first!; end
|
376
|
-
|
377
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
378
|
-
def second; end
|
379
|
-
|
380
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
381
|
-
def second!; end
|
382
|
-
|
383
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
384
|
-
def third; end
|
385
|
-
|
386
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
387
|
-
def third!; end
|
388
|
-
|
389
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
390
|
-
def third_to_last; end
|
391
|
-
|
392
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
393
|
-
def third_to_last!; end
|
394
|
-
|
395
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
396
|
-
def second_to_last; end
|
397
|
-
|
398
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
399
|
-
def second_to_last!; end
|
400
|
-
|
401
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
402
|
-
def last; end
|
403
|
-
|
404
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
405
|
-
def last!; end
|
406
|
-
|
407
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
408
|
-
def exists?(conditions = nil); end
|
409
|
-
|
410
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
411
|
-
def any?(*args); end
|
412
|
-
|
413
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
414
|
-
def many?(*args); end
|
415
|
-
|
416
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
417
|
-
def none?(*args); end
|
418
|
-
|
419
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
420
|
-
def one?(*args); end
|
421
|
-
|
422
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
423
|
-
def empty?(*args); end
|
424
|
-
|
425
|
-
sig { override.params(block: T.proc.params(e: ActiveRecord::SchemaMigration).void).returns(T::Array[ActiveRecord::SchemaMigration]) }
|
426
|
-
def each(&block); end
|
427
|
-
|
428
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[ActiveRecord::SchemaMigration]) }
|
429
|
-
def flatten(level); end
|
430
|
-
|
431
|
-
sig { returns(T::Array[ActiveRecord::SchemaMigration]) }
|
432
|
-
def to_a; end
|
433
|
-
|
434
|
-
sig do
|
435
|
-
type_parameters(:U).params(
|
436
|
-
blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
|
437
|
-
)
|
438
|
-
.returns(T::Array[T.type_parameter(:U)])
|
439
|
-
end
|
440
|
-
def map(&blk); end
|
441
314
|
end
|
442
315
|
|
443
316
|
class ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
444
317
|
include ActiveRecord::SchemaMigration::CustomFinderMethods
|
445
|
-
include Enumerable
|
446
318
|
extend T::Sig
|
447
319
|
extend T::Generic
|
448
320
|
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
@@ -531,95 +403,6 @@ class ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy <
|
|
531
403
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
|
532
404
|
def extending(*args, &block); end
|
533
405
|
|
534
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
535
|
-
def find(*args); end
|
536
|
-
|
537
|
-
sig { params(args: T.untyped).returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
538
|
-
def find_by(*args); end
|
539
|
-
|
540
|
-
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
541
|
-
def find_by!(*args); end
|
542
|
-
|
543
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
|
544
|
-
def find_or_initialize_by(attributes, &block); end
|
545
|
-
|
546
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
|
547
|
-
def find_or_create_by(attributes, &block); end
|
548
|
-
|
549
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
|
550
|
-
def find_or_create_by!(attributes, &block); end
|
551
|
-
|
552
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
553
|
-
def first; end
|
554
|
-
|
555
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
556
|
-
def first!; end
|
557
|
-
|
558
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
559
|
-
def second; end
|
560
|
-
|
561
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
562
|
-
def second!; end
|
563
|
-
|
564
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
565
|
-
def third; end
|
566
|
-
|
567
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
568
|
-
def third!; end
|
569
|
-
|
570
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
571
|
-
def third_to_last; end
|
572
|
-
|
573
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
574
|
-
def third_to_last!; end
|
575
|
-
|
576
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
577
|
-
def second_to_last; end
|
578
|
-
|
579
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
580
|
-
def second_to_last!; end
|
581
|
-
|
582
|
-
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
583
|
-
def last; end
|
584
|
-
|
585
|
-
sig { returns(ActiveRecord::SchemaMigration) }
|
586
|
-
def last!; end
|
587
|
-
|
588
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
589
|
-
def exists?(conditions = nil); end
|
590
|
-
|
591
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
592
|
-
def any?(*args); end
|
593
|
-
|
594
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
595
|
-
def many?(*args); end
|
596
|
-
|
597
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
598
|
-
def none?(*args); end
|
599
|
-
|
600
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
601
|
-
def one?(*args); end
|
602
|
-
|
603
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
604
|
-
def empty?(*args); end
|
605
|
-
|
606
|
-
sig { override.params(block: T.proc.params(e: ActiveRecord::SchemaMigration).void).returns(T::Array[ActiveRecord::SchemaMigration]) }
|
607
|
-
def each(&block); end
|
608
|
-
|
609
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[ActiveRecord::SchemaMigration]) }
|
610
|
-
def flatten(level); end
|
611
|
-
|
612
|
-
sig { returns(T::Array[ActiveRecord::SchemaMigration]) }
|
613
|
-
def to_a; end
|
614
|
-
|
615
|
-
sig do
|
616
|
-
type_parameters(:U).params(
|
617
|
-
blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
|
618
|
-
)
|
619
|
-
.returns(T::Array[T.type_parameter(:U)])
|
620
|
-
end
|
621
|
-
def map(&blk); end
|
622
|
-
|
623
406
|
sig { params(records: T.any(ActiveRecord::SchemaMigration, T::Array[ActiveRecord::SchemaMigration])).returns(T.self_type) }
|
624
407
|
def <<(*records); end
|
625
408
|
|
@@ -29,6 +29,16 @@ module School::GeneratedAttributeMethods
|
|
29
29
|
def name?; end
|
30
30
|
end
|
31
31
|
|
32
|
+
module School::GeneratedAssociationMethods
|
33
|
+
extend T::Sig
|
34
|
+
|
35
|
+
sig { returns(::Headmaster) }
|
36
|
+
def headmaster; end
|
37
|
+
|
38
|
+
sig { params(value: ::Headmaster).void }
|
39
|
+
def headmaster=(value); end
|
40
|
+
end
|
41
|
+
|
32
42
|
module School::CustomFinderMethods
|
33
43
|
sig { params(limit: Integer).returns(T::Array[School]) }
|
34
44
|
def first_n(limit); end
|
@@ -48,6 +58,7 @@ end
|
|
48
58
|
|
49
59
|
class School < ApplicationRecord
|
50
60
|
include School::GeneratedAttributeMethods
|
61
|
+
include School::GeneratedAssociationMethods
|
51
62
|
extend School::CustomFinderMethods
|
52
63
|
extend T::Sig
|
53
64
|
extend T::Generic
|
@@ -136,30 +147,11 @@ class School < ApplicationRecord
|
|
136
147
|
|
137
148
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
138
149
|
def self.extending(*args, &block); end
|
139
|
-
|
140
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
141
|
-
def self.exists?(conditions = nil); end
|
142
|
-
|
143
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
144
|
-
def self.any?(*args); end
|
145
|
-
|
146
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
147
|
-
def self.many?(*args); end
|
148
|
-
|
149
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
150
|
-
def self.none?(*args); end
|
151
|
-
|
152
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
153
|
-
def self.one?(*args); end
|
154
|
-
|
155
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
156
|
-
def self.empty?(*args); end
|
157
150
|
end
|
158
151
|
|
159
152
|
class School::ActiveRecord_Relation < ActiveRecord::Relation
|
160
153
|
include School::ActiveRelation_WhereNot
|
161
154
|
include School::CustomFinderMethods
|
162
|
-
include Enumerable
|
163
155
|
extend T::Sig
|
164
156
|
extend T::Generic
|
165
157
|
Elem = type_member(fixed: School)
|
@@ -247,30 +239,11 @@ class School::ActiveRecord_Relation < ActiveRecord::Relation
|
|
247
239
|
|
248
240
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
249
241
|
def extending(*args, &block); end
|
250
|
-
|
251
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
252
|
-
def exists?(conditions = nil); end
|
253
|
-
|
254
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
255
|
-
def any?(*args); end
|
256
|
-
|
257
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
258
|
-
def many?(*args); end
|
259
|
-
|
260
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
261
|
-
def none?(*args); end
|
262
|
-
|
263
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
264
|
-
def one?(*args); end
|
265
|
-
|
266
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
267
|
-
def empty?(*args); end
|
268
242
|
end
|
269
243
|
|
270
244
|
class School::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
271
245
|
include School::ActiveRelation_WhereNot
|
272
246
|
include School::CustomFinderMethods
|
273
|
-
include Enumerable
|
274
247
|
extend T::Sig
|
275
248
|
extend T::Generic
|
276
249
|
Elem = type_member(fixed: School)
|
@@ -358,100 +331,10 @@ class School::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
|
|
358
331
|
|
359
332
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
|
360
333
|
def extending(*args, &block); end
|
361
|
-
|
362
|
-
sig { params(args: T.untyped).returns(School) }
|
363
|
-
def find(*args); end
|
364
|
-
|
365
|
-
sig { params(args: T.untyped).returns(T.nilable(School)) }
|
366
|
-
def find_by(*args); end
|
367
|
-
|
368
|
-
sig { params(args: T.untyped).returns(School) }
|
369
|
-
def find_by!(*args); end
|
370
|
-
|
371
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
372
|
-
def find_or_initialize_by(attributes, &block); end
|
373
|
-
|
374
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
375
|
-
def find_or_create_by(attributes, &block); end
|
376
|
-
|
377
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
378
|
-
def find_or_create_by!(attributes, &block); end
|
379
|
-
|
380
|
-
sig { returns(T.nilable(School)) }
|
381
|
-
def first; end
|
382
|
-
|
383
|
-
sig { returns(School) }
|
384
|
-
def first!; end
|
385
|
-
|
386
|
-
sig { returns(T.nilable(School)) }
|
387
|
-
def second; end
|
388
|
-
|
389
|
-
sig { returns(School) }
|
390
|
-
def second!; end
|
391
|
-
|
392
|
-
sig { returns(T.nilable(School)) }
|
393
|
-
def third; end
|
394
|
-
|
395
|
-
sig { returns(School) }
|
396
|
-
def third!; end
|
397
|
-
|
398
|
-
sig { returns(T.nilable(School)) }
|
399
|
-
def third_to_last; end
|
400
|
-
|
401
|
-
sig { returns(School) }
|
402
|
-
def third_to_last!; end
|
403
|
-
|
404
|
-
sig { returns(T.nilable(School)) }
|
405
|
-
def second_to_last; end
|
406
|
-
|
407
|
-
sig { returns(School) }
|
408
|
-
def second_to_last!; end
|
409
|
-
|
410
|
-
sig { returns(T.nilable(School)) }
|
411
|
-
def last; end
|
412
|
-
|
413
|
-
sig { returns(School) }
|
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 { params(args: T.untyped).returns(T::Boolean) }
|
432
|
-
def empty?(*args); end
|
433
|
-
|
434
|
-
sig { override.params(block: T.proc.params(e: School).void).returns(T::Array[School]) }
|
435
|
-
def each(&block); end
|
436
|
-
|
437
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[School]) }
|
438
|
-
def flatten(level); end
|
439
|
-
|
440
|
-
sig { returns(T::Array[School]) }
|
441
|
-
def to_a; end
|
442
|
-
|
443
|
-
sig do
|
444
|
-
type_parameters(:U).params(
|
445
|
-
blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
|
446
|
-
)
|
447
|
-
.returns(T::Array[T.type_parameter(:U)])
|
448
|
-
end
|
449
|
-
def map(&blk); end
|
450
334
|
end
|
451
335
|
|
452
336
|
class School::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
453
337
|
include School::CustomFinderMethods
|
454
|
-
include Enumerable
|
455
338
|
extend T::Sig
|
456
339
|
extend T::Generic
|
457
340
|
Elem = type_member(fixed: School)
|
@@ -540,95 +423,6 @@ class School::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
|
|
540
423
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
|
541
424
|
def extending(*args, &block); end
|
542
425
|
|
543
|
-
sig { params(args: T.untyped).returns(School) }
|
544
|
-
def find(*args); end
|
545
|
-
|
546
|
-
sig { params(args: T.untyped).returns(T.nilable(School)) }
|
547
|
-
def find_by(*args); end
|
548
|
-
|
549
|
-
sig { params(args: T.untyped).returns(School) }
|
550
|
-
def find_by!(*args); end
|
551
|
-
|
552
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
553
|
-
def find_or_initialize_by(attributes, &block); end
|
554
|
-
|
555
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
556
|
-
def find_or_create_by(attributes, &block); end
|
557
|
-
|
558
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
559
|
-
def find_or_create_by!(attributes, &block); end
|
560
|
-
|
561
|
-
sig { returns(T.nilable(School)) }
|
562
|
-
def first; end
|
563
|
-
|
564
|
-
sig { returns(School) }
|
565
|
-
def first!; end
|
566
|
-
|
567
|
-
sig { returns(T.nilable(School)) }
|
568
|
-
def second; end
|
569
|
-
|
570
|
-
sig { returns(School) }
|
571
|
-
def second!; end
|
572
|
-
|
573
|
-
sig { returns(T.nilable(School)) }
|
574
|
-
def third; end
|
575
|
-
|
576
|
-
sig { returns(School) }
|
577
|
-
def third!; end
|
578
|
-
|
579
|
-
sig { returns(T.nilable(School)) }
|
580
|
-
def third_to_last; end
|
581
|
-
|
582
|
-
sig { returns(School) }
|
583
|
-
def third_to_last!; end
|
584
|
-
|
585
|
-
sig { returns(T.nilable(School)) }
|
586
|
-
def second_to_last; end
|
587
|
-
|
588
|
-
sig { returns(School) }
|
589
|
-
def second_to_last!; end
|
590
|
-
|
591
|
-
sig { returns(T.nilable(School)) }
|
592
|
-
def last; end
|
593
|
-
|
594
|
-
sig { returns(School) }
|
595
|
-
def last!; end
|
596
|
-
|
597
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
598
|
-
def exists?(conditions = nil); end
|
599
|
-
|
600
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
601
|
-
def any?(*args); end
|
602
|
-
|
603
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
604
|
-
def many?(*args); end
|
605
|
-
|
606
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
607
|
-
def none?(*args); end
|
608
|
-
|
609
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
610
|
-
def one?(*args); end
|
611
|
-
|
612
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
613
|
-
def empty?(*args); end
|
614
|
-
|
615
|
-
sig { override.params(block: T.proc.params(e: School).void).returns(T::Array[School]) }
|
616
|
-
def each(&block); end
|
617
|
-
|
618
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[School]) }
|
619
|
-
def flatten(level); end
|
620
|
-
|
621
|
-
sig { returns(T::Array[School]) }
|
622
|
-
def to_a; end
|
623
|
-
|
624
|
-
sig do
|
625
|
-
type_parameters(:U).params(
|
626
|
-
blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
|
627
|
-
)
|
628
|
-
.returns(T::Array[T.type_parameter(:U)])
|
629
|
-
end
|
630
|
-
def map(&blk); end
|
631
|
-
|
632
426
|
sig { params(records: T.any(School, T::Array[School])).returns(T.self_type) }
|
633
427
|
def <<(*records); end
|
634
428
|
|