sorbet-rails 0.6.3 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +1 -2
- data/.gitignore +2 -1
- data/.travis.yml +3 -1
- data/README.md +54 -7
- data/Rakefile +3 -3
- data/lib/bundled_rbi/customizabel_rbi_formatter.rbi +29 -0
- data/lib/bundled_rbi/pluck_to_tstruct.rbi +2 -1
- data/lib/bundled_rbi/typed_enum.rbi +7 -0
- data/lib/sorbet-rails.rb +1 -3
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +8 -2
- data/lib/sorbet-rails/config.rb +11 -0
- data/lib/sorbet-rails/deprecation.rb +1 -0
- data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
- data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
- data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
- data/lib/sorbet-rails/job_rbi_formatter.rb +73 -62
- data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
- data/lib/sorbet-rails/model_column_utils.rb +129 -0
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +37 -3
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +0 -103
- 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 +0 -9
- data/lib/sorbet-rails/model_rbi_formatter.rb +4 -8
- data/lib/sorbet-rails/model_utils.rb +73 -32
- data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
- data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +17 -7
- data/lib/sorbet-rails/railtie.rb +0 -2
- data/lib/sorbet-rails/sorbet_utils.rb +152 -150
- data/lib/sorbet-rails/tasks/rails_rbi.rake +18 -26
- data/sorbet-rails.gemspec +1 -1
- data/spec/generators/rails-template.rb +3 -6
- data/spec/generators/sorbet_test_cases.rb +66 -88
- data/spec/job_rbi_formatter_spec.rb +1 -1
- data/spec/pluck_to_tstruct_spec.rb +74 -1
- data/spec/rails_helper.rb +2 -2
- data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
- data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
- data/spec/support/v5.0/Gemfile +1 -1
- data/spec/support/v5.0/Gemfile.lock +9 -9
- data/spec/support/v5.0/app/models/spell_book.rb +2 -0
- data/spec/support/v5.0/app/models/wizard.rb +1 -1
- data/spec/support/v5.0/sorbet_test_cases.rb +66 -88
- data/spec/support/v5.1/Gemfile.lock +7 -7
- data/spec/support/v5.1/app/models/spell_book.rb +2 -0
- data/spec/support/v5.1/app/models/wizard.rb +1 -1
- data/spec/support/v5.1/sorbet_test_cases.rb +66 -88
- data/spec/support/v5.2/Gemfile +1 -1
- data/spec/support/v5.2/Gemfile.lock +9 -9
- data/spec/support/v5.2/app/models/spell_book.rb +2 -0
- data/spec/support/v5.2/app/models/wizard.rb +1 -1
- data/spec/support/v5.2/sorbet_test_cases.rb +66 -88
- data/spec/support/v6.0/.gitignore +6 -0
- data/spec/support/v6.0/Gemfile +3 -3
- data/spec/support/v6.0/Gemfile.lock +77 -76
- data/spec/support/v6.0/app/models/spell_book.rb +2 -0
- data/spec/support/v6.0/app/models/wizard.rb +1 -1
- data/spec/support/v6.0/bin/bundle +22 -13
- data/spec/support/v6.0/config/environments/test.rb +1 -1
- data/spec/support/v6.0/sorbet_test_cases.rb +66 -88
- data/spec/support/v6.0/tmp/pids/.keep +0 -0
- data/spec/test_data/v5.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.0/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.0/expected_headmaster.rbi +60 -190
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +42 -188
- data/spec/test_data/v5.0/expected_potion.rbi +51 -188
- data/spec/test_data/v5.0/expected_robe.rbi +51 -190
- data/spec/test_data/v5.0/expected_schema_migration.rbi +42 -188
- data/spec/test_data/v5.0/expected_school.rbi +51 -190
- data/spec/test_data/v5.0/expected_spell.rbi +42 -190
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +60 -190
- data/spec/test_data/v5.0/expected_spell_book.rbi +86 -215
- data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +60 -190
- data/spec/test_data/v5.0/expected_squib.rbi +131 -263
- data/spec/test_data/v5.0/expected_subject.rbi +42 -190
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +60 -190
- data/spec/test_data/v5.0/expected_wand.rbi +84 -225
- data/spec/test_data/v5.0/expected_wizard.rbi +131 -263
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +60 -190
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +131 -263
- data/spec/test_data/v5.1/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.1/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.1/expected_headmaster.rbi +60 -196
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +42 -194
- data/spec/test_data/v5.1/expected_potion.rbi +51 -194
- data/spec/test_data/v5.1/expected_robe.rbi +51 -196
- data/spec/test_data/v5.1/expected_schema_migration.rbi +42 -194
- data/spec/test_data/v5.1/expected_school.rbi +51 -196
- data/spec/test_data/v5.1/expected_spell.rbi +42 -196
- data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +60 -196
- data/spec/test_data/v5.1/expected_spell_book.rbi +86 -221
- data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +60 -196
- data/spec/test_data/v5.1/expected_squib.rbi +132 -270
- data/spec/test_data/v5.1/expected_subject.rbi +42 -196
- data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +60 -196
- data/spec/test_data/v5.1/expected_wand.rbi +84 -231
- data/spec/test_data/v5.1/expected_wizard.rbi +132 -270
- data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +60 -196
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +132 -270
- data/spec/test_data/v5.2/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.2/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.2/expected_attachment.rbi +60 -194
- data/spec/test_data/v5.2/expected_blob.rbi +80 -214
- data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.2/expected_headmaster.rbi +60 -196
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +42 -194
- data/spec/test_data/v5.2/expected_potion.rbi +51 -194
- data/spec/test_data/v5.2/expected_robe.rbi +51 -196
- data/spec/test_data/v5.2/expected_schema_migration.rbi +42 -194
- data/spec/test_data/v5.2/expected_school.rbi +51 -196
- data/spec/test_data/v5.2/expected_spell.rbi +42 -196
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +60 -196
- data/spec/test_data/v5.2/expected_spell_book.rbi +86 -221
- data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +60 -196
- data/spec/test_data/v5.2/expected_squib.rbi +156 -276
- data/spec/test_data/v5.2/expected_subject.rbi +42 -196
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +60 -196
- data/spec/test_data/v5.2/expected_wand.rbi +84 -231
- data/spec/test_data/v5.2/expected_wizard.rbi +156 -276
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +60 -196
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +156 -276
- data/spec/test_data/v6.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v6.0/expected_active_record_relation.rbi +10 -10
- data/spec/test_data/v6.0/expected_attachment.rbi +60 -218
- data/spec/test_data/v6.0/expected_blob.rbi +80 -238
- data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v6.0/expected_headmaster.rbi +60 -220
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +42 -218
- data/spec/test_data/v6.0/expected_potion.rbi +51 -218
- data/spec/test_data/v6.0/expected_robe.rbi +51 -220
- data/spec/test_data/v6.0/expected_routes.rbi +14 -7
- data/spec/test_data/v6.0/expected_schema_migration.rbi +42 -218
- data/spec/test_data/v6.0/expected_school.rbi +51 -220
- data/spec/test_data/v6.0/expected_spell.rbi +42 -220
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +60 -220
- data/spec/test_data/v6.0/expected_spell_book.rbi +98 -257
- data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +60 -220
- data/spec/test_data/v6.0/expected_squib.rbi +182 -326
- data/spec/test_data/v6.0/expected_subject.rbi +42 -220
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +60 -220
- data/spec/test_data/v6.0/expected_wand.rbi +100 -271
- data/spec/test_data/v6.0/expected_wizard.rbi +182 -326
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +60 -220
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +182 -326
- metadata +46 -11
- data/lib/bundled_rbi/parameters.rbi +0 -28
- data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -42
- data/lib/sorbet-rails/custom_types/integer_string.rb +0 -45
- data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -57
- 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
@@ -8,8 +8,6 @@ module Wizard::HABTM_Subjects::ActiveRelation_WhereNot
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module Wizard::HABTM_Subjects::GeneratedAttributeMethods
|
11
|
-
extend T::Sig
|
12
|
-
|
13
11
|
sig { returns(T.nilable(Integer)) }
|
14
12
|
def subject_id; end
|
15
13
|
|
@@ -30,17 +28,33 @@ module Wizard::HABTM_Subjects::GeneratedAttributeMethods
|
|
30
28
|
end
|
31
29
|
|
32
30
|
module Wizard::HABTM_Subjects::GeneratedAssociationMethods
|
33
|
-
extend T::Sig
|
34
|
-
|
35
31
|
sig { returns(T.nilable(::Wizard)) }
|
36
32
|
def left_side; end
|
37
33
|
|
34
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
|
35
|
+
def build_left_side(*args, &block); end
|
36
|
+
|
37
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
|
38
|
+
def create_left_side(*args, &block); end
|
39
|
+
|
40
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
|
41
|
+
def create_left_side!(*args, &block); end
|
42
|
+
|
38
43
|
sig { params(value: T.nilable(::Wizard)).void }
|
39
44
|
def left_side=(value); end
|
40
45
|
|
41
46
|
sig { returns(T.nilable(::Subject)) }
|
42
47
|
def subject; end
|
43
48
|
|
49
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
|
50
|
+
def build_subject(*args, &block); end
|
51
|
+
|
52
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
|
53
|
+
def create_subject(*args, &block); end
|
54
|
+
|
55
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
|
56
|
+
def create_subject!(*args, &block); end
|
57
|
+
|
44
58
|
sig { params(value: T.nilable(::Subject)).void }
|
45
59
|
def subject=(value); end
|
46
60
|
end
|
@@ -66,105 +80,11 @@ class Wizard::HABTM_Subjects < ActiveRecord::Base
|
|
66
80
|
include Wizard::HABTM_Subjects::GeneratedAttributeMethods
|
67
81
|
include Wizard::HABTM_Subjects::GeneratedAssociationMethods
|
68
82
|
extend Wizard::HABTM_Subjects::CustomFinderMethods
|
69
|
-
extend
|
70
|
-
extend T::Generic
|
83
|
+
extend Wizard::HABTM_Subjects::QueryMethodsReturningRelation
|
71
84
|
RelationType = T.type_alias { T.any(Wizard::HABTM_Subjects::ActiveRecord_Relation, Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy, Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
72
|
-
|
73
|
-
sig { returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
74
|
-
def self.all; end
|
75
|
-
|
76
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
77
|
-
def self.unscoped(&block); end
|
78
|
-
|
79
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
80
|
-
def self.select(*args); end
|
81
|
-
|
82
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
83
|
-
def self.order(*args); end
|
84
|
-
|
85
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
86
|
-
def self.reorder(*args); end
|
87
|
-
|
88
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
89
|
-
def self.group(*args); end
|
90
|
-
|
91
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
92
|
-
def self.limit(*args); end
|
93
|
-
|
94
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
95
|
-
def self.offset(*args); end
|
96
|
-
|
97
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
98
|
-
def self.joins(*args); end
|
99
|
-
|
100
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
101
|
-
def self.left_joins(*args); end
|
102
|
-
|
103
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
104
|
-
def self.left_outer_joins(*args); end
|
105
|
-
|
106
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
107
|
-
def self.where(*args); end
|
108
|
-
|
109
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
110
|
-
def self.rewhere(*args); end
|
111
|
-
|
112
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
113
|
-
def self.preload(*args); end
|
114
|
-
|
115
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
116
|
-
def self.eager_load(*args); end
|
117
|
-
|
118
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
119
|
-
def self.includes(*args); end
|
120
|
-
|
121
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
122
|
-
def self.from(*args); end
|
123
|
-
|
124
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
125
|
-
def self.lock(*args); end
|
126
|
-
|
127
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
128
|
-
def self.readonly(*args); end
|
129
|
-
|
130
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
131
|
-
def self.or(*args); end
|
132
|
-
|
133
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
134
|
-
def self.having(*args); end
|
135
|
-
|
136
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
137
|
-
def self.create_with(*args); end
|
138
|
-
|
139
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
140
|
-
def self.distinct(*args); end
|
141
|
-
|
142
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
143
|
-
def self.references(*args); end
|
144
|
-
|
145
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
146
|
-
def self.none(*args); end
|
147
|
-
|
148
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
149
|
-
def self.unscope(*args); end
|
150
|
-
|
151
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
152
|
-
def self.merge(*args); end
|
153
|
-
|
154
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
155
|
-
def self.except(*args); end
|
156
|
-
|
157
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
158
|
-
def self.extending(*args, &block); end
|
159
85
|
end
|
160
86
|
|
161
|
-
|
162
|
-
include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
|
163
|
-
include Wizard::HABTM_Subjects::CustomFinderMethods
|
164
|
-
extend T::Sig
|
165
|
-
extend T::Generic
|
166
|
-
Elem = type_member(fixed: Wizard::HABTM_Subjects)
|
167
|
-
|
87
|
+
module Wizard::HABTM_Subjects::QueryMethodsReturningRelation
|
168
88
|
sig { returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
169
89
|
def all; end
|
170
90
|
|
@@ -251,19 +171,25 @@ class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
|
|
251
171
|
|
252
172
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
253
173
|
def extending(*args, &block); end
|
254
|
-
end
|
255
174
|
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
175
|
+
sig do
|
176
|
+
params(
|
177
|
+
of: T.nilable(Integer),
|
178
|
+
start: T.nilable(Integer),
|
179
|
+
finish: T.nilable(Integer),
|
180
|
+
load: T.nilable(T::Boolean),
|
181
|
+
error_on_ignore: T.nilable(T::Boolean),
|
182
|
+
block: T.nilable(T.proc.params(e: Wizard::HABTM_Subjects::ActiveRecord_Relation).void)
|
183
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
184
|
+
end
|
185
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
186
|
+
end
|
262
187
|
|
188
|
+
module Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
|
263
189
|
sig { returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
264
190
|
def all; end
|
265
191
|
|
266
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::
|
192
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
267
193
|
def unscoped(&block); end
|
268
194
|
|
269
195
|
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
@@ -346,100 +272,38 @@ class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::A
|
|
346
272
|
|
347
273
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
348
274
|
def extending(*args, &block); end
|
275
|
+
|
276
|
+
sig do
|
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: Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation).void)
|
284
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
285
|
+
end
|
286
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
349
287
|
end
|
350
288
|
|
351
|
-
class Wizard::HABTM_Subjects::
|
289
|
+
class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
|
290
|
+
include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
|
352
291
|
include Wizard::HABTM_Subjects::CustomFinderMethods
|
353
|
-
|
354
|
-
extend T::Generic
|
292
|
+
include Wizard::HABTM_Subjects::QueryMethodsReturningRelation
|
355
293
|
Elem = type_member(fixed: Wizard::HABTM_Subjects)
|
294
|
+
end
|
356
295
|
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
364
|
-
def select(*args); end
|
365
|
-
|
366
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
367
|
-
def order(*args); end
|
368
|
-
|
369
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
370
|
-
def reorder(*args); end
|
371
|
-
|
372
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
373
|
-
def group(*args); end
|
374
|
-
|
375
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
376
|
-
def limit(*args); end
|
377
|
-
|
378
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
379
|
-
def offset(*args); end
|
380
|
-
|
381
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
382
|
-
def joins(*args); end
|
383
|
-
|
384
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
385
|
-
def left_joins(*args); end
|
386
|
-
|
387
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
388
|
-
def left_outer_joins(*args); end
|
389
|
-
|
390
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
391
|
-
def where(*args); end
|
392
|
-
|
393
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
394
|
-
def rewhere(*args); end
|
395
|
-
|
396
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
397
|
-
def preload(*args); end
|
398
|
-
|
399
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
400
|
-
def eager_load(*args); end
|
401
|
-
|
402
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
403
|
-
def includes(*args); end
|
404
|
-
|
405
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
406
|
-
def from(*args); end
|
407
|
-
|
408
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
409
|
-
def lock(*args); end
|
410
|
-
|
411
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
412
|
-
def readonly(*args); end
|
413
|
-
|
414
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
415
|
-
def or(*args); end
|
416
|
-
|
417
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
418
|
-
def having(*args); end
|
419
|
-
|
420
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
421
|
-
def create_with(*args); end
|
422
|
-
|
423
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
424
|
-
def distinct(*args); end
|
425
|
-
|
426
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
427
|
-
def references(*args); end
|
428
|
-
|
429
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
430
|
-
def none(*args); end
|
431
|
-
|
432
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
433
|
-
def unscope(*args); end
|
434
|
-
|
435
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
436
|
-
def merge(*args); end
|
437
|
-
|
438
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
439
|
-
def except(*args); end
|
296
|
+
class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
297
|
+
include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
|
298
|
+
include Wizard::HABTM_Subjects::CustomFinderMethods
|
299
|
+
include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
|
300
|
+
Elem = type_member(fixed: Wizard::HABTM_Subjects)
|
301
|
+
end
|
440
302
|
|
441
|
-
|
442
|
-
|
303
|
+
class Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
304
|
+
include Wizard::HABTM_Subjects::CustomFinderMethods
|
305
|
+
include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
|
306
|
+
Elem = type_member(fixed: Wizard::HABTM_Subjects)
|
443
307
|
|
444
308
|
sig { params(records: T.any(Wizard::HABTM_Subjects, T::Array[Wizard::HABTM_Subjects])).returns(T.self_type) }
|
445
309
|
def <<(*records); end
|
@@ -3,8 +3,6 @@
|
|
3
3
|
|
4
4
|
# typed: strong
|
5
5
|
module Wizard::EnumInstanceMethods
|
6
|
-
extend T::Sig
|
7
|
-
|
8
6
|
sig { returns(T::Boolean) }
|
9
7
|
def broom_nimbus?; end
|
10
8
|
|
@@ -114,8 +112,6 @@ module Wizard::ActiveRelation_WhereNot
|
|
114
112
|
end
|
115
113
|
|
116
114
|
module Wizard::GeneratedAttributeMethods
|
117
|
-
extend T::Sig
|
118
|
-
|
119
115
|
sig { returns(T::Boolean) }
|
120
116
|
def broom?; end
|
121
117
|
|
@@ -293,11 +289,18 @@ class Wizard::QuidditchPosition < T::Enum
|
|
293
289
|
end
|
294
290
|
|
295
291
|
module Wizard::GeneratedAssociationMethods
|
296
|
-
extend T::Sig
|
297
|
-
|
298
292
|
sig { returns(T.nilable(T.untyped)) }
|
299
293
|
def school; end
|
300
294
|
|
295
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
|
296
|
+
def build_school(*args, &block); end
|
297
|
+
|
298
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
|
299
|
+
def create_school(*args, &block); end
|
300
|
+
|
301
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
|
302
|
+
def create_school!(*args, &block); end
|
303
|
+
|
301
304
|
sig { params(value: T.nilable(T.untyped)).void }
|
302
305
|
def school=(value); end
|
303
306
|
|
@@ -316,6 +319,15 @@ module Wizard::GeneratedAssociationMethods
|
|
316
319
|
sig { returns(T.nilable(::Wand)) }
|
317
320
|
def wand; end
|
318
321
|
|
322
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
323
|
+
def build_wand(*args, &block); end
|
324
|
+
|
325
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
326
|
+
def create_wand(*args, &block); end
|
327
|
+
|
328
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
|
329
|
+
def create_wand!(*args, &block); end
|
330
|
+
|
319
331
|
sig { params(value: T.nilable(::Wand)).void }
|
320
332
|
def wand=(value); end
|
321
333
|
end
|
@@ -342,8 +354,7 @@ class Wizard < ApplicationRecord
|
|
342
354
|
include Wizard::GeneratedAttributeMethods
|
343
355
|
include Wizard::GeneratedAssociationMethods
|
344
356
|
extend Wizard::CustomFinderMethods
|
345
|
-
extend
|
346
|
-
extend T::Generic
|
357
|
+
extend Wizard::QueryMethodsReturningRelation
|
347
358
|
RelationType = T.type_alias { T.any(Wizard::ActiveRecord_Relation, Wizard::ActiveRecord_Associations_CollectionProxy, Wizard::ActiveRecord_AssociationRelation) }
|
348
359
|
|
349
360
|
sig { returns(T::Hash[T.any(String, Symbol), String]) }
|
@@ -418,93 +429,6 @@ class Wizard < ApplicationRecord
|
|
418
429
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
419
430
|
def self.recent(*args); end
|
420
431
|
|
421
|
-
sig { returns(Wizard::ActiveRecord_Relation) }
|
422
|
-
def self.all; end
|
423
|
-
|
424
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
425
|
-
def self.unscoped(&block); end
|
426
|
-
|
427
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
428
|
-
def self.select(*args); end
|
429
|
-
|
430
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
431
|
-
def self.order(*args); end
|
432
|
-
|
433
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
434
|
-
def self.reorder(*args); end
|
435
|
-
|
436
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
437
|
-
def self.group(*args); end
|
438
|
-
|
439
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
440
|
-
def self.limit(*args); end
|
441
|
-
|
442
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
443
|
-
def self.offset(*args); end
|
444
|
-
|
445
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
446
|
-
def self.joins(*args); end
|
447
|
-
|
448
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
449
|
-
def self.left_joins(*args); end
|
450
|
-
|
451
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
452
|
-
def self.left_outer_joins(*args); end
|
453
|
-
|
454
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
455
|
-
def self.where(*args); end
|
456
|
-
|
457
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
458
|
-
def self.rewhere(*args); end
|
459
|
-
|
460
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
461
|
-
def self.preload(*args); end
|
462
|
-
|
463
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
464
|
-
def self.eager_load(*args); end
|
465
|
-
|
466
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
467
|
-
def self.includes(*args); end
|
468
|
-
|
469
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
470
|
-
def self.from(*args); end
|
471
|
-
|
472
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
473
|
-
def self.lock(*args); end
|
474
|
-
|
475
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
476
|
-
def self.readonly(*args); end
|
477
|
-
|
478
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
479
|
-
def self.or(*args); end
|
480
|
-
|
481
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
482
|
-
def self.having(*args); end
|
483
|
-
|
484
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
485
|
-
def self.create_with(*args); end
|
486
|
-
|
487
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
488
|
-
def self.distinct(*args); end
|
489
|
-
|
490
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
491
|
-
def self.references(*args); end
|
492
|
-
|
493
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
494
|
-
def self.none(*args); end
|
495
|
-
|
496
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
497
|
-
def self.unscope(*args); end
|
498
|
-
|
499
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
500
|
-
def self.merge(*args); end
|
501
|
-
|
502
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
503
|
-
def self.except(*args); end
|
504
|
-
|
505
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
506
|
-
def self.extending(*args, &block); end
|
507
|
-
|
508
432
|
sig { returns(T.nilable(Wizard::Broom)) }
|
509
433
|
def typed_broom; end
|
510
434
|
|
@@ -545,8 +469,7 @@ end
|
|
545
469
|
class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
|
546
470
|
include Wizard::ActiveRelation_WhereNot
|
547
471
|
include Wizard::CustomFinderMethods
|
548
|
-
|
549
|
-
extend T::Generic
|
472
|
+
include Wizard::QueryMethodsReturningRelation
|
550
473
|
Elem = type_member(fixed: Wizard)
|
551
474
|
|
552
475
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
@@ -602,100 +525,72 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
|
|
602
525
|
|
603
526
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
604
527
|
def recent(*args); end
|
528
|
+
end
|
605
529
|
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
613
|
-
def select(*args); end
|
614
|
-
|
615
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
616
|
-
def order(*args); end
|
617
|
-
|
618
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
619
|
-
def reorder(*args); end
|
620
|
-
|
621
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
622
|
-
def group(*args); end
|
623
|
-
|
624
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
625
|
-
def limit(*args); end
|
626
|
-
|
627
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
628
|
-
def offset(*args); end
|
629
|
-
|
630
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
631
|
-
def joins(*args); end
|
632
|
-
|
633
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
634
|
-
def left_joins(*args); end
|
635
|
-
|
636
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
637
|
-
def left_outer_joins(*args); end
|
530
|
+
class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
531
|
+
include Wizard::ActiveRelation_WhereNot
|
532
|
+
include Wizard::CustomFinderMethods
|
533
|
+
include Wizard::QueryMethodsReturningAssociationRelation
|
534
|
+
Elem = type_member(fixed: Wizard)
|
638
535
|
|
639
|
-
sig { params(args: T.untyped).returns(Wizard::
|
640
|
-
def
|
536
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
537
|
+
def Gryffindor(*args); end
|
641
538
|
|
642
|
-
sig { params(args: T.untyped).returns(Wizard::
|
643
|
-
def
|
539
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
540
|
+
def Hagrid(*args); end
|
644
541
|
|
645
|
-
sig { params(args: T.untyped).returns(Wizard::
|
646
|
-
def
|
542
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
543
|
+
def Hufflepuff(*args); end
|
647
544
|
|
648
|
-
sig { params(args: T.untyped).returns(Wizard::
|
649
|
-
def
|
545
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
546
|
+
def Ravenclaw(*args); end
|
650
547
|
|
651
|
-
sig { params(args: T.untyped).returns(Wizard::
|
652
|
-
def
|
548
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
549
|
+
def Slytherin(*args); end
|
653
550
|
|
654
|
-
sig { params(args: T.untyped).returns(Wizard::
|
655
|
-
def
|
551
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
552
|
+
def black_hair(*args); end
|
656
553
|
|
657
|
-
sig { params(args: T.untyped).returns(Wizard::
|
658
|
-
def
|
554
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
555
|
+
def blonde_hair(*args); end
|
659
556
|
|
660
|
-
sig { params(args: T.untyped).returns(Wizard::
|
661
|
-
def
|
557
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
558
|
+
def broom_firebolt(*args); end
|
662
559
|
|
663
|
-
sig { params(args: T.untyped).returns(Wizard::
|
664
|
-
def
|
560
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
561
|
+
def broom_nimbus(*args); end
|
665
562
|
|
666
|
-
sig { params(args: T.untyped).returns(Wizard::
|
667
|
-
def
|
563
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
564
|
+
def brown_hair(*args); end
|
668
565
|
|
669
|
-
sig { params(args: T.untyped).returns(Wizard::
|
670
|
-
def
|
566
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
567
|
+
def color_blue_eyes(*args); end
|
671
568
|
|
672
|
-
sig { params(args: T.untyped).returns(Wizard::
|
673
|
-
def
|
569
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
570
|
+
def color_brown_eyes(*args); end
|
674
571
|
|
675
|
-
sig { params(args: T.untyped).returns(Wizard::
|
676
|
-
def
|
572
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
573
|
+
def color_green_eyes(*args); end
|
677
574
|
|
678
|
-
sig { params(args: T.untyped).returns(Wizard::
|
679
|
-
def
|
575
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
576
|
+
def quidditch_beater(*args); end
|
680
577
|
|
681
|
-
sig { params(args: T.untyped).returns(Wizard::
|
682
|
-
def
|
578
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
579
|
+
def quidditch_chaser(*args); end
|
683
580
|
|
684
|
-
sig { params(args: T.untyped).returns(Wizard::
|
685
|
-
def
|
581
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
582
|
+
def quidditch_keeper(*args); end
|
686
583
|
|
687
|
-
sig { params(args: T.untyped).returns(Wizard::
|
688
|
-
def
|
584
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
585
|
+
def quidditch_seeker(*args); end
|
689
586
|
|
690
|
-
sig { params(args: T.untyped
|
691
|
-
def
|
587
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
588
|
+
def recent(*args); end
|
692
589
|
end
|
693
590
|
|
694
|
-
class Wizard::
|
695
|
-
include Wizard::ActiveRelation_WhereNot
|
591
|
+
class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
696
592
|
include Wizard::CustomFinderMethods
|
697
|
-
|
698
|
-
extend T::Generic
|
593
|
+
include Wizard::QueryMethodsReturningAssociationRelation
|
699
594
|
Elem = type_member(fixed: Wizard)
|
700
595
|
|
701
596
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
@@ -752,158 +647,125 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
|
|
752
647
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
753
648
|
def recent(*args); end
|
754
649
|
|
755
|
-
sig {
|
650
|
+
sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
|
651
|
+
def <<(*records); end
|
652
|
+
|
653
|
+
sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
|
654
|
+
def append(*records); end
|
655
|
+
|
656
|
+
sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
|
657
|
+
def push(*records); end
|
658
|
+
|
659
|
+
sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
|
660
|
+
def concat(*records); end
|
661
|
+
end
|
662
|
+
|
663
|
+
module Wizard::QueryMethodsReturningRelation
|
664
|
+
sig { returns(Wizard::ActiveRecord_Relation) }
|
756
665
|
def all; end
|
757
666
|
|
758
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::
|
667
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
759
668
|
def unscoped(&block); end
|
760
669
|
|
761
|
-
sig { params(args: T.untyped).returns(Wizard::
|
670
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
762
671
|
def select(*args); end
|
763
672
|
|
764
|
-
sig { params(args: T.untyped).returns(Wizard::
|
673
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
765
674
|
def order(*args); end
|
766
675
|
|
767
|
-
sig { params(args: T.untyped).returns(Wizard::
|
676
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
768
677
|
def reorder(*args); end
|
769
678
|
|
770
|
-
sig { params(args: T.untyped).returns(Wizard::
|
679
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
771
680
|
def group(*args); end
|
772
681
|
|
773
|
-
sig { params(args: T.untyped).returns(Wizard::
|
682
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
774
683
|
def limit(*args); end
|
775
684
|
|
776
|
-
sig { params(args: T.untyped).returns(Wizard::
|
685
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
777
686
|
def offset(*args); end
|
778
687
|
|
779
|
-
sig { params(args: T.untyped).returns(Wizard::
|
688
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
780
689
|
def joins(*args); end
|
781
690
|
|
782
|
-
sig { params(args: T.untyped).returns(Wizard::
|
691
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
783
692
|
def left_joins(*args); end
|
784
693
|
|
785
|
-
sig { params(args: T.untyped).returns(Wizard::
|
694
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
786
695
|
def left_outer_joins(*args); end
|
787
696
|
|
788
|
-
sig { params(args: T.untyped).returns(Wizard::
|
697
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
789
698
|
def where(*args); end
|
790
699
|
|
791
|
-
sig { params(args: T.untyped).returns(Wizard::
|
700
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
792
701
|
def rewhere(*args); end
|
793
702
|
|
794
|
-
sig { params(args: T.untyped).returns(Wizard::
|
703
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
795
704
|
def preload(*args); end
|
796
705
|
|
797
|
-
sig { params(args: T.untyped).returns(Wizard::
|
706
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
798
707
|
def eager_load(*args); end
|
799
708
|
|
800
|
-
sig { params(args: T.untyped).returns(Wizard::
|
709
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
801
710
|
def includes(*args); end
|
802
711
|
|
803
|
-
sig { params(args: T.untyped).returns(Wizard::
|
712
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
804
713
|
def from(*args); end
|
805
714
|
|
806
|
-
sig { params(args: T.untyped).returns(Wizard::
|
715
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
807
716
|
def lock(*args); end
|
808
717
|
|
809
|
-
sig { params(args: T.untyped).returns(Wizard::
|
718
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
810
719
|
def readonly(*args); end
|
811
720
|
|
812
|
-
sig { params(args: T.untyped).returns(Wizard::
|
721
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
813
722
|
def or(*args); end
|
814
723
|
|
815
|
-
sig { params(args: T.untyped).returns(Wizard::
|
724
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
816
725
|
def having(*args); end
|
817
726
|
|
818
|
-
sig { params(args: T.untyped).returns(Wizard::
|
727
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
819
728
|
def create_with(*args); end
|
820
729
|
|
821
|
-
sig { params(args: T.untyped).returns(Wizard::
|
730
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
822
731
|
def distinct(*args); end
|
823
732
|
|
824
|
-
sig { params(args: T.untyped).returns(Wizard::
|
733
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
825
734
|
def references(*args); end
|
826
735
|
|
827
|
-
sig { params(args: T.untyped).returns(Wizard::
|
736
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
828
737
|
def none(*args); end
|
829
738
|
|
830
|
-
sig { params(args: T.untyped).returns(Wizard::
|
739
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
831
740
|
def unscope(*args); end
|
832
741
|
|
833
|
-
sig { params(args: T.untyped).returns(Wizard::
|
742
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
834
743
|
def merge(*args); end
|
835
744
|
|
836
|
-
sig { params(args: T.untyped).returns(Wizard::
|
745
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
837
746
|
def except(*args); end
|
838
747
|
|
839
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::
|
748
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
840
749
|
def extending(*args, &block); end
|
841
|
-
end
|
842
|
-
|
843
|
-
class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
844
|
-
include Wizard::CustomFinderMethods
|
845
|
-
extend T::Sig
|
846
|
-
extend T::Generic
|
847
|
-
Elem = type_member(fixed: Wizard)
|
848
|
-
|
849
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
850
|
-
def Gryffindor(*args); end
|
851
|
-
|
852
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
853
|
-
def Hagrid(*args); end
|
854
|
-
|
855
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
856
|
-
def Hufflepuff(*args); end
|
857
|
-
|
858
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
859
|
-
def Ravenclaw(*args); end
|
860
|
-
|
861
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
862
|
-
def Slytherin(*args); end
|
863
|
-
|
864
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
865
|
-
def black_hair(*args); end
|
866
|
-
|
867
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
868
|
-
def blonde_hair(*args); end
|
869
|
-
|
870
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
871
|
-
def broom_firebolt(*args); end
|
872
|
-
|
873
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
874
|
-
def broom_nimbus(*args); end
|
875
|
-
|
876
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
877
|
-
def brown_hair(*args); end
|
878
|
-
|
879
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
880
|
-
def color_blue_eyes(*args); end
|
881
|
-
|
882
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
883
|
-
def color_brown_eyes(*args); end
|
884
|
-
|
885
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
886
|
-
def color_green_eyes(*args); end
|
887
|
-
|
888
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
889
|
-
def quidditch_beater(*args); end
|
890
|
-
|
891
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
892
|
-
def quidditch_chaser(*args); end
|
893
|
-
|
894
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
895
|
-
def quidditch_keeper(*args); end
|
896
750
|
|
897
|
-
sig
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
751
|
+
sig do
|
752
|
+
params(
|
753
|
+
of: T.nilable(Integer),
|
754
|
+
start: T.nilable(Integer),
|
755
|
+
finish: T.nilable(Integer),
|
756
|
+
load: T.nilable(T::Boolean),
|
757
|
+
error_on_ignore: T.nilable(T::Boolean),
|
758
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_Relation).void)
|
759
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
760
|
+
end
|
761
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
762
|
+
end
|
902
763
|
|
764
|
+
module Wizard::QueryMethodsReturningAssociationRelation
|
903
765
|
sig { returns(Wizard::ActiveRecord_AssociationRelation) }
|
904
766
|
def all; end
|
905
767
|
|
906
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::
|
768
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
907
769
|
def unscoped(&block); end
|
908
770
|
|
909
771
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
@@ -987,15 +849,15 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
|
|
987
849
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
|
988
850
|
def extending(*args, &block); end
|
989
851
|
|
990
|
-
sig
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
def
|
852
|
+
sig do
|
853
|
+
params(
|
854
|
+
of: T.nilable(Integer),
|
855
|
+
start: T.nilable(Integer),
|
856
|
+
finish: T.nilable(Integer),
|
857
|
+
load: T.nilable(T::Boolean),
|
858
|
+
error_on_ignore: T.nilable(T::Boolean),
|
859
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_AssociationRelation).void)
|
860
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
861
|
+
end
|
862
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
1001
863
|
end
|