sorbet-rails 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +13 -1
- data/.travis.yml +2 -2
- data/Gemfile +1 -1
- data/README.md +79 -3
- data/lib/sorbet-rails.rb +5 -1
- data/lib/sorbet-rails/activerecord.rbi +27 -0
- data/lib/sorbet-rails/custom_finder_methods.rb +11 -0
- data/lib/sorbet-rails/helper_rbi_formatter.rb +33 -0
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +91 -0
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +111 -0
- data/lib/sorbet-rails/model_plugins/active_record_enum.rb +43 -0
- data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +80 -0
- data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +28 -0
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +42 -0
- data/lib/sorbet-rails/model_plugins/active_relation_where_not.rb +28 -0
- data/lib/sorbet-rails/model_plugins/base.rb +33 -0
- data/lib/sorbet-rails/model_plugins/custom_finder_methods.rb +54 -0
- data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +49 -0
- data/lib/sorbet-rails/model_plugins/plugins.rb +45 -0
- data/lib/sorbet-rails/model_rbi_formatter.rb +108 -362
- data/lib/sorbet-rails/model_utils.rb +45 -0
- data/lib/sorbet-rails/railtie.rb +1 -0
- data/lib/sorbet-rails/routes_rbi_formatter.rb +12 -3
- data/lib/sorbet-rails/tasks/rails_rbi.rake +36 -15
- data/lib/sorbet-rails/utils.rb +4 -0
- data/sorbet-rails.gemspec +4 -2
- data/spec/helper_rbi_formatter_spec.rb +13 -0
- data/spec/model_plugins_spec.rb +31 -0
- data/spec/model_rbi_formatter_spec.rb +5 -5
- data/spec/rake_rails_rbi_helpers_spec.rb +14 -0
- data/spec/routes_rbi_formatter_spec.rb +3 -3
- data/spec/sorbet_spec.rb +12 -16
- data/spec/support/rails_shared/app/controllers/application_controller.rb +1 -1
- data/spec/support/rails_shared/app/helpers/bar_helper.rb +2 -0
- data/spec/support/rails_shared/app/helpers/baz_helper.rb +2 -0
- data/spec/support/rails_shared/app/helpers/foo_helper.rb +2 -0
- data/spec/support/rails_shared/app/models/concerns/mythical.rb +10 -0
- data/spec/support/rails_shared/app/models/wand.rb +1 -0
- data/spec/support/rails_shared/config/initializers/sorbet_rails.rb +3 -0
- data/spec/support/rails_shared/lib/mythical_rbi_plugin.rb +16 -0
- data/spec/support/rails_shared/sorbet_test_cases.rb +5 -2
- data/spec/support/rails_shared/typed-override.yaml +2 -0
- data/spec/support/rails_symlinks/app/helpers +1 -0
- data/spec/support/rails_symlinks/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/rails_symlinks/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/rails_symlinks/typed-override.yaml +1 -0
- data/spec/support/v4.2/Gemfile.lock +5 -0
- data/spec/support/v4.2/app/helpers +1 -0
- data/spec/support/v4.2/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v4.2/config/routes.rb +0 -1
- data/spec/support/v4.2/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v4.2/typed-override.yaml +1 -0
- data/spec/support/v5.0/Gemfile.lock +5 -0
- data/spec/support/v5.0/app/helpers +1 -0
- data/spec/support/v5.0/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v5.0/config/routes.rb +0 -1
- data/spec/support/v5.0/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v5.0/typed-override.yaml +1 -0
- data/spec/support/v5.1/Gemfile.lock +5 -0
- data/spec/support/v5.1/app/helpers +1 -0
- data/spec/support/v5.1/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v5.1/typed-override.yaml +1 -0
- data/spec/support/v5.2-no-sorbet/Gemfile +0 -2
- data/spec/support/v5.2-no-sorbet/Gemfile.lock +7 -5
- data/spec/support/v5.2-no-sorbet/app/helpers +1 -0
- data/spec/support/v5.2-no-sorbet/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v5.2-no-sorbet/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v5.2-no-sorbet/sorbet_test_cases.rb +1 -0
- data/spec/support/v5.2-no-sorbet/typed-override.yaml +1 -0
- data/spec/support/v5.2/Gemfile +0 -2
- data/spec/support/v5.2/Gemfile.lock +7 -5
- data/spec/support/v5.2/app/helpers +1 -0
- data/spec/support/v5.2/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v5.2/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v5.2/typed-override.yaml +1 -0
- data/spec/support/v6.0/Gemfile +1 -3
- data/spec/support/v6.0/Gemfile.lock +61 -59
- data/spec/support/v6.0/app/helpers +1 -0
- data/spec/support/v6.0/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v6.0/config/routes.rb +0 -1
- data/spec/support/v6.0/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v6.0/typed-override.yaml +1 -0
- data/spec/test_data/v4.2/expected_helpers.rbi +17 -0
- data/spec/test_data/v4.2/expected_potion.rbi +259 -28
- data/spec/test_data/v4.2/expected_spell_book.rbi +278 -37
- data/spec/test_data/v4.2/expected_srb_tc_output.txt +1 -99
- data/spec/test_data/v4.2/expected_wand.rbi +345 -96
- data/spec/test_data/v4.2/expected_wizard.rbi +322 -76
- data/spec/test_data/v4.2/expected_wizard_wo_spellbook.rbi +322 -76
- data/spec/test_data/v5.0/expected_helpers.rbi +17 -0
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v5.0/expected_potion.rbi +259 -28
- data/spec/test_data/v5.0/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v5.0/expected_spell_book.rbi +278 -37
- data/spec/test_data/v5.0/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v5.0/expected_wand.rbi +341 -92
- data/spec/test_data/v5.0/expected_wizard.rbi +318 -72
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +318 -72
- data/spec/test_data/v5.1/expected_helpers.rbi +17 -0
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v5.1/expected_potion.rbi +259 -28
- data/spec/test_data/v5.1/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v5.1/expected_spell_book.rbi +278 -37
- data/spec/test_data/v5.1/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v5.1/expected_wand.rbi +341 -92
- data/spec/test_data/v5.1/expected_wizard.rbi +318 -72
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +318 -72
- data/spec/test_data/v5.2-no-sorbet/expected_attachment.rbi +265 -29
- data/spec/test_data/v5.2-no-sorbet/expected_blob.rbi +271 -35
- data/spec/test_data/v5.2-no-sorbet/expected_helpers.rbi +17 -0
- data/spec/test_data/v5.2-no-sorbet/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v5.2-no-sorbet/expected_potion.rbi +259 -28
- data/spec/test_data/v5.2-no-sorbet/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v5.2-no-sorbet/expected_spell_book.rbi +278 -37
- data/spec/test_data/v5.2-no-sorbet/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v5.2-no-sorbet/expected_wand.rbi +351 -102
- data/spec/test_data/v5.2-no-sorbet/expected_wizard.rbi +318 -72
- data/spec/test_data/v5.2-no-sorbet/expected_wizard_wo_spellbook.rbi +318 -72
- data/spec/test_data/v5.2/expected_attachment.rbi +265 -29
- data/spec/test_data/v5.2/expected_blob.rbi +271 -35
- data/spec/test_data/v5.2/expected_helpers.rbi +17 -0
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v5.2/expected_potion.rbi +259 -28
- data/spec/test_data/v5.2/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v5.2/expected_spell_book.rbi +278 -37
- data/spec/test_data/v5.2/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v5.2/expected_wand.rbi +351 -102
- data/spec/test_data/v5.2/expected_wizard.rbi +318 -72
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +318 -72
- data/spec/test_data/v6.0/expected_attachment.rbi +265 -29
- data/spec/test_data/v6.0/expected_blob.rbi +271 -35
- data/spec/test_data/v6.0/expected_helpers.rbi +17 -0
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v6.0/expected_potion.rbi +259 -28
- data/spec/test_data/v6.0/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v6.0/expected_spell_book.rbi +278 -37
- data/spec/test_data/v6.0/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v6.0/expected_wand.rbi +351 -102
- data/spec/test_data/v6.0/expected_wizard.rbi +318 -72
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +318 -72
- metadata +120 -37
- data/lib/sorbet-rails/rbi/activerecord.rbi +0 -207
- data/spec/support/v4.2/app/helpers/application_helper.rb +0 -3
- data/spec/support/v4.2/sorbet/rbi/gems/sorbet-runtime.rbi +0 -647
- data/spec/support/v4.2/sorbet/rbi/hidden-definitions/errors.txt +0 -11998
- data/spec/support/v4.2/sorbet/rbi/hidden-definitions/hidden.rbi +0 -27774
- data/spec/support/v5.0/sorbet/rbi/gems/sorbet-runtime.rbi +0 -647
- data/spec/support/v5.0/sorbet/rbi/hidden-definitions/errors.txt +0 -10523
- data/spec/support/v5.0/sorbet/rbi/hidden-definitions/hidden.rbi +0 -24969
- data/spec/support/v5.1/sorbet/rbi/gems/sorbet-runtime.rbi +0 -647
- data/spec/support/v5.1/sorbet/rbi/hidden-definitions/errors.txt +0 -10226
- data/spec/support/v5.1/sorbet/rbi/hidden-definitions/hidden.rbi +0 -24635
- data/spec/support/v5.2/.ruby-version +0 -1
- data/spec/support/v5.2/sorbet/rbi/gems/sorbet-runtime.rbi +0 -644
- data/spec/support/v5.2/sorbet/rbi/hidden-definitions/errors.txt +0 -10046
- data/spec/support/v5.2/sorbet/rbi/hidden-definitions/hidden.rbi +0 -24424
- data/spec/support/v6.0/sorbet/rbi/gems/sorbet-runtime.rbi +0 -647
- data/spec/support/v6.0/sorbet/rbi/hidden-definitions/errors.txt +0 -12074
- data/spec/support/v6.0/sorbet/rbi/hidden-definitions/hidden.rbi +0 -28231
@@ -1,11 +1,3 @@
|
|
1
|
-
sorbet_test_cases.rb:14: Argument does not have asserted type `ActiveRecord::Associations::CollectionProxy` https://srb.help/7007
|
2
|
-
14 |T.assert_type!(wizard.spell_books, ActiveRecord::Associations::CollectionProxy)
|
3
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
4
|
-
Got SpellBook::ActiveRecord_Associations_CollectionProxy originating from:
|
5
|
-
sorbet_test_cases.rb:14:
|
6
|
-
14 |T.assert_type!(wizard.spell_books, ActiveRecord::Associations::CollectionProxy)
|
7
|
-
^^^^^^^^^^^^^^^^^^
|
8
|
-
|
9
1
|
sorbet_test_cases.rb:15: Revealed type: `SpellBook::ActiveRecord_Associations_CollectionProxy` https://srb.help/7014
|
10
2
|
15 |T.reveal_type(wizard.spell_books) # SpellBook::CollectionProxy
|
11
3
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -14,14 +6,6 @@ sorbet_test_cases.rb:15: Revealed type: `SpellBook::ActiveRecord_Associations_Co
|
|
14
6
|
15 |T.reveal_type(wizard.spell_books) # SpellBook::CollectionProxy
|
15
7
|
^^^^^^^^^^^^^^^^^^
|
16
8
|
|
17
|
-
sorbet_test_cases.rb:19: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
|
18
|
-
19 |T.assert_type!(Wizard.all, ActiveRecord::Relation)
|
19
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
20
|
-
Got Wizard::ActiveRecord_Relation originating from:
|
21
|
-
sorbet_test_cases.rb:19:
|
22
|
-
19 |T.assert_type!(Wizard.all, ActiveRecord::Relation)
|
23
|
-
^^^^^^^^^^
|
24
|
-
|
25
9
|
sorbet_test_cases.rb:20: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
|
26
10
|
20 |T.reveal_type(Wizard.all) # Wizard::ActiveRecord_Relation
|
27
11
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -30,14 +14,6 @@ sorbet_test_cases.rb:20: Revealed type: `Wizard::ActiveRecord_Relation` https://
|
|
30
14
|
20 |T.reveal_type(Wizard.all) # Wizard::ActiveRecord_Relation
|
31
15
|
^^^^^^^^^^
|
32
16
|
|
33
|
-
sorbet_test_cases.rb:23: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
|
34
|
-
23 |T.assert_type!(Wizard.recent, ActiveRecord::Relation)
|
35
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
36
|
-
Got Wizard::ActiveRecord_Relation originating from:
|
37
|
-
sorbet_test_cases.rb:23:
|
38
|
-
23 |T.assert_type!(Wizard.recent, ActiveRecord::Relation)
|
39
|
-
^^^^^^^^^^^^^
|
40
|
-
|
41
17
|
sorbet_test_cases.rb:24: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
|
42
18
|
24 |T.reveal_type(Wizard.recent)
|
43
19
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -46,14 +22,6 @@ sorbet_test_cases.rb:24: Revealed type: `Wizard::ActiveRecord_Relation` https://
|
|
46
22
|
24 |T.reveal_type(Wizard.recent)
|
47
23
|
^^^^^^^^^^^^^
|
48
24
|
|
49
|
-
sorbet_test_cases.rb:27: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
|
50
|
-
27 |T.assert_type!(Wizard.Gryffindor, ActiveRecord::Relation)
|
51
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52
|
-
Got Wizard::ActiveRecord_Relation originating from:
|
53
|
-
sorbet_test_cases.rb:27:
|
54
|
-
27 |T.assert_type!(Wizard.Gryffindor, ActiveRecord::Relation)
|
55
|
-
^^^^^^^^^^^^^^^^^
|
56
|
-
|
57
25
|
sorbet_test_cases.rb:28: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
|
58
26
|
28 |T.reveal_type(Wizard.Gryffindor)
|
59
27
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -62,14 +30,6 @@ sorbet_test_cases.rb:28: Revealed type: `Wizard::ActiveRecord_Relation` https://
|
|
62
30
|
28 |T.reveal_type(Wizard.Gryffindor)
|
63
31
|
^^^^^^^^^^^^^^^^^
|
64
32
|
|
65
|
-
sorbet_test_cases.rb:31: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
|
66
|
-
31 |T.assert_type!(Wizard.Gryffindor.recent, ActiveRecord::Relation)
|
67
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
68
|
-
Got Wizard::ActiveRecord_Relation originating from:
|
69
|
-
sorbet_test_cases.rb:31:
|
70
|
-
31 |T.assert_type!(Wizard.Gryffindor.recent, ActiveRecord::Relation)
|
71
|
-
^^^^^^^^^^^^^^^^^^^^^^^^
|
72
|
-
|
73
33
|
sorbet_test_cases.rb:32: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
|
74
34
|
32 |T.reveal_type(Wizard.Gryffindor.recent)
|
75
35
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -78,14 +38,6 @@ sorbet_test_cases.rb:32: Revealed type: `Wizard::ActiveRecord_Relation` https://
|
|
78
38
|
32 |T.reveal_type(Wizard.Gryffindor.recent)
|
79
39
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
80
40
|
|
81
|
-
sorbet_test_cases.rb:33: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
|
82
|
-
33 |T.assert_type!(Wizard.Gryffindor.recent.unscoped, ActiveRecord::Relation)
|
83
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
84
|
-
Got Wizard::ActiveRecord_Relation originating from:
|
85
|
-
sorbet_test_cases.rb:33:
|
86
|
-
33 |T.assert_type!(Wizard.Gryffindor.recent.unscoped, ActiveRecord::Relation)
|
87
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
88
|
-
|
89
41
|
sorbet_test_cases.rb:34: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
|
90
42
|
34 |T.reveal_type(Wizard.Gryffindor.recent.unscoped)
|
91
43
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -94,14 +46,6 @@ sorbet_test_cases.rb:34: Revealed type: `Wizard::ActiveRecord_Relation` https://
|
|
94
46
|
34 |T.reveal_type(Wizard.Gryffindor.recent.unscoped)
|
95
47
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
96
48
|
|
97
|
-
sorbet_test_cases.rb:37: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
|
98
|
-
37 |T.assert_type!(Wizard.where(id: 1), ActiveRecord::Relation)
|
99
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
100
|
-
Got Wizard::ActiveRecord_Relation originating from:
|
101
|
-
sorbet_test_cases.rb:37:
|
102
|
-
37 |T.assert_type!(Wizard.where(id: 1), ActiveRecord::Relation)
|
103
|
-
^^^^^^^^^^^^^^^^^^^
|
104
|
-
|
105
49
|
sorbet_test_cases.rb:38: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
|
106
50
|
38 |T.reveal_type(Wizard.where(id: 1)) # Wizard::Relation
|
107
51
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -110,14 +54,6 @@ sorbet_test_cases.rb:38: Revealed type: `Wizard::ActiveRecord_Relation` https://
|
|
110
54
|
38 |T.reveal_type(Wizard.where(id: 1)) # Wizard::Relation
|
111
55
|
^^^^^^^^^^^^^^^^^^^
|
112
56
|
|
113
|
-
sorbet_test_cases.rb:39: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
|
114
|
-
39 |T.assert_type!(Wizard.preload(:spell_books), ActiveRecord::Relation)
|
115
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
116
|
-
Got Wizard::ActiveRecord_Relation originating from:
|
117
|
-
sorbet_test_cases.rb:39:
|
118
|
-
39 |T.assert_type!(Wizard.preload(:spell_books), ActiveRecord::Relation)
|
119
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
120
|
-
|
121
57
|
sorbet_test_cases.rb:40: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
|
122
58
|
40 |T.reveal_type(Wizard.preload(:spell_books)) # Wizard::Relation
|
123
59
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -126,14 +62,6 @@ sorbet_test_cases.rb:40: Revealed type: `Wizard::ActiveRecord_Relation` https://
|
|
126
62
|
40 |T.reveal_type(Wizard.preload(:spell_books)) # Wizard::Relation
|
127
63
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
128
64
|
|
129
|
-
sorbet_test_cases.rb:41: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
|
130
|
-
41 |T.assert_type!(Wizard.eager_load(:spell_books), ActiveRecord::Relation)
|
131
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
132
|
-
Got Wizard::ActiveRecord_Relation originating from:
|
133
|
-
sorbet_test_cases.rb:41:
|
134
|
-
41 |T.assert_type!(Wizard.eager_load(:spell_books), ActiveRecord::Relation)
|
135
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
136
|
-
|
137
65
|
sorbet_test_cases.rb:42: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
|
138
66
|
42 |T.reveal_type(Wizard.eager_load(:spell_books)) # Wizard::Relation
|
139
67
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -142,14 +70,6 @@ sorbet_test_cases.rb:42: Revealed type: `Wizard::ActiveRecord_Relation` https://
|
|
142
70
|
42 |T.reveal_type(Wizard.eager_load(:spell_books)) # Wizard::Relation
|
143
71
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
144
72
|
|
145
|
-
sorbet_test_cases.rb:43: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
|
146
|
-
43 |T.assert_type!(Wizard.order(:id), ActiveRecord::Relation)
|
147
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
148
|
-
Got Wizard::ActiveRecord_Relation originating from:
|
149
|
-
sorbet_test_cases.rb:43:
|
150
|
-
43 |T.assert_type!(Wizard.order(:id), ActiveRecord::Relation)
|
151
|
-
^^^^^^^^^^^^^^^^^
|
152
|
-
|
153
73
|
sorbet_test_cases.rb:44: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
|
154
74
|
44 |T.reveal_type(Wizard.order(:id)) # Wizard::Relation
|
155
75
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -157,22 +77,4 @@ sorbet_test_cases.rb:44: Revealed type: `Wizard::ActiveRecord_Relation` https://
|
|
157
77
|
sorbet_test_cases.rb:44:
|
158
78
|
44 |T.reveal_type(Wizard.order(:id)) # Wizard::Relation
|
159
79
|
^^^^^^^^^^^^^^^^^
|
160
|
-
|
161
|
-
sorbet_test_cases.rb:95: The typechecker was unable to infer the type of the asserted value https://srb.help/7007
|
162
|
-
95 | T.assert_type!(w, Wizard) # TODO this doesn't work on Rails 4.2 or 5.0
|
163
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^
|
164
|
-
Got T.untyped originating from:
|
165
|
-
sorbet_test_cases.rb:94:
|
166
|
-
94 |Wizard.all.map do |w|
|
167
|
-
^
|
168
|
-
You may need to add additional `sig` annotations
|
169
|
-
|
170
|
-
sorbet_test_cases.rb:106: The typechecker was unable to infer the type of the asserted value https://srb.help/7007
|
171
|
-
106 | T.assert_type!(sp, SpellBook) # TODO this doesn't work on Rails 4.2 or 5.0
|
172
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
173
|
-
Got T.untyped originating from:
|
174
|
-
sorbet_test_cases.rb:105:
|
175
|
-
105 |wizard.spell_books.map do |sp|
|
176
|
-
^^
|
177
|
-
You may need to add additional `sig` annotations
|
178
|
-
Errors: 22
|
80
|
+
Errors: 10
|
@@ -1,198 +1,270 @@
|
|
1
1
|
# This is an autogenerated file for dynamic methods in Wand
|
2
|
-
# Please rerun rake rails_rbi:models to regenerate.
|
2
|
+
# Please rerun rake rails_rbi:models[Wand] to regenerate.
|
3
|
+
|
3
4
|
# typed: strong
|
5
|
+
module Wand::EnumInstanceMethods
|
6
|
+
extend T::Sig
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
extend T::Generic
|
8
|
-
Elem = type_member(fixed: Wand)
|
9
|
-
end
|
8
|
+
sig { returns(T::Boolean) }
|
9
|
+
def phoenix_feather?; end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
extend T::Generic
|
14
|
-
Elem = type_member(fixed: Wand)
|
15
|
-
end
|
11
|
+
sig { void }
|
12
|
+
def phoenix_feather!; end
|
16
13
|
|
17
|
-
|
18
|
-
|
19
|
-
extend T::Generic
|
20
|
-
extend Wand::ModelRelationShared
|
21
|
-
include Wand::InstanceMethods
|
22
|
-
Elem = type_template(fixed: Wand)
|
23
|
-
end
|
14
|
+
sig { returns(T::Boolean) }
|
15
|
+
def dragon_heartstring?; end
|
24
16
|
|
25
|
-
|
26
|
-
|
17
|
+
sig { void }
|
18
|
+
def dragon_heartstring!; end
|
19
|
+
|
20
|
+
sig { returns(T::Boolean) }
|
21
|
+
def unicorn_tail_hair?; end
|
27
22
|
|
28
23
|
sig { void }
|
29
|
-
def
|
24
|
+
def unicorn_tail_hair!; end
|
30
25
|
|
31
26
|
sig { returns(T::Boolean) }
|
32
|
-
def basilisk_horn
|
27
|
+
def basilisk_horn?; end
|
28
|
+
|
29
|
+
sig { void }
|
30
|
+
def basilisk_horn!; end
|
31
|
+
end
|
32
|
+
|
33
|
+
module Wand::ActiveRelation_WhereNot
|
34
|
+
sig { params(opts: T.untyped, rest: T.untyped).returns(T.self_type) }
|
35
|
+
def not(opts, *rest); end
|
36
|
+
end
|
37
|
+
|
38
|
+
module Wand::GeneratedAttributeMethods
|
39
|
+
extend T::Sig
|
33
40
|
|
34
41
|
sig { returns(T::Boolean) }
|
35
|
-
def broken
|
42
|
+
def broken; end
|
36
43
|
|
37
44
|
sig { params(value: T::Boolean).void }
|
38
45
|
def broken=(value); end
|
39
46
|
|
40
|
-
sig {
|
41
|
-
def broken
|
47
|
+
sig { returns(T::Boolean) }
|
48
|
+
def broken?; end
|
42
49
|
|
43
50
|
sig { returns(T.nilable(Date)) }
|
44
|
-
def chosen_at_date
|
51
|
+
def chosen_at_date; end
|
45
52
|
|
46
53
|
sig { params(value: T.nilable(Date)).void }
|
47
54
|
def chosen_at_date=(value); end
|
48
55
|
|
49
|
-
sig {
|
50
|
-
def chosen_at_date
|
56
|
+
sig { returns(T::Boolean) }
|
57
|
+
def chosen_at_date?; end
|
51
58
|
|
52
59
|
sig { returns(T.nilable(Time)) }
|
53
|
-
def chosen_at_time
|
60
|
+
def chosen_at_time; end
|
54
61
|
|
55
62
|
sig { params(value: T.nilable(Time)).void }
|
56
63
|
def chosen_at_time=(value); end
|
57
64
|
|
58
|
-
sig {
|
59
|
-
def chosen_at_time
|
65
|
+
sig { returns(T::Boolean) }
|
66
|
+
def chosen_at_time?; end
|
60
67
|
|
61
|
-
sig { returns(String) }
|
62
|
-
def core_type
|
68
|
+
sig { returns(T.nilable(String)) }
|
69
|
+
def core_type; end
|
63
70
|
|
64
71
|
sig { params(value: T.nilable(T.any(Integer, String, Symbol))).void }
|
65
72
|
def core_type=(value); end
|
66
73
|
|
67
|
-
sig {
|
68
|
-
def core_type
|
74
|
+
sig { returns(T::Boolean) }
|
75
|
+
def core_type?; end
|
69
76
|
|
70
|
-
sig { returns(T.nilable(
|
71
|
-
def created_at
|
77
|
+
sig { returns(T.nilable(Time)) }
|
78
|
+
def created_at; end
|
72
79
|
|
73
|
-
sig { params(value: T.nilable(
|
80
|
+
sig { params(value: T.nilable(Time)).void }
|
74
81
|
def created_at=(value); end
|
75
82
|
|
76
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
77
|
-
def created_at?(*args); end
|
78
|
-
|
79
|
-
sig { void }
|
80
|
-
def dragon_heartstring!(); end
|
81
|
-
|
82
83
|
sig { returns(T::Boolean) }
|
83
|
-
def
|
84
|
+
def created_at?; end
|
84
85
|
|
85
86
|
sig { returns(Float) }
|
86
|
-
def flexibility
|
87
|
+
def flexibility; end
|
87
88
|
|
88
89
|
sig { params(value: Float).void }
|
89
90
|
def flexibility=(value); end
|
90
91
|
|
91
|
-
sig {
|
92
|
-
def flexibility
|
92
|
+
sig { returns(T::Boolean) }
|
93
|
+
def flexibility?; end
|
93
94
|
|
94
95
|
sig { returns(BigDecimal) }
|
95
|
-
def hardness
|
96
|
+
def hardness; end
|
96
97
|
|
97
98
|
sig { params(value: BigDecimal).void }
|
98
99
|
def hardness=(value); end
|
99
100
|
|
100
|
-
sig {
|
101
|
-
def hardness
|
101
|
+
sig { returns(T::Boolean) }
|
102
|
+
def hardness?; end
|
102
103
|
|
103
104
|
sig { returns(Integer) }
|
104
|
-
def id
|
105
|
+
def id; end
|
105
106
|
|
106
107
|
sig { params(value: Integer).void }
|
107
108
|
def id=(value); end
|
108
109
|
|
109
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
110
|
-
def id?(*args); end
|
111
|
-
|
112
|
-
sig { void }
|
113
|
-
def phoenix_feather!(); end
|
114
|
-
|
115
110
|
sig { returns(T::Boolean) }
|
116
|
-
def
|
111
|
+
def id?; end
|
117
112
|
|
118
113
|
sig { returns(Integer) }
|
119
|
-
def reflectance
|
114
|
+
def reflectance; end
|
120
115
|
|
121
116
|
sig { params(value: Integer).void }
|
122
117
|
def reflectance=(value); end
|
123
118
|
|
124
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
125
|
-
def reflectance?(*args); end
|
126
|
-
|
127
|
-
sig { void }
|
128
|
-
def unicorn_tail_hair!(); end
|
129
|
-
|
130
119
|
sig { returns(T::Boolean) }
|
131
|
-
def
|
120
|
+
def reflectance?; end
|
132
121
|
|
133
|
-
sig { returns(T.nilable(
|
134
|
-
def updated_at
|
122
|
+
sig { returns(T.nilable(Time)) }
|
123
|
+
def updated_at; end
|
135
124
|
|
136
|
-
sig { params(value: T.nilable(
|
125
|
+
sig { params(value: T.nilable(Time)).void }
|
137
126
|
def updated_at=(value); end
|
138
127
|
|
139
|
-
sig {
|
140
|
-
def updated_at
|
128
|
+
sig { returns(T::Boolean) }
|
129
|
+
def updated_at?; end
|
141
130
|
|
142
131
|
sig { returns(Integer) }
|
143
|
-
def wizard_id
|
132
|
+
def wizard_id; end
|
144
133
|
|
145
134
|
sig { params(value: Integer).void }
|
146
135
|
def wizard_id=(value); end
|
147
136
|
|
148
|
-
sig {
|
149
|
-
def wizard_id
|
137
|
+
sig { returns(T::Boolean) }
|
138
|
+
def wizard_id?; end
|
150
139
|
|
151
140
|
sig { returns(T.nilable(String)) }
|
152
|
-
def wood_type
|
141
|
+
def wood_type; end
|
153
142
|
|
154
143
|
sig { params(value: T.nilable(String)).void }
|
155
144
|
def wood_type=(value); end
|
156
145
|
|
157
|
-
sig {
|
158
|
-
def wood_type
|
159
|
-
|
146
|
+
sig { returns(T::Boolean) }
|
147
|
+
def wood_type?; end
|
160
148
|
end
|
161
149
|
|
162
|
-
|
150
|
+
module Wand::GeneratedAssociationMethods
|
163
151
|
extend T::Sig
|
164
152
|
|
165
153
|
sig { returns(::Wizard) }
|
166
|
-
def wizard
|
154
|
+
def wizard; end
|
167
155
|
|
168
156
|
sig { params(value: ::Wizard).void }
|
169
157
|
def wizard=(value); end
|
158
|
+
end
|
170
159
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
|
175
|
-
def self.core_types(); end
|
160
|
+
module Wand::CustomFinderMethods
|
161
|
+
sig { params(limit: Integer).returns(T::Array[Wand]) }
|
162
|
+
def first_n(limit); end
|
176
163
|
|
177
|
-
sig { params(
|
178
|
-
def
|
164
|
+
sig { params(limit: Integer).returns(T::Array[Wand]) }
|
165
|
+
def last_n(limit); end
|
179
166
|
|
180
|
-
sig { params(args: T.
|
181
|
-
def
|
167
|
+
sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[Wand]) }
|
168
|
+
def find_n(*args); end
|
182
169
|
|
183
|
-
sig { params(
|
184
|
-
def
|
170
|
+
sig { params(id: Integer).returns(T.nilable(Wand)) }
|
171
|
+
def find_by_id(id); end
|
185
172
|
|
173
|
+
sig { params(id: Integer).returns(Wand) }
|
174
|
+
def find_by_id!(id); end
|
186
175
|
end
|
187
176
|
|
188
|
-
|
177
|
+
class Wand < ApplicationRecord
|
178
|
+
include Wand::EnumInstanceMethods
|
179
|
+
include Wand::GeneratedAttributeMethods
|
180
|
+
include Wand::GeneratedAssociationMethods
|
181
|
+
extend SorbetRails::CustomFinderMethods
|
182
|
+
extend Wand::CustomFinderMethods
|
189
183
|
extend T::Sig
|
184
|
+
extend T::Generic
|
185
|
+
extend Wand::ModelRelationShared
|
186
|
+
|
187
|
+
sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
|
188
|
+
def self.core_types; end
|
190
189
|
|
191
190
|
sig { returns(Wand::ActiveRecord_Relation) }
|
192
|
-
def
|
191
|
+
def self.phoenix_feather; end
|
193
192
|
|
194
|
-
sig {
|
195
|
-
def
|
193
|
+
sig { returns(Wand::ActiveRecord_Relation) }
|
194
|
+
def self.dragon_heartstring; end
|
195
|
+
|
196
|
+
sig { returns(Wand::ActiveRecord_Relation) }
|
197
|
+
def self.unicorn_tail_hair; end
|
198
|
+
|
199
|
+
sig { returns(Wand::ActiveRecord_Relation) }
|
200
|
+
def self.basilisk_horn; end
|
201
|
+
|
202
|
+
sig { params(args: T.untyped).returns(Wand) }
|
203
|
+
def self.find(*args); end
|
204
|
+
|
205
|
+
sig { params(args: T.untyped).returns(T.nilable(Wand)) }
|
206
|
+
def self.find_by(*args); end
|
207
|
+
|
208
|
+
sig { params(args: T.untyped).returns(Wand) }
|
209
|
+
def self.find_by!(*args); end
|
210
|
+
|
211
|
+
sig { returns(T.nilable(Wand)) }
|
212
|
+
def self.first; end
|
213
|
+
|
214
|
+
sig { returns(Wand) }
|
215
|
+
def self.first!; end
|
216
|
+
|
217
|
+
sig { returns(T.nilable(Wand)) }
|
218
|
+
def self.second; end
|
219
|
+
|
220
|
+
sig { returns(Wand) }
|
221
|
+
def self.second!; end
|
222
|
+
|
223
|
+
sig { returns(T.nilable(Wand)) }
|
224
|
+
def self.third; end
|
225
|
+
|
226
|
+
sig { returns(Wand) }
|
227
|
+
def self.third!; end
|
228
|
+
|
229
|
+
sig { returns(T.nilable(Wand)) }
|
230
|
+
def self.third_to_last; end
|
231
|
+
|
232
|
+
sig { returns(Wand) }
|
233
|
+
def self.third_to_last!; end
|
234
|
+
|
235
|
+
sig { returns(T.nilable(Wand)) }
|
236
|
+
def self.second_to_last; end
|
237
|
+
|
238
|
+
sig { returns(Wand) }
|
239
|
+
def self.second_to_last!; end
|
240
|
+
|
241
|
+
sig { returns(T.nilable(Wand)) }
|
242
|
+
def self.last; end
|
243
|
+
|
244
|
+
sig { returns(Wand) }
|
245
|
+
def self.last!; end
|
246
|
+
|
247
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
248
|
+
def self.exists?(conditions = nil); end
|
249
|
+
|
250
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
251
|
+
def self.any?(*args); end
|
252
|
+
|
253
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
254
|
+
def self.many?(*args); end
|
255
|
+
|
256
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
257
|
+
def self.none?(*args); end
|
258
|
+
|
259
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
260
|
+
def self.one?(*args); end
|
261
|
+
|
262
|
+
sig { returns(T::Array[Wand]) }
|
263
|
+
def self.mythicals; end
|
264
|
+
end
|
265
|
+
|
266
|
+
module Wand::ModelRelationShared
|
267
|
+
extend T::Sig
|
196
268
|
|
197
269
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
198
270
|
def basilisk_horn(*args); end
|
@@ -209,6 +281,12 @@ module Wand::ModelRelationShared
|
|
209
281
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
210
282
|
def unicorn_tail_hair(*args); end
|
211
283
|
|
284
|
+
sig { returns(Wand::ActiveRecord_Relation) }
|
285
|
+
def all; end
|
286
|
+
|
287
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
288
|
+
def unscoped(&block); end
|
289
|
+
|
212
290
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
213
291
|
def select(*args, &block); end
|
214
292
|
|
@@ -274,5 +352,176 @@ module Wand::ModelRelationShared
|
|
274
352
|
|
275
353
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
276
354
|
def except(*args, &block); end
|
355
|
+
end
|
356
|
+
|
357
|
+
class Wand::ActiveRecord_Relation < ActiveRecord::Relation
|
358
|
+
include Wand::ActiveRelation_WhereNot
|
359
|
+
include SorbetRails::CustomFinderMethods
|
360
|
+
include Wand::CustomFinderMethods
|
361
|
+
include Enumerable
|
362
|
+
include Wand::ModelRelationShared
|
363
|
+
extend T::Sig
|
364
|
+
extend T::Generic
|
365
|
+
Elem = type_member(fixed: Wand)
|
366
|
+
|
367
|
+
sig { params(args: T.untyped).returns(Wand) }
|
368
|
+
def find(*args); end
|
369
|
+
|
370
|
+
sig { params(args: T.untyped).returns(T.nilable(Wand)) }
|
371
|
+
def find_by(*args); end
|
372
|
+
|
373
|
+
sig { params(args: T.untyped).returns(Wand) }
|
374
|
+
def find_by!(*args); end
|
375
|
+
|
376
|
+
sig { returns(T.nilable(Wand)) }
|
377
|
+
def first; end
|
378
|
+
|
379
|
+
sig { returns(Wand) }
|
380
|
+
def first!; end
|
381
|
+
|
382
|
+
sig { returns(T.nilable(Wand)) }
|
383
|
+
def second; end
|
384
|
+
|
385
|
+
sig { returns(Wand) }
|
386
|
+
def second!; end
|
387
|
+
|
388
|
+
sig { returns(T.nilable(Wand)) }
|
389
|
+
def third; end
|
390
|
+
|
391
|
+
sig { returns(Wand) }
|
392
|
+
def third!; end
|
393
|
+
|
394
|
+
sig { returns(T.nilable(Wand)) }
|
395
|
+
def third_to_last; end
|
396
|
+
|
397
|
+
sig { returns(Wand) }
|
398
|
+
def third_to_last!; end
|
399
|
+
|
400
|
+
sig { returns(T.nilable(Wand)) }
|
401
|
+
def second_to_last; end
|
402
|
+
|
403
|
+
sig { returns(Wand) }
|
404
|
+
def second_to_last!; end
|
405
|
+
|
406
|
+
sig { returns(T.nilable(Wand)) }
|
407
|
+
def last; end
|
408
|
+
|
409
|
+
sig { returns(Wand) }
|
410
|
+
def last!; end
|
411
|
+
|
412
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
413
|
+
def exists?(conditions = nil); end
|
414
|
+
|
415
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
416
|
+
def any?(*args); end
|
417
|
+
|
418
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
419
|
+
def many?(*args); end
|
420
|
+
|
421
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
422
|
+
def none?(*args); end
|
423
|
+
|
424
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
425
|
+
def one?(*args); end
|
426
|
+
|
427
|
+
sig { implementation.params(block: T.proc.params(e: Wand).void).void }
|
428
|
+
def each(&block); end
|
429
|
+
|
430
|
+
sig { params(level: T.nilable(Integer)).returns(T::Array[Wand]) }
|
431
|
+
def flatten(level); end
|
432
|
+
|
433
|
+
sig { returns(T::Array[Wand]) }
|
434
|
+
def to_a; end
|
435
|
+
end
|
436
|
+
|
437
|
+
class Wand::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
438
|
+
include Wand::ActiveRelation_WhereNot
|
439
|
+
include SorbetRails::CustomFinderMethods
|
440
|
+
include Wand::CustomFinderMethods
|
441
|
+
include Enumerable
|
442
|
+
include Wand::ModelRelationShared
|
443
|
+
extend T::Sig
|
444
|
+
extend T::Generic
|
445
|
+
Elem = type_member(fixed: Wand)
|
446
|
+
|
447
|
+
sig { params(args: T.untyped).returns(Wand) }
|
448
|
+
def find(*args); end
|
449
|
+
|
450
|
+
sig { params(args: T.untyped).returns(T.nilable(Wand)) }
|
451
|
+
def find_by(*args); end
|
452
|
+
|
453
|
+
sig { params(args: T.untyped).returns(Wand) }
|
454
|
+
def find_by!(*args); end
|
455
|
+
|
456
|
+
sig { returns(T.nilable(Wand)) }
|
457
|
+
def first; end
|
458
|
+
|
459
|
+
sig { returns(Wand) }
|
460
|
+
def first!; end
|
461
|
+
|
462
|
+
sig { returns(T.nilable(Wand)) }
|
463
|
+
def second; end
|
464
|
+
|
465
|
+
sig { returns(Wand) }
|
466
|
+
def second!; end
|
467
|
+
|
468
|
+
sig { returns(T.nilable(Wand)) }
|
469
|
+
def third; end
|
470
|
+
|
471
|
+
sig { returns(Wand) }
|
472
|
+
def third!; end
|
473
|
+
|
474
|
+
sig { returns(T.nilable(Wand)) }
|
475
|
+
def third_to_last; end
|
476
|
+
|
477
|
+
sig { returns(Wand) }
|
478
|
+
def third_to_last!; end
|
479
|
+
|
480
|
+
sig { returns(T.nilable(Wand)) }
|
481
|
+
def second_to_last; end
|
482
|
+
|
483
|
+
sig { returns(Wand) }
|
484
|
+
def second_to_last!; end
|
485
|
+
|
486
|
+
sig { returns(T.nilable(Wand)) }
|
487
|
+
def last; end
|
488
|
+
|
489
|
+
sig { returns(Wand) }
|
490
|
+
def last!; end
|
491
|
+
|
492
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
493
|
+
def exists?(conditions = nil); end
|
494
|
+
|
495
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
496
|
+
def any?(*args); end
|
497
|
+
|
498
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
499
|
+
def many?(*args); end
|
500
|
+
|
501
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
502
|
+
def none?(*args); end
|
503
|
+
|
504
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
505
|
+
def one?(*args); end
|
506
|
+
|
507
|
+
sig { implementation.params(block: T.proc.params(e: Wand).void).void }
|
508
|
+
def each(&block); end
|
509
|
+
|
510
|
+
sig { params(level: T.nilable(Integer)).returns(T::Array[Wand]) }
|
511
|
+
def flatten(level); end
|
512
|
+
|
513
|
+
sig { returns(T::Array[Wand]) }
|
514
|
+
def to_a; end
|
515
|
+
|
516
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
517
|
+
def <<(*records); end
|
518
|
+
|
519
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
520
|
+
def append(*records); end
|
521
|
+
|
522
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
523
|
+
def push(*records); end
|
277
524
|
|
525
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
526
|
+
def concat(*records); end
|
278
527
|
end
|