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,102 +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.except(*args); end
|
153
|
-
|
154
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
155
|
-
def self.extending(*args, &block); end
|
156
85
|
end
|
157
86
|
|
158
|
-
|
159
|
-
include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
|
160
|
-
include Wizard::HABTM_Subjects::CustomFinderMethods
|
161
|
-
extend T::Sig
|
162
|
-
extend T::Generic
|
163
|
-
Elem = type_member(fixed: Wizard::HABTM_Subjects)
|
164
|
-
|
87
|
+
module Wizard::HABTM_Subjects::QueryMethodsReturningRelation
|
165
88
|
sig { returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
166
89
|
def all; end
|
167
90
|
|
@@ -245,19 +168,25 @@ class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
|
|
245
168
|
|
246
169
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
247
170
|
def extending(*args, &block); end
|
248
|
-
end
|
249
171
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
172
|
+
sig do
|
173
|
+
params(
|
174
|
+
of: T.nilable(Integer),
|
175
|
+
start: T.nilable(Integer),
|
176
|
+
finish: T.nilable(Integer),
|
177
|
+
load: T.nilable(T::Boolean),
|
178
|
+
error_on_ignore: T.nilable(T::Boolean),
|
179
|
+
block: T.nilable(T.proc.params(e: Wizard::HABTM_Subjects::ActiveRecord_Relation).void)
|
180
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
181
|
+
end
|
182
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
183
|
+
end
|
256
184
|
|
185
|
+
module Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
|
257
186
|
sig { returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
258
187
|
def all; end
|
259
188
|
|
260
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::
|
189
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
261
190
|
def unscoped(&block); end
|
262
191
|
|
263
192
|
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
@@ -337,97 +266,38 @@ class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::A
|
|
337
266
|
|
338
267
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
339
268
|
def extending(*args, &block); end
|
269
|
+
|
270
|
+
sig do
|
271
|
+
params(
|
272
|
+
of: T.nilable(Integer),
|
273
|
+
start: T.nilable(Integer),
|
274
|
+
finish: T.nilable(Integer),
|
275
|
+
load: T.nilable(T::Boolean),
|
276
|
+
error_on_ignore: T.nilable(T::Boolean),
|
277
|
+
block: T.nilable(T.proc.params(e: Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation).void)
|
278
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
279
|
+
end
|
280
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
340
281
|
end
|
341
282
|
|
342
|
-
class Wizard::HABTM_Subjects::
|
283
|
+
class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
|
284
|
+
include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
|
343
285
|
include Wizard::HABTM_Subjects::CustomFinderMethods
|
344
|
-
|
345
|
-
extend T::Generic
|
286
|
+
include Wizard::HABTM_Subjects::QueryMethodsReturningRelation
|
346
287
|
Elem = type_member(fixed: Wizard::HABTM_Subjects)
|
288
|
+
end
|
347
289
|
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
355
|
-
def select(*args); end
|
356
|
-
|
357
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
358
|
-
def order(*args); end
|
359
|
-
|
360
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
361
|
-
def reorder(*args); end
|
362
|
-
|
363
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
364
|
-
def group(*args); end
|
365
|
-
|
366
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
367
|
-
def limit(*args); end
|
368
|
-
|
369
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
370
|
-
def offset(*args); end
|
371
|
-
|
372
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
373
|
-
def joins(*args); end
|
374
|
-
|
375
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
376
|
-
def left_joins(*args); end
|
377
|
-
|
378
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
379
|
-
def left_outer_joins(*args); end
|
380
|
-
|
381
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
382
|
-
def where(*args); end
|
383
|
-
|
384
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
385
|
-
def rewhere(*args); end
|
386
|
-
|
387
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
388
|
-
def preload(*args); end
|
389
|
-
|
390
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
391
|
-
def eager_load(*args); end
|
392
|
-
|
393
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
394
|
-
def includes(*args); end
|
395
|
-
|
396
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
397
|
-
def from(*args); end
|
398
|
-
|
399
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
400
|
-
def lock(*args); end
|
401
|
-
|
402
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
403
|
-
def readonly(*args); end
|
404
|
-
|
405
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
406
|
-
def or(*args); end
|
407
|
-
|
408
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
409
|
-
def having(*args); end
|
410
|
-
|
411
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
412
|
-
def create_with(*args); end
|
413
|
-
|
414
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
415
|
-
def distinct(*args); end
|
416
|
-
|
417
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
418
|
-
def references(*args); end
|
419
|
-
|
420
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
421
|
-
def none(*args); end
|
422
|
-
|
423
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
424
|
-
def unscope(*args); end
|
425
|
-
|
426
|
-
sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
427
|
-
def except(*args); end
|
290
|
+
class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
291
|
+
include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
|
292
|
+
include Wizard::HABTM_Subjects::CustomFinderMethods
|
293
|
+
include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
|
294
|
+
Elem = type_member(fixed: Wizard::HABTM_Subjects)
|
295
|
+
end
|
428
296
|
|
429
|
-
|
430
|
-
|
297
|
+
class Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
298
|
+
include Wizard::HABTM_Subjects::CustomFinderMethods
|
299
|
+
include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
|
300
|
+
Elem = type_member(fixed: Wizard::HABTM_Subjects)
|
431
301
|
|
432
302
|
sig { params(records: T.any(Wizard::HABTM_Subjects, T::Array[Wizard::HABTM_Subjects])).returns(T.self_type) }
|
433
303
|
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,90 +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.except(*args); end
|
501
|
-
|
502
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
503
|
-
def self.extending(*args, &block); end
|
504
|
-
|
505
432
|
sig { returns(T.nilable(Wizard::Broom)) }
|
506
433
|
def typed_broom; end
|
507
434
|
|
@@ -542,8 +469,7 @@ end
|
|
542
469
|
class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
|
543
470
|
include Wizard::ActiveRelation_WhereNot
|
544
471
|
include Wizard::CustomFinderMethods
|
545
|
-
|
546
|
-
extend T::Generic
|
472
|
+
include Wizard::QueryMethodsReturningRelation
|
547
473
|
Elem = type_member(fixed: Wizard)
|
548
474
|
|
549
475
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
@@ -599,97 +525,72 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
|
|
599
525
|
|
600
526
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
601
527
|
def recent(*args); end
|
528
|
+
end
|
602
529
|
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
610
|
-
def select(*args); end
|
611
|
-
|
612
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
613
|
-
def order(*args); end
|
614
|
-
|
615
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
616
|
-
def reorder(*args); end
|
617
|
-
|
618
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
619
|
-
def group(*args); end
|
620
|
-
|
621
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
622
|
-
def limit(*args); end
|
623
|
-
|
624
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
625
|
-
def offset(*args); end
|
626
|
-
|
627
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
628
|
-
def joins(*args); end
|
629
|
-
|
630
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
631
|
-
def left_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)
|
632
535
|
|
633
|
-
sig { params(args: T.untyped).returns(Wizard::
|
634
|
-
def
|
536
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
537
|
+
def Gryffindor(*args); end
|
635
538
|
|
636
|
-
sig { params(args: T.untyped).returns(Wizard::
|
637
|
-
def
|
539
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
540
|
+
def Hagrid(*args); end
|
638
541
|
|
639
|
-
sig { params(args: T.untyped).returns(Wizard::
|
640
|
-
def
|
542
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
543
|
+
def Hufflepuff(*args); end
|
641
544
|
|
642
|
-
sig { params(args: T.untyped).returns(Wizard::
|
643
|
-
def
|
545
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
546
|
+
def Ravenclaw(*args); end
|
644
547
|
|
645
|
-
sig { params(args: T.untyped).returns(Wizard::
|
646
|
-
def
|
548
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
549
|
+
def Slytherin(*args); end
|
647
550
|
|
648
|
-
sig { params(args: T.untyped).returns(Wizard::
|
649
|
-
def
|
551
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
552
|
+
def black_hair(*args); end
|
650
553
|
|
651
|
-
sig { params(args: T.untyped).returns(Wizard::
|
652
|
-
def
|
554
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
555
|
+
def blonde_hair(*args); end
|
653
556
|
|
654
|
-
sig { params(args: T.untyped).returns(Wizard::
|
655
|
-
def
|
557
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
558
|
+
def broom_firebolt(*args); end
|
656
559
|
|
657
|
-
sig { params(args: T.untyped).returns(Wizard::
|
658
|
-
def
|
560
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
561
|
+
def broom_nimbus(*args); end
|
659
562
|
|
660
|
-
sig { params(args: T.untyped).returns(Wizard::
|
661
|
-
def
|
563
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
564
|
+
def brown_hair(*args); end
|
662
565
|
|
663
|
-
sig { params(args: T.untyped).returns(Wizard::
|
664
|
-
def
|
566
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
567
|
+
def color_blue_eyes(*args); end
|
665
568
|
|
666
|
-
sig { params(args: T.untyped).returns(Wizard::
|
667
|
-
def
|
569
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
570
|
+
def color_brown_eyes(*args); end
|
668
571
|
|
669
|
-
sig { params(args: T.untyped).returns(Wizard::
|
670
|
-
def
|
572
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
573
|
+
def color_green_eyes(*args); end
|
671
574
|
|
672
|
-
sig { params(args: T.untyped).returns(Wizard::
|
673
|
-
def
|
575
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
576
|
+
def quidditch_beater(*args); end
|
674
577
|
|
675
|
-
sig { params(args: T.untyped).returns(Wizard::
|
676
|
-
def
|
578
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
579
|
+
def quidditch_chaser(*args); end
|
677
580
|
|
678
|
-
sig { params(args: T.untyped).returns(Wizard::
|
679
|
-
def
|
581
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
582
|
+
def quidditch_keeper(*args); end
|
680
583
|
|
681
|
-
sig { params(args: T.untyped).returns(Wizard::
|
682
|
-
def
|
584
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
585
|
+
def quidditch_seeker(*args); end
|
683
586
|
|
684
|
-
sig { params(args: T.untyped
|
685
|
-
def
|
587
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
588
|
+
def recent(*args); end
|
686
589
|
end
|
687
590
|
|
688
|
-
class Wizard::
|
689
|
-
include Wizard::ActiveRelation_WhereNot
|
591
|
+
class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
690
592
|
include Wizard::CustomFinderMethods
|
691
|
-
|
692
|
-
extend T::Generic
|
593
|
+
include Wizard::QueryMethodsReturningAssociationRelation
|
693
594
|
Elem = type_member(fixed: Wizard)
|
694
595
|
|
695
596
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
@@ -746,155 +647,122 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
|
|
746
647
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
747
648
|
def recent(*args); end
|
748
649
|
|
749
|
-
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) }
|
750
665
|
def all; end
|
751
666
|
|
752
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::
|
667
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
753
668
|
def unscoped(&block); end
|
754
669
|
|
755
|
-
sig { params(args: T.untyped).returns(Wizard::
|
670
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
756
671
|
def select(*args); end
|
757
672
|
|
758
|
-
sig { params(args: T.untyped).returns(Wizard::
|
673
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
759
674
|
def order(*args); end
|
760
675
|
|
761
|
-
sig { params(args: T.untyped).returns(Wizard::
|
676
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
762
677
|
def reorder(*args); end
|
763
678
|
|
764
|
-
sig { params(args: T.untyped).returns(Wizard::
|
679
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
765
680
|
def group(*args); end
|
766
681
|
|
767
|
-
sig { params(args: T.untyped).returns(Wizard::
|
682
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
768
683
|
def limit(*args); end
|
769
684
|
|
770
|
-
sig { params(args: T.untyped).returns(Wizard::
|
685
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
771
686
|
def offset(*args); end
|
772
687
|
|
773
|
-
sig { params(args: T.untyped).returns(Wizard::
|
688
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
774
689
|
def joins(*args); end
|
775
690
|
|
776
|
-
sig { params(args: T.untyped).returns(Wizard::
|
691
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
777
692
|
def left_joins(*args); end
|
778
693
|
|
779
|
-
sig { params(args: T.untyped).returns(Wizard::
|
694
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
780
695
|
def left_outer_joins(*args); end
|
781
696
|
|
782
|
-
sig { params(args: T.untyped).returns(Wizard::
|
697
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
783
698
|
def where(*args); end
|
784
699
|
|
785
|
-
sig { params(args: T.untyped).returns(Wizard::
|
700
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
786
701
|
def rewhere(*args); end
|
787
702
|
|
788
|
-
sig { params(args: T.untyped).returns(Wizard::
|
703
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
789
704
|
def preload(*args); end
|
790
705
|
|
791
|
-
sig { params(args: T.untyped).returns(Wizard::
|
706
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
792
707
|
def eager_load(*args); end
|
793
708
|
|
794
|
-
sig { params(args: T.untyped).returns(Wizard::
|
709
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
795
710
|
def includes(*args); end
|
796
711
|
|
797
|
-
sig { params(args: T.untyped).returns(Wizard::
|
712
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
798
713
|
def from(*args); end
|
799
714
|
|
800
|
-
sig { params(args: T.untyped).returns(Wizard::
|
715
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
801
716
|
def lock(*args); end
|
802
717
|
|
803
|
-
sig { params(args: T.untyped).returns(Wizard::
|
718
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
804
719
|
def readonly(*args); end
|
805
720
|
|
806
|
-
sig { params(args: T.untyped).returns(Wizard::
|
721
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
807
722
|
def or(*args); end
|
808
723
|
|
809
|
-
sig { params(args: T.untyped).returns(Wizard::
|
724
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
810
725
|
def having(*args); end
|
811
726
|
|
812
|
-
sig { params(args: T.untyped).returns(Wizard::
|
727
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
813
728
|
def create_with(*args); end
|
814
729
|
|
815
|
-
sig { params(args: T.untyped).returns(Wizard::
|
730
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
816
731
|
def distinct(*args); end
|
817
732
|
|
818
|
-
sig { params(args: T.untyped).returns(Wizard::
|
733
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
819
734
|
def references(*args); end
|
820
735
|
|
821
|
-
sig { params(args: T.untyped).returns(Wizard::
|
736
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
822
737
|
def none(*args); end
|
823
738
|
|
824
|
-
sig { params(args: T.untyped).returns(Wizard::
|
739
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
825
740
|
def unscope(*args); end
|
826
741
|
|
827
|
-
sig { params(args: T.untyped).returns(Wizard::
|
742
|
+
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
|
828
743
|
def except(*args); end
|
829
744
|
|
830
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::
|
745
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
831
746
|
def extending(*args, &block); end
|
832
|
-
end
|
833
|
-
|
834
|
-
class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
835
|
-
include Wizard::CustomFinderMethods
|
836
|
-
extend T::Sig
|
837
|
-
extend T::Generic
|
838
|
-
Elem = type_member(fixed: Wizard)
|
839
|
-
|
840
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
841
|
-
def Gryffindor(*args); end
|
842
|
-
|
843
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
844
|
-
def Hagrid(*args); end
|
845
|
-
|
846
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
847
|
-
def Hufflepuff(*args); end
|
848
|
-
|
849
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
850
|
-
def Ravenclaw(*args); end
|
851
|
-
|
852
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
853
|
-
def Slytherin(*args); end
|
854
|
-
|
855
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
856
|
-
def black_hair(*args); end
|
857
|
-
|
858
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
859
|
-
def blonde_hair(*args); end
|
860
|
-
|
861
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
862
|
-
def broom_firebolt(*args); end
|
863
|
-
|
864
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
865
|
-
def broom_nimbus(*args); end
|
866
|
-
|
867
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
868
|
-
def brown_hair(*args); end
|
869
|
-
|
870
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
871
|
-
def color_blue_eyes(*args); end
|
872
|
-
|
873
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
874
|
-
def color_brown_eyes(*args); end
|
875
|
-
|
876
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
877
|
-
def color_green_eyes(*args); end
|
878
747
|
|
879
|
-
sig
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
def
|
890
|
-
|
891
|
-
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
892
|
-
def recent(*args); end
|
748
|
+
sig do
|
749
|
+
params(
|
750
|
+
of: T.nilable(Integer),
|
751
|
+
start: T.nilable(Integer),
|
752
|
+
finish: T.nilable(Integer),
|
753
|
+
load: T.nilable(T::Boolean),
|
754
|
+
error_on_ignore: T.nilable(T::Boolean),
|
755
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_Relation).void)
|
756
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
757
|
+
end
|
758
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
759
|
+
end
|
893
760
|
|
761
|
+
module Wizard::QueryMethodsReturningAssociationRelation
|
894
762
|
sig { returns(Wizard::ActiveRecord_AssociationRelation) }
|
895
763
|
def all; end
|
896
764
|
|
897
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::
|
765
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
898
766
|
def unscoped(&block); end
|
899
767
|
|
900
768
|
sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
|
@@ -975,15 +843,15 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
|
|
975
843
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
|
976
844
|
def extending(*args, &block); end
|
977
845
|
|
978
|
-
sig
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
def
|
846
|
+
sig do
|
847
|
+
params(
|
848
|
+
of: T.nilable(Integer),
|
849
|
+
start: T.nilable(Integer),
|
850
|
+
finish: T.nilable(Integer),
|
851
|
+
load: T.nilable(T::Boolean),
|
852
|
+
error_on_ignore: T.nilable(T::Boolean),
|
853
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_AssociationRelation).void)
|
854
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
855
|
+
end
|
856
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
989
857
|
end
|