sorbet-rails 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +3 -3
- data/lib/bundled_rbi/typed_enum.rbi +7 -0
- data/lib/sorbet-rails.rb +0 -2
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +301 -0
- data/lib/sorbet-rails/config.rb +0 -1
- data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +11 -0
- data/lib/sorbet-rails/deprecation.rb +5 -0
- data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
- data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +36 -8
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +20 -9
- data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
- data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +34 -3
- data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
- data/lib/sorbet-rails/model_plugins/base.rb +10 -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 +6 -10
- data/lib/sorbet-rails/model_utils.rb +83 -36
- data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
- data/lib/sorbet-rails/railtie.rb +0 -2
- data/lib/sorbet-rails/tasks/rails_rbi.rake +32 -24
- data/sorbet-rails.gemspec +2 -2
- data/spec/active_record_rbi_formatter_spec.rb +24 -0
- data/spec/generators/rails-template.rb +90 -6
- data/spec/generators/sorbet_test_cases.rb +204 -122
- 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 +5 -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 +204 -122
- 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 +5 -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 +204 -122
- 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 +5 -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 +204 -122
- 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 +5 -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 +204 -122
- 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 +304 -0
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +38 -401
- data/spec/test_data/v5.0/expected_potion.rbi +38 -401
- data/spec/test_data/v5.0/expected_robe.rbi +38 -403
- data/spec/test_data/v5.0/expected_schema_migration.rbi +38 -401
- data/spec/test_data/v5.0/expected_school.rbi +47 -401
- data/spec/test_data/v5.0/expected_spell.rbi +292 -0
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +295 -0
- data/spec/test_data/v5.0/expected_spell_book.rbi +86 -432
- 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 +295 -0
- data/spec/test_data/v5.0/expected_squib.rbi +122 -477
- data/spec/test_data/v5.0/expected_subject.rbi +292 -0
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +295 -0
- data/spec/test_data/v5.0/expected_wand.rbi +75 -442
- data/spec/test_data/v5.0/expected_wizard.rbi +144 -498
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +295 -0
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +138 -498
- 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 +310 -0
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +38 -407
- data/spec/test_data/v5.1/expected_potion.rbi +38 -407
- data/spec/test_data/v5.1/expected_robe.rbi +38 -409
- data/spec/test_data/v5.1/expected_schema_migration.rbi +38 -407
- data/spec/test_data/v5.1/expected_school.rbi +47 -407
- data/spec/test_data/v5.1/expected_spell.rbi +298 -0
- data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +301 -0
- data/spec/test_data/v5.1/expected_spell_book.rbi +86 -438
- 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 +301 -0
- data/spec/test_data/v5.1/expected_squib.rbi +123 -484
- data/spec/test_data/v5.1/expected_subject.rbi +298 -0
- data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +301 -0
- data/spec/test_data/v5.1/expected_wand.rbi +75 -448
- data/spec/test_data/v5.1/expected_wizard.rbi +145 -505
- data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +301 -0
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +139 -505
- 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 +38 -407
- data/spec/test_data/v5.2/expected_blob.rbi +60 -426
- 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 +310 -0
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +38 -407
- data/spec/test_data/v5.2/expected_potion.rbi +38 -407
- data/spec/test_data/v5.2/expected_robe.rbi +38 -409
- data/spec/test_data/v5.2/expected_schema_migration.rbi +38 -407
- data/spec/test_data/v5.2/expected_school.rbi +47 -407
- data/spec/test_data/v5.2/expected_spell.rbi +298 -0
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +301 -0
- data/spec/test_data/v5.2/expected_spell_book.rbi +86 -438
- 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 +301 -0
- data/spec/test_data/v5.2/expected_squib.rbi +133 -488
- data/spec/test_data/v5.2/expected_subject.rbi +298 -0
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +301 -0
- data/spec/test_data/v5.2/expected_wand.rbi +75 -448
- data/spec/test_data/v5.2/expected_wizard.rbi +155 -509
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +301 -0
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +149 -509
- 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 +38 -431
- data/spec/test_data/v6.0/expected_blob.rbi +60 -450
- 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 +334 -0
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +38 -431
- data/spec/test_data/v6.0/expected_potion.rbi +38 -431
- data/spec/test_data/v6.0/expected_robe.rbi +38 -433
- data/spec/test_data/v6.0/expected_routes.rbi +14 -7
- data/spec/test_data/v6.0/expected_schema_migration.rbi +38 -431
- data/spec/test_data/v6.0/expected_school.rbi +47 -431
- data/spec/test_data/v6.0/expected_spell.rbi +322 -0
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +325 -0
- data/spec/test_data/v6.0/expected_spell_book.rbi +98 -474
- 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 +325 -0
- data/spec/test_data/v6.0/expected_squib.rbi +162 -541
- data/spec/test_data/v6.0/expected_subject.rbi +322 -0
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +325 -0
- data/spec/test_data/v6.0/expected_wand.rbi +91 -488
- data/spec/test_data/v6.0/expected_wizard.rbi +184 -562
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +325 -0
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +178 -562
- metadata +170 -24
- data/lib/bundled_rbi/active_record_base.rbi +0 -83
- data/lib/bundled_rbi/active_record_relation.rbi +0 -122
- data/lib/bundled_rbi/parameters.rbi +0 -28
- data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -32
- data/lib/sorbet-rails/custom_types/integer_string.rb +0 -35
- data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +0 -131
- data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -46
- data/spec/boolean_string_spec.rb +0 -59
- data/spec/custom_params_methods_spec.rb +0 -138
- data/spec/integer_string_spec.rb +0 -46
- 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
@@ -8,8 +8,6 @@ module School::ActiveRelation_WhereNot
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module School::GeneratedAttributeMethods
|
11
|
-
extend T::Sig
|
12
|
-
|
13
11
|
sig { returns(Integer) }
|
14
12
|
def id; end
|
15
13
|
|
@@ -29,6 +27,14 @@ module School::GeneratedAttributeMethods
|
|
29
27
|
def name?; end
|
30
28
|
end
|
31
29
|
|
30
|
+
module School::GeneratedAssociationMethods
|
31
|
+
sig { returns(::Headmaster) }
|
32
|
+
def headmaster; end
|
33
|
+
|
34
|
+
sig { params(value: ::Headmaster).void }
|
35
|
+
def headmaster=(value); end
|
36
|
+
end
|
37
|
+
|
32
38
|
module School::CustomFinderMethods
|
33
39
|
sig { params(limit: Integer).returns(T::Array[School]) }
|
34
40
|
def first_n(limit); end
|
@@ -48,137 +54,13 @@ end
|
|
48
54
|
|
49
55
|
class School < ApplicationRecord
|
50
56
|
include School::GeneratedAttributeMethods
|
57
|
+
include School::GeneratedAssociationMethods
|
51
58
|
extend School::CustomFinderMethods
|
52
|
-
extend
|
53
|
-
extend T::Generic
|
59
|
+
extend School::QueryMethodsReturningRelation
|
54
60
|
RelationType = T.type_alias { T.any(School::ActiveRecord_Relation, School::ActiveRecord_Associations_CollectionProxy, School::ActiveRecord_AssociationRelation) }
|
55
|
-
|
56
|
-
sig { returns(School::ActiveRecord_Relation) }
|
57
|
-
def self.all; end
|
58
|
-
|
59
|
-
sig { params(block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
60
|
-
def self.unscoped(&block); end
|
61
|
-
|
62
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
63
|
-
def self.select(*args); end
|
64
|
-
|
65
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
66
|
-
def self.reselect(*args); end
|
67
|
-
|
68
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
69
|
-
def self.order(*args); end
|
70
|
-
|
71
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
72
|
-
def self.reorder(*args); end
|
73
|
-
|
74
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
75
|
-
def self.group(*args); end
|
76
|
-
|
77
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
78
|
-
def self.limit(*args); end
|
79
|
-
|
80
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
81
|
-
def self.offset(*args); end
|
82
|
-
|
83
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
84
|
-
def self.joins(*args); end
|
85
|
-
|
86
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
87
|
-
def self.left_joins(*args); end
|
88
|
-
|
89
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
90
|
-
def self.left_outer_joins(*args); end
|
91
|
-
|
92
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
93
|
-
def self.where(*args); end
|
94
|
-
|
95
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
96
|
-
def self.rewhere(*args); end
|
97
|
-
|
98
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
99
|
-
def self.preload(*args); end
|
100
|
-
|
101
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
102
|
-
def self.extract_associated(*args); end
|
103
|
-
|
104
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
105
|
-
def self.eager_load(*args); end
|
106
|
-
|
107
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
108
|
-
def self.includes(*args); end
|
109
|
-
|
110
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
111
|
-
def self.from(*args); end
|
112
|
-
|
113
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
114
|
-
def self.lock(*args); end
|
115
|
-
|
116
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
117
|
-
def self.readonly(*args); end
|
118
|
-
|
119
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
120
|
-
def self.or(*args); end
|
121
|
-
|
122
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
123
|
-
def self.having(*args); end
|
124
|
-
|
125
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
126
|
-
def self.create_with(*args); end
|
127
|
-
|
128
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
129
|
-
def self.distinct(*args); end
|
130
|
-
|
131
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
132
|
-
def self.references(*args); end
|
133
|
-
|
134
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
135
|
-
def self.none(*args); end
|
136
|
-
|
137
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
138
|
-
def self.unscope(*args); end
|
139
|
-
|
140
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
141
|
-
def self.optimizer_hints(*args); end
|
142
|
-
|
143
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
144
|
-
def self.merge(*args); end
|
145
|
-
|
146
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
147
|
-
def self.except(*args); end
|
148
|
-
|
149
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_Relation) }
|
150
|
-
def self.only(*args); end
|
151
|
-
|
152
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
153
|
-
def self.extending(*args, &block); end
|
154
|
-
|
155
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
156
|
-
def self.exists?(conditions = nil); end
|
157
|
-
|
158
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
159
|
-
def self.any?(*args); end
|
160
|
-
|
161
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
162
|
-
def self.many?(*args); end
|
163
|
-
|
164
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
165
|
-
def self.none?(*args); end
|
166
|
-
|
167
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
168
|
-
def self.one?(*args); end
|
169
|
-
|
170
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
171
|
-
def self.empty?(*args); end
|
172
61
|
end
|
173
62
|
|
174
|
-
|
175
|
-
include School::ActiveRelation_WhereNot
|
176
|
-
include School::CustomFinderMethods
|
177
|
-
include Enumerable
|
178
|
-
extend T::Sig
|
179
|
-
extend T::Generic
|
180
|
-
Elem = type_member(fixed: School)
|
181
|
-
|
63
|
+
module School::QueryMethodsReturningRelation
|
182
64
|
sig { returns(School::ActiveRecord_Relation) }
|
183
65
|
def all; end
|
184
66
|
|
@@ -278,37 +160,24 @@ class School::ActiveRecord_Relation < ActiveRecord::Relation
|
|
278
160
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
279
161
|
def extending(*args, &block); end
|
280
162
|
|
281
|
-
sig
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
def
|
292
|
-
|
293
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
294
|
-
def one?(*args); end
|
295
|
-
|
296
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
297
|
-
def empty?(*args); end
|
163
|
+
sig do
|
164
|
+
params(
|
165
|
+
of: T.nilable(Integer),
|
166
|
+
start: T.nilable(Integer),
|
167
|
+
finish: T.nilable(Integer),
|
168
|
+
load: T.nilable(T::Boolean),
|
169
|
+
error_on_ignore: T.nilable(T::Boolean),
|
170
|
+
block: T.nilable(T.proc.params(e: School::ActiveRecord_Relation).void)
|
171
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
172
|
+
end
|
173
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
298
174
|
end
|
299
175
|
|
300
|
-
|
301
|
-
include School::ActiveRelation_WhereNot
|
302
|
-
include School::CustomFinderMethods
|
303
|
-
include Enumerable
|
304
|
-
extend T::Sig
|
305
|
-
extend T::Generic
|
306
|
-
Elem = type_member(fixed: School)
|
307
|
-
|
176
|
+
module School::QueryMethodsReturningAssociationRelation
|
308
177
|
sig { returns(School::ActiveRecord_AssociationRelation) }
|
309
178
|
def all; end
|
310
179
|
|
311
|
-
sig { params(block: T.nilable(T.proc.void)).returns(School::
|
180
|
+
sig { params(block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
312
181
|
def unscoped(&block); end
|
313
182
|
|
314
183
|
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
@@ -404,290 +273,37 @@ class School::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
|
|
404
273
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
|
405
274
|
def extending(*args, &block); end
|
406
275
|
|
407
|
-
sig { params(args: T.untyped).returns(School) }
|
408
|
-
def find(*args); end
|
409
|
-
|
410
|
-
sig { params(args: T.untyped).returns(T.nilable(School)) }
|
411
|
-
def find_by(*args); end
|
412
|
-
|
413
|
-
sig { params(args: T.untyped).returns(School) }
|
414
|
-
def find_by!(*args); end
|
415
|
-
|
416
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
417
|
-
def find_or_initialize_by(attributes, &block); end
|
418
|
-
|
419
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
420
|
-
def find_or_create_by(attributes, &block); end
|
421
|
-
|
422
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
423
|
-
def find_or_create_by!(attributes, &block); end
|
424
|
-
|
425
|
-
sig { returns(T.nilable(School)) }
|
426
|
-
def first; end
|
427
|
-
|
428
|
-
sig { returns(School) }
|
429
|
-
def first!; end
|
430
|
-
|
431
|
-
sig { returns(T.nilable(School)) }
|
432
|
-
def second; end
|
433
|
-
|
434
|
-
sig { returns(School) }
|
435
|
-
def second!; end
|
436
|
-
|
437
|
-
sig { returns(T.nilable(School)) }
|
438
|
-
def third; end
|
439
|
-
|
440
|
-
sig { returns(School) }
|
441
|
-
def third!; end
|
442
|
-
|
443
|
-
sig { returns(T.nilable(School)) }
|
444
|
-
def third_to_last; end
|
445
|
-
|
446
|
-
sig { returns(School) }
|
447
|
-
def third_to_last!; end
|
448
|
-
|
449
|
-
sig { returns(T.nilable(School)) }
|
450
|
-
def second_to_last; end
|
451
|
-
|
452
|
-
sig { returns(School) }
|
453
|
-
def second_to_last!; end
|
454
|
-
|
455
|
-
sig { returns(T.nilable(School)) }
|
456
|
-
def last; end
|
457
|
-
|
458
|
-
sig { returns(School) }
|
459
|
-
def last!; end
|
460
|
-
|
461
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
462
|
-
def exists?(conditions = nil); end
|
463
|
-
|
464
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
465
|
-
def any?(*args); end
|
466
|
-
|
467
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
468
|
-
def many?(*args); end
|
469
|
-
|
470
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
471
|
-
def none?(*args); end
|
472
|
-
|
473
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
474
|
-
def one?(*args); end
|
475
|
-
|
476
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
477
|
-
def empty?(*args); end
|
478
|
-
|
479
|
-
sig { override.params(block: T.proc.params(e: School).void).returns(T::Array[School]) }
|
480
|
-
def each(&block); end
|
481
|
-
|
482
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[School]) }
|
483
|
-
def flatten(level); end
|
484
|
-
|
485
|
-
sig { returns(T::Array[School]) }
|
486
|
-
def to_a; end
|
487
|
-
|
488
276
|
sig do
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
277
|
+
params(
|
278
|
+
of: T.nilable(Integer),
|
279
|
+
start: T.nilable(Integer),
|
280
|
+
finish: T.nilable(Integer),
|
281
|
+
load: T.nilable(T::Boolean),
|
282
|
+
error_on_ignore: T.nilable(T::Boolean),
|
283
|
+
block: T.nilable(T.proc.params(e: School::ActiveRecord_AssociationRelation).void)
|
284
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
493
285
|
end
|
494
|
-
def
|
286
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
495
287
|
end
|
496
288
|
|
497
|
-
class School::
|
289
|
+
class School::ActiveRecord_Relation < ActiveRecord::Relation
|
290
|
+
include School::ActiveRelation_WhereNot
|
498
291
|
include School::CustomFinderMethods
|
499
|
-
include
|
500
|
-
extend T::Sig
|
501
|
-
extend T::Generic
|
292
|
+
include School::QueryMethodsReturningRelation
|
502
293
|
Elem = type_member(fixed: School)
|
294
|
+
end
|
503
295
|
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
511
|
-
def select(*args); end
|
512
|
-
|
513
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
514
|
-
def reselect(*args); end
|
515
|
-
|
516
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
517
|
-
def order(*args); end
|
518
|
-
|
519
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
520
|
-
def reorder(*args); end
|
521
|
-
|
522
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
523
|
-
def group(*args); end
|
524
|
-
|
525
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
526
|
-
def limit(*args); end
|
527
|
-
|
528
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
529
|
-
def offset(*args); end
|
530
|
-
|
531
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
532
|
-
def joins(*args); end
|
533
|
-
|
534
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
535
|
-
def left_joins(*args); end
|
536
|
-
|
537
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
538
|
-
def left_outer_joins(*args); end
|
539
|
-
|
540
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
541
|
-
def where(*args); end
|
542
|
-
|
543
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
544
|
-
def rewhere(*args); end
|
545
|
-
|
546
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
547
|
-
def preload(*args); end
|
548
|
-
|
549
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
550
|
-
def extract_associated(*args); end
|
551
|
-
|
552
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
553
|
-
def eager_load(*args); end
|
554
|
-
|
555
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
556
|
-
def includes(*args); end
|
557
|
-
|
558
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
559
|
-
def from(*args); end
|
560
|
-
|
561
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
562
|
-
def lock(*args); end
|
563
|
-
|
564
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
565
|
-
def readonly(*args); end
|
566
|
-
|
567
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
568
|
-
def or(*args); end
|
569
|
-
|
570
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
571
|
-
def having(*args); end
|
572
|
-
|
573
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
574
|
-
def create_with(*args); end
|
575
|
-
|
576
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
577
|
-
def distinct(*args); end
|
578
|
-
|
579
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
580
|
-
def references(*args); end
|
581
|
-
|
582
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
583
|
-
def none(*args); end
|
584
|
-
|
585
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
586
|
-
def unscope(*args); end
|
587
|
-
|
588
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
589
|
-
def optimizer_hints(*args); end
|
590
|
-
|
591
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
592
|
-
def merge(*args); end
|
593
|
-
|
594
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
595
|
-
def except(*args); end
|
596
|
-
|
597
|
-
sig { params(args: T.untyped).returns(School::ActiveRecord_AssociationRelation) }
|
598
|
-
def only(*args); end
|
599
|
-
|
600
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
|
601
|
-
def extending(*args, &block); end
|
602
|
-
|
603
|
-
sig { params(args: T.untyped).returns(School) }
|
604
|
-
def find(*args); end
|
605
|
-
|
606
|
-
sig { params(args: T.untyped).returns(T.nilable(School)) }
|
607
|
-
def find_by(*args); end
|
608
|
-
|
609
|
-
sig { params(args: T.untyped).returns(School) }
|
610
|
-
def find_by!(*args); end
|
611
|
-
|
612
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
613
|
-
def find_or_initialize_by(attributes, &block); end
|
614
|
-
|
615
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
616
|
-
def find_or_create_by(attributes, &block); end
|
617
|
-
|
618
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
619
|
-
def find_or_create_by!(attributes, &block); end
|
620
|
-
|
621
|
-
sig { returns(T.nilable(School)) }
|
622
|
-
def first; end
|
623
|
-
|
624
|
-
sig { returns(School) }
|
625
|
-
def first!; end
|
626
|
-
|
627
|
-
sig { returns(T.nilable(School)) }
|
628
|
-
def second; end
|
629
|
-
|
630
|
-
sig { returns(School) }
|
631
|
-
def second!; end
|
632
|
-
|
633
|
-
sig { returns(T.nilable(School)) }
|
634
|
-
def third; end
|
635
|
-
|
636
|
-
sig { returns(School) }
|
637
|
-
def third!; end
|
638
|
-
|
639
|
-
sig { returns(T.nilable(School)) }
|
640
|
-
def third_to_last; end
|
641
|
-
|
642
|
-
sig { returns(School) }
|
643
|
-
def third_to_last!; end
|
644
|
-
|
645
|
-
sig { returns(T.nilable(School)) }
|
646
|
-
def second_to_last; end
|
647
|
-
|
648
|
-
sig { returns(School) }
|
649
|
-
def second_to_last!; end
|
650
|
-
|
651
|
-
sig { returns(T.nilable(School)) }
|
652
|
-
def last; end
|
653
|
-
|
654
|
-
sig { returns(School) }
|
655
|
-
def last!; end
|
656
|
-
|
657
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
658
|
-
def exists?(conditions = nil); end
|
659
|
-
|
660
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
661
|
-
def any?(*args); end
|
662
|
-
|
663
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
664
|
-
def many?(*args); end
|
665
|
-
|
666
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
667
|
-
def none?(*args); end
|
668
|
-
|
669
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
670
|
-
def one?(*args); end
|
671
|
-
|
672
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
673
|
-
def empty?(*args); end
|
674
|
-
|
675
|
-
sig { override.params(block: T.proc.params(e: School).void).returns(T::Array[School]) }
|
676
|
-
def each(&block); end
|
677
|
-
|
678
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[School]) }
|
679
|
-
def flatten(level); end
|
680
|
-
|
681
|
-
sig { returns(T::Array[School]) }
|
682
|
-
def to_a; end
|
296
|
+
class School::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
297
|
+
include School::ActiveRelation_WhereNot
|
298
|
+
include School::CustomFinderMethods
|
299
|
+
include School::QueryMethodsReturningAssociationRelation
|
300
|
+
Elem = type_member(fixed: School)
|
301
|
+
end
|
683
302
|
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
.returns(T::Array[T.type_parameter(:U)])
|
689
|
-
end
|
690
|
-
def map(&blk); end
|
303
|
+
class School::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
304
|
+
include School::CustomFinderMethods
|
305
|
+
include School::QueryMethodsReturningAssociationRelation
|
306
|
+
Elem = type_member(fixed: School)
|
691
307
|
|
692
308
|
sig { params(records: T.any(School, T::Array[School])).returns(T.self_type) }
|
693
309
|
def <<(*records); end
|