sorbet-rails 0.5.9.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +4 -0
- data/.travis.yml +3 -3
- data/README.md +129 -52
- data/lib/bundled_rbi/active_record_base.rbi +83 -0
- data/lib/bundled_rbi/active_record_relation.rbi +43 -0
- data/lib/bundled_rbi/pluck_to_tstruct.rbi +0 -1
- data/lib/bundled_rbi/typed_params.rbi +9 -0
- data/lib/sorbet-rails.rb +1 -0
- data/lib/sorbet-rails/config.rb +0 -1
- data/lib/sorbet-rails/gem_plugins/elastic_search_plugin.rb +1 -1
- data/lib/sorbet-rails/gem_plugins/friendly_id_plugin.rb +1 -1
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +3 -3
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +85 -17
- data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -2
- data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +49 -12
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +1 -1
- data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
- data/lib/sorbet-rails/model_plugins/plugins.rb +0 -3
- data/lib/sorbet-rails/rails_mixins/active_record_overrides.rb +156 -5
- data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +16 -0
- data/lib/sorbet-rails/railtie.rb +2 -1
- data/lib/sorbet-rails/tasks/rails_rbi.rake +2 -0
- data/lib/sorbet-rails/type_assert/actionpack.rbi +4 -0
- data/lib/sorbet-rails/type_assert/type_assert.rb +1 -1
- data/lib/sorbet-rails/typed_params.rb +22 -0
- data/lib/sorbet-rails/utils.rb +5 -0
- data/sorbet-rails.gemspec +5 -3
- data/spec/generators/rails-template.rb +7 -3
- data/spec/generators/sorbet_test_cases.rb +46 -1
- data/spec/sorbet_spec.rb +3 -1
- data/spec/support/v5.0/Gemfile.lock +36 -23
- data/spec/support/v5.0/app/models/wizard.rb +6 -3
- data/spec/support/v5.0/db/migrate/20190620000001_create_wizards.rb +1 -0
- data/spec/support/v5.0/db/schema.rb +1 -0
- data/spec/support/v5.0/sorbet_test_cases.rb +46 -1
- data/spec/support/v5.1/Gemfile.lock +37 -24
- data/spec/support/v5.1/app/models/wizard.rb +6 -3
- data/spec/support/v5.1/db/migrate/20190620000001_create_wizards.rb +1 -0
- data/spec/support/v5.1/db/schema.rb +1 -0
- data/spec/support/v5.1/sorbet_test_cases.rb +46 -1
- data/spec/support/v5.2/Gemfile.lock +75 -62
- data/spec/support/v5.2/app/models/wizard.rb +6 -3
- data/spec/support/v5.2/db/migrate/20190620000001_create_wizards.rb +1 -0
- data/spec/support/v5.2/db/schema.rb +1 -0
- data/spec/support/v5.2/sorbet_test_cases.rb +46 -1
- data/spec/support/v6.0/Gemfile.lock +89 -76
- data/spec/support/v6.0/app/models/wizard.rb +6 -3
- data/spec/support/v6.0/db/migrate/20190620000001_create_wizards.rb +1 -0
- data/spec/support/v6.0/db/schema.rb +1 -0
- data/spec/support/v6.0/sorbet_test_cases.rb +46 -1
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +33 -54
- data/spec/test_data/v5.0/expected_potion.rbi +33 -54
- data/spec/test_data/v5.0/expected_robe.rbi +33 -54
- data/spec/test_data/v5.0/expected_schema_migration.rbi +33 -54
- data/spec/test_data/v5.0/expected_school.rbi +33 -54
- data/spec/test_data/v5.0/expected_spell_book.rbi +46 -52
- data/spec/test_data/v5.0/expected_squib.rbi +42 -54
- data/spec/test_data/v5.0/expected_wand.rbi +47 -52
- data/spec/test_data/v5.0/expected_wizard.rbi +119 -56
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +119 -56
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +33 -54
- data/spec/test_data/v5.1/expected_potion.rbi +33 -54
- data/spec/test_data/v5.1/expected_robe.rbi +33 -54
- data/spec/test_data/v5.1/expected_schema_migration.rbi +33 -54
- data/spec/test_data/v5.1/expected_school.rbi +33 -54
- data/spec/test_data/v5.1/expected_spell_book.rbi +46 -52
- data/spec/test_data/v5.1/expected_squib.rbi +42 -54
- data/spec/test_data/v5.1/expected_wand.rbi +47 -52
- data/spec/test_data/v5.1/expected_wizard.rbi +119 -56
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +119 -56
- data/spec/test_data/v5.2/expected_attachment.rbi +33 -54
- data/spec/test_data/v5.2/expected_blob.rbi +33 -54
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +33 -54
- data/spec/test_data/v5.2/expected_potion.rbi +33 -54
- data/spec/test_data/v5.2/expected_robe.rbi +33 -54
- data/spec/test_data/v5.2/expected_schema_migration.rbi +33 -54
- data/spec/test_data/v5.2/expected_school.rbi +33 -54
- data/spec/test_data/v5.2/expected_spell_book.rbi +46 -52
- data/spec/test_data/v5.2/expected_squib.rbi +42 -54
- data/spec/test_data/v5.2/expected_wand.rbi +47 -52
- data/spec/test_data/v5.2/expected_wizard.rbi +119 -56
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +119 -56
- data/spec/test_data/v6.0/expected_attachment.rbi +33 -54
- data/spec/test_data/v6.0/expected_blob.rbi +33 -54
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +33 -54
- data/spec/test_data/v6.0/expected_potion.rbi +33 -54
- data/spec/test_data/v6.0/expected_robe.rbi +33 -54
- data/spec/test_data/v6.0/expected_schema_migration.rbi +33 -54
- data/spec/test_data/v6.0/expected_school.rbi +33 -54
- data/spec/test_data/v6.0/expected_spell_book.rbi +46 -52
- data/spec/test_data/v6.0/expected_squib.rbi +42 -54
- data/spec/test_data/v6.0/expected_wand.rbi +47 -52
- data/spec/test_data/v6.0/expected_wizard.rbi +119 -56
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +119 -56
- data/spec/typed_enum_spec.rb +55 -0
- data/spec/typed_params_spec.rb +91 -0
- metadata +41 -4
- data/lib/sorbet-rails/model_plugins/active_record_factory_methods.rb +0 -28
@@ -136,51 +136,6 @@ class School < ApplicationRecord
|
|
136
136
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
137
137
|
def self.extending(*args, &block); end
|
138
138
|
|
139
|
-
sig { params(args: T.untyped).returns(School) }
|
140
|
-
def self.find(*args); end
|
141
|
-
|
142
|
-
sig { params(args: T.untyped).returns(T.nilable(School)) }
|
143
|
-
def self.find_by(*args); end
|
144
|
-
|
145
|
-
sig { params(args: T.untyped).returns(School) }
|
146
|
-
def self.find_by!(*args); end
|
147
|
-
|
148
|
-
sig { returns(T.nilable(School)) }
|
149
|
-
def self.first; end
|
150
|
-
|
151
|
-
sig { returns(School) }
|
152
|
-
def self.first!; end
|
153
|
-
|
154
|
-
sig { returns(T.nilable(School)) }
|
155
|
-
def self.second; end
|
156
|
-
|
157
|
-
sig { returns(School) }
|
158
|
-
def self.second!; end
|
159
|
-
|
160
|
-
sig { returns(T.nilable(School)) }
|
161
|
-
def self.third; end
|
162
|
-
|
163
|
-
sig { returns(School) }
|
164
|
-
def self.third!; end
|
165
|
-
|
166
|
-
sig { returns(T.nilable(School)) }
|
167
|
-
def self.third_to_last; end
|
168
|
-
|
169
|
-
sig { returns(School) }
|
170
|
-
def self.third_to_last!; end
|
171
|
-
|
172
|
-
sig { returns(T.nilable(School)) }
|
173
|
-
def self.second_to_last; end
|
174
|
-
|
175
|
-
sig { returns(School) }
|
176
|
-
def self.second_to_last!; end
|
177
|
-
|
178
|
-
sig { returns(T.nilable(School)) }
|
179
|
-
def self.last; end
|
180
|
-
|
181
|
-
sig { returns(School) }
|
182
|
-
def self.last!; end
|
183
|
-
|
184
139
|
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
185
140
|
def self.exists?(conditions = nil); end
|
186
141
|
|
@@ -195,15 +150,6 @@ class School < ApplicationRecord
|
|
195
150
|
|
196
151
|
sig { params(args: T.untyped).returns(T::Boolean) }
|
197
152
|
def self.one?(*args); end
|
198
|
-
|
199
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(School) }
|
200
|
-
def self.create(attributes = nil, &block); end
|
201
|
-
|
202
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(School) }
|
203
|
-
def self.create!(attributes = nil, &block); end
|
204
|
-
|
205
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(School) }
|
206
|
-
def self.new(attributes = nil, &block); end
|
207
153
|
end
|
208
154
|
|
209
155
|
class School::ActiveRecord_Relation < ActiveRecord::Relation
|
@@ -297,6 +243,21 @@ class School::ActiveRecord_Relation < ActiveRecord::Relation
|
|
297
243
|
|
298
244
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
|
299
245
|
def extending(*args, &block); end
|
246
|
+
|
247
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
248
|
+
def exists?(conditions = nil); end
|
249
|
+
|
250
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
251
|
+
def any?(*args); end
|
252
|
+
|
253
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
254
|
+
def many?(*args); end
|
255
|
+
|
256
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
257
|
+
def none?(*args); end
|
258
|
+
|
259
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
260
|
+
def one?(*args); end
|
300
261
|
end
|
301
262
|
|
302
263
|
class School::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
@@ -400,6 +361,15 @@ class School::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
|
|
400
361
|
sig { params(args: T.untyped).returns(School) }
|
401
362
|
def find_by!(*args); end
|
402
363
|
|
364
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
365
|
+
def find_or_initialize_by(attributes, &block); end
|
366
|
+
|
367
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
368
|
+
def find_or_create_by(attributes, &block); end
|
369
|
+
|
370
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
371
|
+
def find_or_create_by!(attributes, &block); end
|
372
|
+
|
403
373
|
sig { returns(T.nilable(School)) }
|
404
374
|
def first; end
|
405
375
|
|
@@ -569,6 +539,15 @@ class School::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
|
|
569
539
|
sig { params(args: T.untyped).returns(School) }
|
570
540
|
def find_by!(*args); end
|
571
541
|
|
542
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
543
|
+
def find_or_initialize_by(attributes, &block); end
|
544
|
+
|
545
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
546
|
+
def find_or_create_by(attributes, &block); end
|
547
|
+
|
548
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: School).void)).returns(School) }
|
549
|
+
def find_or_create_by!(attributes, &block); end
|
550
|
+
|
572
551
|
sig { returns(T.nilable(School)) }
|
573
552
|
def first; end
|
574
553
|
|
@@ -69,6 +69,15 @@ module SpellBook::GeneratedAttributeMethods
|
|
69
69
|
def wizard_id?; end
|
70
70
|
end
|
71
71
|
|
72
|
+
class SpellBook::BookType < T::Enum
|
73
|
+
enums do
|
74
|
+
Unclassified = new('unclassified')
|
75
|
+
Biology = new('biology')
|
76
|
+
DarkArt = new('dark_art')
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
72
81
|
module SpellBook::GeneratedAssociationMethods
|
73
82
|
extend T::Sig
|
74
83
|
|
@@ -200,50 +209,11 @@ class SpellBook < ApplicationRecord
|
|
200
209
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
|
201
210
|
def self.extending(*args, &block); end
|
202
211
|
|
203
|
-
sig {
|
204
|
-
def
|
205
|
-
|
206
|
-
sig { params(args: T.untyped).returns(T.nilable(SpellBook)) }
|
207
|
-
def self.find_by(*args); end
|
208
|
-
|
209
|
-
sig { params(args: T.untyped).returns(SpellBook) }
|
210
|
-
def self.find_by!(*args); end
|
211
|
-
|
212
|
-
sig { returns(T.nilable(SpellBook)) }
|
213
|
-
def self.first; end
|
214
|
-
|
215
|
-
sig { returns(SpellBook) }
|
216
|
-
def self.first!; end
|
217
|
-
|
218
|
-
sig { returns(T.nilable(SpellBook)) }
|
219
|
-
def self.second; end
|
220
|
-
|
221
|
-
sig { returns(SpellBook) }
|
222
|
-
def self.second!; end
|
223
|
-
|
224
|
-
sig { returns(T.nilable(SpellBook)) }
|
225
|
-
def self.third; end
|
226
|
-
|
227
|
-
sig { returns(SpellBook) }
|
228
|
-
def self.third!; end
|
229
|
-
|
230
|
-
sig { returns(T.nilable(SpellBook)) }
|
231
|
-
def self.third_to_last; end
|
232
|
-
|
233
|
-
sig { returns(SpellBook) }
|
234
|
-
def self.third_to_last!; end
|
235
|
-
|
236
|
-
sig { returns(T.nilable(SpellBook)) }
|
237
|
-
def self.second_to_last; end
|
238
|
-
|
239
|
-
sig { returns(SpellBook) }
|
240
|
-
def self.second_to_last!; end
|
241
|
-
|
242
|
-
sig { returns(T.nilable(SpellBook)) }
|
243
|
-
def self.last; end
|
212
|
+
sig { returns(SpellBook::BookType) }
|
213
|
+
def typed_book_type; end
|
244
214
|
|
245
|
-
sig {
|
246
|
-
def
|
215
|
+
sig { params(value: SpellBook::BookType).void }
|
216
|
+
def typed_book_type=(value); end
|
247
217
|
|
248
218
|
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
249
219
|
def self.exists?(conditions = nil); end
|
@@ -259,15 +229,6 @@ class SpellBook < ApplicationRecord
|
|
259
229
|
|
260
230
|
sig { params(args: T.untyped).returns(T::Boolean) }
|
261
231
|
def self.one?(*args); end
|
262
|
-
|
263
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(SpellBook) }
|
264
|
-
def self.create(attributes = nil, &block); end
|
265
|
-
|
266
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(SpellBook) }
|
267
|
-
def self.create!(attributes = nil, &block); end
|
268
|
-
|
269
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(SpellBook) }
|
270
|
-
def self.new(attributes = nil, &block); end
|
271
232
|
end
|
272
233
|
|
273
234
|
class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
|
@@ -370,6 +331,21 @@ class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
|
|
370
331
|
|
371
332
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
|
372
333
|
def extending(*args, &block); end
|
334
|
+
|
335
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
336
|
+
def exists?(conditions = nil); end
|
337
|
+
|
338
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
339
|
+
def any?(*args); end
|
340
|
+
|
341
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
342
|
+
def many?(*args); end
|
343
|
+
|
344
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
345
|
+
def none?(*args); end
|
346
|
+
|
347
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
348
|
+
def one?(*args); end
|
373
349
|
end
|
374
350
|
|
375
351
|
class SpellBook::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
@@ -482,6 +458,15 @@ class SpellBook::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRel
|
|
482
458
|
sig { params(args: T.untyped).returns(SpellBook) }
|
483
459
|
def find_by!(*args); end
|
484
460
|
|
461
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: SpellBook).void)).returns(SpellBook) }
|
462
|
+
def find_or_initialize_by(attributes, &block); end
|
463
|
+
|
464
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: SpellBook).void)).returns(SpellBook) }
|
465
|
+
def find_or_create_by(attributes, &block); end
|
466
|
+
|
467
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: SpellBook).void)).returns(SpellBook) }
|
468
|
+
def find_or_create_by!(attributes, &block); end
|
469
|
+
|
485
470
|
sig { returns(T.nilable(SpellBook)) }
|
486
471
|
def first; end
|
487
472
|
|
@@ -660,6 +645,15 @@ class SpellBook::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Assoc
|
|
660
645
|
sig { params(args: T.untyped).returns(SpellBook) }
|
661
646
|
def find_by!(*args); end
|
662
647
|
|
648
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: SpellBook).void)).returns(SpellBook) }
|
649
|
+
def find_or_initialize_by(attributes, &block); end
|
650
|
+
|
651
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: SpellBook).void)).returns(SpellBook) }
|
652
|
+
def find_or_create_by(attributes, &block); end
|
653
|
+
|
654
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: SpellBook).void)).returns(SpellBook) }
|
655
|
+
def find_or_create_by!(attributes, &block); end
|
656
|
+
|
663
657
|
sig { returns(T.nilable(SpellBook)) }
|
664
658
|
def first; end
|
665
659
|
|
@@ -206,6 +206,15 @@ module Squib::GeneratedAttributeMethods
|
|
206
206
|
sig { returns(T::Boolean) }
|
207
207
|
def parent_email?; end
|
208
208
|
|
209
|
+
sig { returns(T.nilable(String)) }
|
210
|
+
def professor; end
|
211
|
+
|
212
|
+
sig { params(value: T.nilable(T.any(Integer, String, Symbol))).void }
|
213
|
+
def professor=(value); end
|
214
|
+
|
215
|
+
sig { returns(T::Boolean) }
|
216
|
+
def professor?; end
|
217
|
+
|
209
218
|
sig { returns(T.nilable(String)) }
|
210
219
|
def quidditch_position; end
|
211
220
|
|
@@ -446,51 +455,6 @@ class Squib < Wizard
|
|
446
455
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
447
456
|
def self.extending(*args, &block); end
|
448
457
|
|
449
|
-
sig { params(args: T.untyped).returns(Squib) }
|
450
|
-
def self.find(*args); end
|
451
|
-
|
452
|
-
sig { params(args: T.untyped).returns(T.nilable(Squib)) }
|
453
|
-
def self.find_by(*args); end
|
454
|
-
|
455
|
-
sig { params(args: T.untyped).returns(Squib) }
|
456
|
-
def self.find_by!(*args); end
|
457
|
-
|
458
|
-
sig { returns(T.nilable(Squib)) }
|
459
|
-
def self.first; end
|
460
|
-
|
461
|
-
sig { returns(Squib) }
|
462
|
-
def self.first!; end
|
463
|
-
|
464
|
-
sig { returns(T.nilable(Squib)) }
|
465
|
-
def self.second; end
|
466
|
-
|
467
|
-
sig { returns(Squib) }
|
468
|
-
def self.second!; end
|
469
|
-
|
470
|
-
sig { returns(T.nilable(Squib)) }
|
471
|
-
def self.third; end
|
472
|
-
|
473
|
-
sig { returns(Squib) }
|
474
|
-
def self.third!; end
|
475
|
-
|
476
|
-
sig { returns(T.nilable(Squib)) }
|
477
|
-
def self.third_to_last; end
|
478
|
-
|
479
|
-
sig { returns(Squib) }
|
480
|
-
def self.third_to_last!; end
|
481
|
-
|
482
|
-
sig { returns(T.nilable(Squib)) }
|
483
|
-
def self.second_to_last; end
|
484
|
-
|
485
|
-
sig { returns(Squib) }
|
486
|
-
def self.second_to_last!; end
|
487
|
-
|
488
|
-
sig { returns(T.nilable(Squib)) }
|
489
|
-
def self.last; end
|
490
|
-
|
491
|
-
sig { returns(Squib) }
|
492
|
-
def self.last!; end
|
493
|
-
|
494
458
|
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
495
459
|
def self.exists?(conditions = nil); end
|
496
460
|
|
@@ -505,15 +469,6 @@ class Squib < Wizard
|
|
505
469
|
|
506
470
|
sig { params(args: T.untyped).returns(T::Boolean) }
|
507
471
|
def self.one?(*args); end
|
508
|
-
|
509
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(Squib) }
|
510
|
-
def self.create(attributes = nil, &block); end
|
511
|
-
|
512
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(Squib) }
|
513
|
-
def self.create!(attributes = nil, &block); end
|
514
|
-
|
515
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(Squib) }
|
516
|
-
def self.new(attributes = nil, &block); end
|
517
472
|
end
|
518
473
|
|
519
474
|
class Squib::ActiveRecord_Relation < ActiveRecord::Relation
|
@@ -661,6 +616,21 @@ class Squib::ActiveRecord_Relation < ActiveRecord::Relation
|
|
661
616
|
|
662
617
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
|
663
618
|
def extending(*args, &block); end
|
619
|
+
|
620
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
621
|
+
def exists?(conditions = nil); end
|
622
|
+
|
623
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
624
|
+
def any?(*args); end
|
625
|
+
|
626
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
627
|
+
def many?(*args); end
|
628
|
+
|
629
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
630
|
+
def none?(*args); end
|
631
|
+
|
632
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
633
|
+
def one?(*args); end
|
664
634
|
end
|
665
635
|
|
666
636
|
class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
@@ -818,6 +788,15 @@ class Squib::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelatio
|
|
818
788
|
sig { params(args: T.untyped).returns(Squib) }
|
819
789
|
def find_by!(*args); end
|
820
790
|
|
791
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
|
792
|
+
def find_or_initialize_by(attributes, &block); end
|
793
|
+
|
794
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
|
795
|
+
def find_or_create_by(attributes, &block); end
|
796
|
+
|
797
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
|
798
|
+
def find_or_create_by!(attributes, &block); end
|
799
|
+
|
821
800
|
sig { returns(T.nilable(Squib)) }
|
822
801
|
def first; end
|
823
802
|
|
@@ -1041,6 +1020,15 @@ class Squib::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associati
|
|
1041
1020
|
sig { params(args: T.untyped).returns(Squib) }
|
1042
1021
|
def find_by!(*args); end
|
1043
1022
|
|
1023
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
|
1024
|
+
def find_or_initialize_by(attributes, &block); end
|
1025
|
+
|
1026
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
|
1027
|
+
def find_or_create_by(attributes, &block); end
|
1028
|
+
|
1029
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Squib).void)).returns(Squib) }
|
1030
|
+
def find_or_create_by!(attributes, &block); end
|
1031
|
+
|
1044
1032
|
sig { returns(T.nilable(Squib)) }
|
1045
1033
|
def first; end
|
1046
1034
|
|
@@ -156,6 +156,16 @@ module Wand::GeneratedAttributeMethods
|
|
156
156
|
def wood_type?; end
|
157
157
|
end
|
158
158
|
|
159
|
+
class Wand::CoreType < T::Enum
|
160
|
+
enums do
|
161
|
+
PhoenixFeather = new('phoenix_feather')
|
162
|
+
DragonHeartstring = new('dragon_heartstring')
|
163
|
+
UnicornTailHair = new('unicorn_tail_hair')
|
164
|
+
BasiliskHorn = new('basilisk_horn')
|
165
|
+
end
|
166
|
+
|
167
|
+
end
|
168
|
+
|
159
169
|
module Wand::GeneratedAssociationMethods
|
160
170
|
extend T::Sig
|
161
171
|
|
@@ -290,50 +300,11 @@ class Wand < ApplicationRecord
|
|
290
300
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
291
301
|
def self.extending(*args, &block); end
|
292
302
|
|
293
|
-
sig {
|
294
|
-
def
|
295
|
-
|
296
|
-
sig { params(args: T.untyped).returns(T.nilable(Wand)) }
|
297
|
-
def self.find_by(*args); end
|
298
|
-
|
299
|
-
sig { params(args: T.untyped).returns(Wand) }
|
300
|
-
def self.find_by!(*args); end
|
301
|
-
|
302
|
-
sig { returns(T.nilable(Wand)) }
|
303
|
-
def self.first; end
|
304
|
-
|
305
|
-
sig { returns(Wand) }
|
306
|
-
def self.first!; end
|
307
|
-
|
308
|
-
sig { returns(T.nilable(Wand)) }
|
309
|
-
def self.second; end
|
310
|
-
|
311
|
-
sig { returns(Wand) }
|
312
|
-
def self.second!; end
|
313
|
-
|
314
|
-
sig { returns(T.nilable(Wand)) }
|
315
|
-
def self.third; end
|
316
|
-
|
317
|
-
sig { returns(Wand) }
|
318
|
-
def self.third!; end
|
319
|
-
|
320
|
-
sig { returns(T.nilable(Wand)) }
|
321
|
-
def self.third_to_last; end
|
322
|
-
|
323
|
-
sig { returns(Wand) }
|
324
|
-
def self.third_to_last!; end
|
325
|
-
|
326
|
-
sig { returns(T.nilable(Wand)) }
|
327
|
-
def self.second_to_last; end
|
328
|
-
|
329
|
-
sig { returns(Wand) }
|
330
|
-
def self.second_to_last!; end
|
331
|
-
|
332
|
-
sig { returns(T.nilable(Wand)) }
|
333
|
-
def self.last; end
|
303
|
+
sig { returns(T.nilable(Wand::CoreType)) }
|
304
|
+
def typed_core_type; end
|
334
305
|
|
335
|
-
sig {
|
336
|
-
def
|
306
|
+
sig { params(value: T.nilable(Wand::CoreType)).void }
|
307
|
+
def typed_core_type=(value); end
|
337
308
|
|
338
309
|
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
339
310
|
def self.exists?(conditions = nil); end
|
@@ -350,15 +321,6 @@ class Wand < ApplicationRecord
|
|
350
321
|
sig { params(args: T.untyped).returns(T::Boolean) }
|
351
322
|
def self.one?(*args); end
|
352
323
|
|
353
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(Wand) }
|
354
|
-
def self.create(attributes = nil, &block); end
|
355
|
-
|
356
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(Wand) }
|
357
|
-
def self.create!(attributes = nil, &block); end
|
358
|
-
|
359
|
-
sig { params(attributes: T.untyped, block: T.untyped).returns(Wand) }
|
360
|
-
def self.new(attributes = nil, &block); end
|
361
|
-
|
362
324
|
sig { returns(T::Array[Wand]) }
|
363
325
|
def self.mythicals; end
|
364
326
|
end
|
@@ -466,6 +428,21 @@ class Wand::ActiveRecord_Relation < ActiveRecord::Relation
|
|
466
428
|
|
467
429
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
468
430
|
def extending(*args, &block); end
|
431
|
+
|
432
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
433
|
+
def exists?(conditions = nil); end
|
434
|
+
|
435
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
436
|
+
def any?(*args); end
|
437
|
+
|
438
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
439
|
+
def many?(*args); end
|
440
|
+
|
441
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
442
|
+
def none?(*args); end
|
443
|
+
|
444
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
445
|
+
def one?(*args); end
|
469
446
|
end
|
470
447
|
|
471
448
|
class Wand::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
@@ -581,6 +558,15 @@ class Wand::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
|
581
558
|
sig { params(args: T.untyped).returns(Wand) }
|
582
559
|
def find_by!(*args); end
|
583
560
|
|
561
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
562
|
+
def find_or_initialize_by(attributes, &block); end
|
563
|
+
|
564
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
565
|
+
def find_or_create_by(attributes, &block); end
|
566
|
+
|
567
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
568
|
+
def find_or_create_by!(attributes, &block); end
|
569
|
+
|
584
570
|
sig { returns(T.nilable(Wand)) }
|
585
571
|
def first; end
|
586
572
|
|
@@ -762,6 +748,15 @@ class Wand::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associatio
|
|
762
748
|
sig { params(args: T.untyped).returns(Wand) }
|
763
749
|
def find_by!(*args); end
|
764
750
|
|
751
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
752
|
+
def find_or_initialize_by(attributes, &block); end
|
753
|
+
|
754
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
755
|
+
def find_or_create_by(attributes, &block); end
|
756
|
+
|
757
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
758
|
+
def find_or_create_by!(attributes, &block); end
|
759
|
+
|
765
760
|
sig { returns(T.nilable(Wand)) }
|
766
761
|
def first; end
|
767
762
|
|