activerecord-ejection_seat 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/Gemfile +11 -3
- data/Gemfile.lock +99 -35
- data/README.md +4 -0
- data/Rakefile +14 -2
- data/lib/activerecord-ejection_seat/ejectable.rb +2 -1
- data/lib/activerecord-ejection_seat/props_builder.rb +44 -0
- data/lib/activerecord-ejection_seat/version.rb +2 -1
- data/lib/activerecord-ejection_seat.rb +3 -1
- data/sorbet/config +3 -0
- data/sorbet/rbi/annotations/activerecord.rbi +18 -0
- data/sorbet/rbi/annotations/activesupport.rbi +52 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/activemodel@7.0.4.rbi +8 -0
- data/sorbet/rbi/gems/activerecord@7.0.4.rbi +11 -0
- data/sorbet/rbi/gems/activesupport@7.0.4.rbi +93 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1064 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +8 -0
- data/sorbet/rbi/gems/io-console@0.6.0.rbi +8 -0
- data/sorbet/rbi/gems/irb@1.6.2.rbi +342 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.2.rbi +8 -0
- data/sorbet/rbi/gems/minitest@5.16.3.rbi +8 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/parser@3.1.3.0.rbi +6878 -0
- data/sorbet/rbi/gems/prettier_print@1.1.0.rbi +8 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +397 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +2946 -0
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
- data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +3126 -0
- data/sorbet/rbi/gems/reline@0.3.2.rbi +8 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +4660 -0
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10588 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +7817 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +4994 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1477 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +10 -0
- data/sorbet/rbi/gems/rubocop-ast@1.24.0.rbi +6790 -0
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +354 -0
- data/sorbet/rbi/gems/rubocop-rspec@2.16.0.rbi +7650 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +1014 -0
- data/sorbet/rbi/gems/rubocop@1.41.0.rbi +52148 -0
- data/sorbet/rbi/gems/ruby-lsp@0.3.7.rbi +13 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1212 -0
- data/sorbet/rbi/gems/sorbet-struct-comparable@1.3.0.rbi +16 -0
- data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
- data/sorbet/rbi/gems/sqlite3@1.5.4.rbi +1600 -0
- data/sorbet/rbi/gems/syntax_tree@4.3.0.rbi +8 -0
- data/sorbet/rbi/gems/tapioca@0.10.4.rbi +3032 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3950 -0
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +8 -0
- data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +46 -0
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +4265 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2498 -0
- data/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi +391 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +17033 -0
- data/sorbet/rbi/todo.rbi +9 -0
- data/sorbet/tapioca/config.yml +2 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +71 -4
- data/activerecord-ejection_seat.gemspec +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec011864f722a24abd09c60e4dbfd8c53e1a41a2922ef6827a527f3992d5b941
|
4
|
+
data.tar.gz: ea35286dccfb37c99279b6ffe6403fd20ee72c8a488103bdaa4386e7f6c8b205
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2dfb9277f769f3e9296a5388459e02acfa98ae0697009e3e8587dbaed774d45ec059652a7ffdf61c5a2a36c62b309e32fa10b834f20a8e84d145fc3c6f78dda
|
7
|
+
data.tar.gz: b39ccda5b3aa68a6d63f9be7959f70daf7a8e262f67d0b4afbf9bd250c1f1cb42f25d28592b5223ccd46857548a2ce7936d061bc9f0b62030bbe870b03e7d5c3
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
@@ -6,15 +6,23 @@ source "https://rubygems.org"
|
|
6
6
|
gemspec
|
7
7
|
|
8
8
|
group :development do
|
9
|
-
gem "rake"
|
10
|
-
gem "rubocop"
|
9
|
+
gem "rake"
|
10
|
+
gem "rubocop"
|
11
11
|
gem "rubocop-rake"
|
12
12
|
gem "rubocop-rspec"
|
13
|
+
gem "rubocop-sorbet"
|
14
|
+
gem "sorbet"
|
15
|
+
gem "spoom", require: false
|
16
|
+
gem "tapioca", require: false
|
17
|
+
|
18
|
+
gem "ruby-lsp"
|
13
19
|
end
|
14
20
|
|
15
21
|
group :development, :test do
|
16
|
-
gem "rspec"
|
22
|
+
gem "rspec"
|
17
23
|
gem "sorbet-runtime"
|
18
24
|
gem "sorbet-struct-comparable"
|
19
25
|
gem "sqlite3"
|
26
|
+
|
27
|
+
gem "debug"
|
20
28
|
end
|
data/Gemfile.lock
CHANGED
@@ -3,86 +3,150 @@ PATH
|
|
3
3
|
specs:
|
4
4
|
activerecord-ejection_seat (0.1.0)
|
5
5
|
activerecord (>= 5.2)
|
6
|
+
sorbet-runtime
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
10
|
-
activemodel (7.0.
|
11
|
-
activesupport (= 7.0.
|
12
|
-
activerecord (7.0.
|
13
|
-
activemodel (= 7.0.
|
14
|
-
activesupport (= 7.0.
|
15
|
-
activesupport (7.0.
|
11
|
+
activemodel (7.0.4)
|
12
|
+
activesupport (= 7.0.4)
|
13
|
+
activerecord (7.0.4)
|
14
|
+
activemodel (= 7.0.4)
|
15
|
+
activesupport (= 7.0.4)
|
16
|
+
activesupport (7.0.4)
|
16
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
18
|
i18n (>= 1.6, < 2)
|
18
19
|
minitest (>= 5.1)
|
19
20
|
tzinfo (~> 2.0)
|
20
21
|
ast (2.4.2)
|
21
22
|
concurrent-ruby (1.1.10)
|
23
|
+
debug (1.7.0)
|
24
|
+
irb (>= 1.5.0)
|
25
|
+
reline (>= 0.3.1)
|
22
26
|
diff-lcs (1.5.0)
|
23
27
|
i18n (1.12.0)
|
24
28
|
concurrent-ruby (~> 1.0)
|
25
|
-
|
26
|
-
|
29
|
+
io-console (0.6.0)
|
30
|
+
irb (1.6.2)
|
31
|
+
reline (>= 0.3.0)
|
32
|
+
json (2.6.3)
|
33
|
+
language_server-protocol (3.17.0.2)
|
34
|
+
minitest (5.16.3)
|
35
|
+
netrc (0.11.0)
|
27
36
|
parallel (1.22.1)
|
28
|
-
parser (3.1.
|
37
|
+
parser (3.1.3.0)
|
29
38
|
ast (~> 2.4.1)
|
39
|
+
prettier_print (1.1.0)
|
30
40
|
rainbow (3.1.1)
|
31
41
|
rake (13.0.6)
|
32
|
-
|
42
|
+
rbi (0.0.16)
|
43
|
+
ast
|
44
|
+
parser (>= 2.6.4.0)
|
45
|
+
sorbet-runtime (>= 0.5.9204)
|
46
|
+
unparser
|
47
|
+
regexp_parser (2.6.1)
|
48
|
+
reline (0.3.2)
|
49
|
+
io-console (~> 0.5)
|
33
50
|
rexml (3.2.5)
|
34
|
-
rspec (3.
|
35
|
-
rspec-core (~> 3.
|
36
|
-
rspec-expectations (~> 3.
|
37
|
-
rspec-mocks (~> 3.
|
38
|
-
rspec-core (3.
|
39
|
-
rspec-support (~> 3.
|
40
|
-
rspec-expectations (3.
|
51
|
+
rspec (3.12.0)
|
52
|
+
rspec-core (~> 3.12.0)
|
53
|
+
rspec-expectations (~> 3.12.0)
|
54
|
+
rspec-mocks (~> 3.12.0)
|
55
|
+
rspec-core (3.12.0)
|
56
|
+
rspec-support (~> 3.12.0)
|
57
|
+
rspec-expectations (3.12.1)
|
41
58
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.
|
43
|
-
rspec-mocks (3.
|
59
|
+
rspec-support (~> 3.12.0)
|
60
|
+
rspec-mocks (3.12.1)
|
44
61
|
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.
|
46
|
-
rspec-support (3.
|
47
|
-
rubocop (1.
|
62
|
+
rspec-support (~> 3.12.0)
|
63
|
+
rspec-support (3.12.0)
|
64
|
+
rubocop (1.41.0)
|
48
65
|
json (~> 2.3)
|
49
66
|
parallel (~> 1.10)
|
50
|
-
parser (>= 3.1.
|
67
|
+
parser (>= 3.1.2.1)
|
51
68
|
rainbow (>= 2.2.2, < 4.0)
|
52
69
|
regexp_parser (>= 1.8, < 3.0)
|
53
70
|
rexml (>= 3.2.5, < 4.0)
|
54
|
-
rubocop-ast (>= 1.
|
71
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
55
72
|
ruby-progressbar (~> 1.7)
|
56
73
|
unicode-display_width (>= 1.4.0, < 3.0)
|
57
|
-
rubocop-ast (1.
|
74
|
+
rubocop-ast (1.24.0)
|
58
75
|
parser (>= 3.1.1.0)
|
59
76
|
rubocop-rake (0.6.0)
|
60
77
|
rubocop (~> 1.0)
|
61
|
-
rubocop-rspec (2.
|
62
|
-
rubocop (~> 1.
|
78
|
+
rubocop-rspec (2.16.0)
|
79
|
+
rubocop (~> 1.33)
|
80
|
+
rubocop-sorbet (0.6.11)
|
81
|
+
rubocop (>= 0.90.0)
|
82
|
+
ruby-lsp (0.3.7)
|
83
|
+
language_server-protocol (~> 3.17.0)
|
84
|
+
sorbet-runtime
|
85
|
+
syntax_tree (>= 4.0.2, < 5.0.0)
|
63
86
|
ruby-progressbar (1.11.0)
|
64
|
-
sorbet
|
87
|
+
sorbet (0.5.10597)
|
88
|
+
sorbet-static (= 0.5.10597)
|
89
|
+
sorbet-runtime (0.5.10597)
|
90
|
+
sorbet-static (0.5.10597-universal-darwin-21)
|
91
|
+
sorbet-static (0.5.10597-universal-darwin-22)
|
92
|
+
sorbet-static (0.5.10597-x86_64-linux)
|
93
|
+
sorbet-static-and-runtime (0.5.10597)
|
94
|
+
sorbet (= 0.5.10597)
|
95
|
+
sorbet-runtime (= 0.5.10597)
|
65
96
|
sorbet-struct-comparable (1.3.0)
|
66
97
|
sorbet-runtime (>= 0.5)
|
67
|
-
|
68
|
-
|
98
|
+
spoom (1.1.15)
|
99
|
+
sorbet (>= 0.5.10187)
|
100
|
+
sorbet-runtime (>= 0.5.9204)
|
101
|
+
thor (>= 0.19.2)
|
102
|
+
sqlite3 (1.5.4-arm64-darwin)
|
103
|
+
sqlite3 (1.5.4-x86_64-linux)
|
104
|
+
syntax_tree (4.3.0)
|
105
|
+
prettier_print (>= 1.0.2)
|
106
|
+
tapioca (0.10.4)
|
107
|
+
bundler (>= 1.17.3)
|
108
|
+
netrc (>= 0.11.0)
|
109
|
+
parallel (>= 1.21.0)
|
110
|
+
rbi (~> 0.0.0, >= 0.0.16)
|
111
|
+
sorbet-static-and-runtime (>= 0.5.10187)
|
112
|
+
spoom (~> 1.1.0, >= 1.1.11)
|
113
|
+
thor (>= 1.2.0)
|
114
|
+
yard-sorbet
|
115
|
+
thor (1.2.1)
|
116
|
+
tzinfo (2.0.5)
|
69
117
|
concurrent-ruby (~> 1.0)
|
70
|
-
unicode-display_width (2.
|
118
|
+
unicode-display_width (2.3.0)
|
119
|
+
unparser (0.6.5)
|
120
|
+
diff-lcs (~> 1.3)
|
121
|
+
parser (>= 3.1.0)
|
122
|
+
webrick (1.7.0)
|
123
|
+
yard (0.9.28)
|
124
|
+
webrick (~> 1.7.0)
|
125
|
+
yard-sorbet (0.7.0)
|
126
|
+
sorbet-runtime (>= 0.5)
|
127
|
+
yard (>= 0.9)
|
71
128
|
|
72
129
|
PLATFORMS
|
73
130
|
arm64-darwin-21
|
131
|
+
arm64-darwin-22
|
74
132
|
x86_64-linux
|
75
133
|
|
76
134
|
DEPENDENCIES
|
77
135
|
activerecord-ejection_seat!
|
78
|
-
|
79
|
-
|
80
|
-
|
136
|
+
debug
|
137
|
+
rake
|
138
|
+
rspec
|
139
|
+
rubocop
|
81
140
|
rubocop-rake
|
82
141
|
rubocop-rspec
|
142
|
+
rubocop-sorbet
|
143
|
+
ruby-lsp
|
144
|
+
sorbet
|
83
145
|
sorbet-runtime
|
84
146
|
sorbet-struct-comparable
|
147
|
+
spoom
|
85
148
|
sqlite3
|
149
|
+
tapioca
|
86
150
|
|
87
151
|
BUNDLED WITH
|
88
|
-
2.3.
|
152
|
+
2.3.26
|
data/README.md
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# ActiveRecord::EjectionSeat
|
2
2
|
|
3
|
+
[![IMAGE ALT TEXT](https://img.youtube.com/vi/HfCY-bkVJKM/0.jpg)](http://www.youtube.com/watch?v=HfCY-bkVJKM "Introduction to activerecord-ejection_seat")
|
4
|
+
|
3
5
|
## ActiveRecord <=> T::Struct
|
4
6
|
|
5
7
|
Sometimes, you want to convert from an `ActiveRecord` model to something more akin to a simple data class. Enter [Sorbet's `T::Struct`](https://sorbet.org/docs/tstruct). This gem helps to eject out of bulky `ActiveRecord` models (or buckle into them) and work with simple `T::Struct`'s in the rest of your app.
|
6
8
|
|
9
|
+
For more information about the "why" behind this gem, check out [this post](https://maxveld.ink/ejecting-out-of-an-orm/).
|
10
|
+
|
7
11
|
## Installation
|
8
12
|
|
9
13
|
Install the gem and add to the application's Gemfile by executing:
|
data/Rakefile
CHANGED
@@ -7,6 +7,18 @@ RSpec::Core::RakeTask.new(:spec)
|
|
7
7
|
|
8
8
|
require "rubocop/rake_task"
|
9
9
|
|
10
|
-
RuboCop::RakeTask.new
|
10
|
+
RuboCop::RakeTask.new do |t|
|
11
|
+
t.options = ["-A"]
|
12
|
+
end
|
11
13
|
|
12
|
-
|
14
|
+
desc "Run tapioca compilers"
|
15
|
+
task :tapioca do
|
16
|
+
sh "bin/tapioca gem"
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Run Sorbet typechecker"
|
20
|
+
task :sorbet do
|
21
|
+
sh "bundle exec srb tc"
|
22
|
+
end
|
23
|
+
|
24
|
+
task default: %i[rubocop sorbet spec]
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "active_record"
|
@@ -18,7 +19,7 @@ module ActiveRecord
|
|
18
19
|
attrs = attributes.deep_symbolize_keys
|
19
20
|
attribute_props = klass.props.keys & attrs.keys
|
20
21
|
|
21
|
-
klass.new(attrs.slice(*attribute_props))
|
22
|
+
klass.new(PropsBuilder.new(attrs.slice(*attribute_props), klass.props).build)
|
22
23
|
end
|
23
24
|
|
24
25
|
alias_method :to_struct, :eject
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "sorbet-runtime"
|
5
|
+
|
6
|
+
# Creates initialization payload for targeted T::Struct
|
7
|
+
class PropsBuilder
|
8
|
+
extend T::Sig
|
9
|
+
|
10
|
+
Attributes = T.type_alias { T::Hash[Symbol, T.untyped] }
|
11
|
+
|
12
|
+
sig do
|
13
|
+
params(
|
14
|
+
attributes_from_model: Attributes,
|
15
|
+
target_props: Attributes
|
16
|
+
).void
|
17
|
+
end
|
18
|
+
def initialize(attributes_from_model, target_props)
|
19
|
+
@attributes_from_model = attributes_from_model
|
20
|
+
@target_props = target_props
|
21
|
+
end
|
22
|
+
|
23
|
+
sig { returns(Attributes) }
|
24
|
+
def build
|
25
|
+
built_props = {}
|
26
|
+
|
27
|
+
attributes_from_model.each do |k, v|
|
28
|
+
prop_type = target_props.dig(k, :type)
|
29
|
+
|
30
|
+
built_props[k] = if prop_type < T::Enum
|
31
|
+
prop_type.deserialize(v)
|
32
|
+
else
|
33
|
+
v
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
built_props
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
sig { returns(Attributes) }
|
43
|
+
attr_reader :attributes_from_model, :target_props
|
44
|
+
end
|
@@ -1,11 +1,13 @@
|
|
1
1
|
# rubocop:disable Naming/FileName
|
2
|
+
# rubocop:enable Naming/FileName
|
3
|
+
# typed: false
|
2
4
|
# frozen_string_literal: true
|
3
5
|
|
4
6
|
require_relative "activerecord-ejection_seat/version"
|
7
|
+
require_relative "activerecord-ejection_seat/props_builder"
|
5
8
|
|
6
9
|
require "active_support/lazy_load_hooks"
|
7
10
|
|
8
11
|
ActiveSupport.on_load(:active_record) do
|
9
12
|
require "activerecord-ejection_seat/ejectable"
|
10
13
|
end
|
11
|
-
# rubocop:enable Naming/FileName
|
data/sorbet/config
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# typed: strict
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
class ActiveRecord::Schema
|
8
|
+
sig { params(info: T::Hash[T.untyped, T.untyped], blk: T.proc.bind(ActiveRecord::Schema).void).void }
|
9
|
+
def self.define(info = nil, &blk); end
|
10
|
+
end
|
11
|
+
|
12
|
+
class ActiveRecord::Migration
|
13
|
+
# @shim: Methods on migration are delegated to `SchemaStatements` using `method_missing`
|
14
|
+
include ActiveRecord::ConnectionAdapters::SchemaStatements
|
15
|
+
|
16
|
+
# @shim: Methods on migration are delegated to `DatabaseaStatements` using `method_missing`
|
17
|
+
include ActiveRecord::ConnectionAdapters::DatabaseStatements
|
18
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# typed: strict
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
module ActiveSupport::Testing::Declarative
|
8
|
+
sig { params(name: String, block: T.proc.bind(T.untyped).void).void }
|
9
|
+
def test(name, &block); end
|
10
|
+
end
|
11
|
+
|
12
|
+
class ActiveSupport::EnvironmentInquirer
|
13
|
+
sig { returns(T::Boolean) }
|
14
|
+
def development?; end
|
15
|
+
|
16
|
+
sig { returns(T::Boolean) }
|
17
|
+
def production?; end
|
18
|
+
|
19
|
+
sig { returns(T::Boolean) }
|
20
|
+
def test?; end
|
21
|
+
|
22
|
+
# @method_missing: delegated to String through ActiveSupport::StringInquirer
|
23
|
+
sig { returns(T::Boolean) }
|
24
|
+
def staging?; end
|
25
|
+
end
|
26
|
+
|
27
|
+
module ActiveSupport::Testing::SetupAndTeardown::ClassMethods
|
28
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void }
|
29
|
+
def setup(*args, &block); end
|
30
|
+
|
31
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void }
|
32
|
+
def teardown(*args, &block); end
|
33
|
+
end
|
34
|
+
|
35
|
+
class ActiveSupport::TestCase
|
36
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void }
|
37
|
+
def self.setup(*args, &block); end
|
38
|
+
|
39
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void }
|
40
|
+
def self.teardown(*args, &block); end
|
41
|
+
|
42
|
+
sig { params(name: String, block: T.proc.bind(T.attached_class).void).void }
|
43
|
+
def self.test(name, &block); end
|
44
|
+
end
|
45
|
+
|
46
|
+
class Object
|
47
|
+
sig { returns(T::Boolean) }
|
48
|
+
def blank?; end
|
49
|
+
|
50
|
+
sig { returns(T::Boolean) }
|
51
|
+
def present?; end
|
52
|
+
end
|