rbs_activesupport 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccecb9129edd479a2f56c541fc90b0a6a2d97f72e757716767ff48c8d54b2400
|
4
|
+
data.tar.gz: df1a171c089788a1fd9e63c5cde999e92513973344943148baa39e8f29ea06ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9f43ad74fe99dcff010b3beed25ffbf58e923ae5d7d0a4aeaa7777f167eb2a0bdcd2ad215cf6c7b593948f975e326007d8b03ce22472a0cb153119a56fb1a7b
|
7
|
+
data.tar.gz: 5bbaefec682d46203cda74d49bd6e9eab1c7461afc6d13448d0056f93da5d1cd485ac790a4e415790e11abd57532fdf0bf8fcb61a48cc6189146539118ac0038
|
@@ -16,17 +16,32 @@ module RbsActivesupport
|
|
16
16
|
delegate_to = lookup_method_types(delegate.namespace.to_type_name, delegate.to)
|
17
17
|
return ["() -> untyped"] if delegate_to.any? { |t| t.type.return_type.is_a?(RBS::Types::Bases::Any) }
|
18
18
|
|
19
|
-
return_types = delegate_to
|
20
|
-
|
21
|
-
|
22
|
-
.flat_map { |t| lookup_method_types(t, delegate.method) }
|
23
|
-
.map(&:to_s)
|
19
|
+
return_types = return_type_names_for(delegate_to).uniq
|
20
|
+
.flat_map { |t| lookup_method_types(t, delegate.method) }
|
21
|
+
.map(&:to_s)
|
24
22
|
return_types << "() -> untyped" if return_types.empty?
|
25
23
|
return_types
|
26
24
|
end
|
27
25
|
|
28
26
|
private
|
29
27
|
|
28
|
+
# @rbs delegate_to: Array[RBS::MethodType]
|
29
|
+
def return_type_names_for(delegate_to) #: Array[RBS::TypeName]
|
30
|
+
delegate_to.filter_map do |t|
|
31
|
+
type_name_for(t.type.return_type)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# @rbs type: RBS::Types::t
|
36
|
+
def type_name_for(type) #: RBS::TypeName?
|
37
|
+
case type
|
38
|
+
when RBS::Types::Optional
|
39
|
+
type_name_for(type.type)
|
40
|
+
when RBS::Types::ClassSingleton, RBS::Types::ClassInstance, RBS::Types::Interface, RBS::Types::Alias
|
41
|
+
type.name
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
30
45
|
# @rbs type_name: RBS::TypeName
|
31
46
|
# @rbs method: Symbol
|
32
47
|
def lookup_method_types(type_name, method) #: Array[RBS::MethodType]
|
data/rbs_collection.lock.yaml
CHANGED
@@ -6,7 +6,7 @@ gems:
|
|
6
6
|
source:
|
7
7
|
type: git
|
8
8
|
name: ruby/gem_rbs_collection
|
9
|
-
revision:
|
9
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
10
10
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
11
11
|
repo_dir: gems
|
12
12
|
- name: actionview
|
@@ -14,7 +14,7 @@ gems:
|
|
14
14
|
source:
|
15
15
|
type: git
|
16
16
|
name: ruby/gem_rbs_collection
|
17
|
-
revision:
|
17
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
18
18
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
19
19
|
repo_dir: gems
|
20
20
|
- name: activesupport
|
@@ -22,7 +22,7 @@ gems:
|
|
22
22
|
source:
|
23
23
|
type: git
|
24
24
|
name: ruby/gem_rbs_collection
|
25
|
-
revision:
|
25
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
26
26
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
27
27
|
repo_dir: gems
|
28
28
|
- name: ast
|
@@ -30,7 +30,7 @@ gems:
|
|
30
30
|
source:
|
31
31
|
type: git
|
32
32
|
name: ruby/gem_rbs_collection
|
33
|
-
revision:
|
33
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
34
34
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
35
35
|
repo_dir: gems
|
36
36
|
- name: base64
|
@@ -50,7 +50,7 @@ gems:
|
|
50
50
|
source:
|
51
51
|
type: git
|
52
52
|
name: ruby/gem_rbs_collection
|
53
|
-
revision:
|
53
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
54
54
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
55
55
|
repo_dir: gems
|
56
56
|
- name: connection_pool
|
@@ -58,7 +58,7 @@ gems:
|
|
58
58
|
source:
|
59
59
|
type: git
|
60
60
|
name: ruby/gem_rbs_collection
|
61
|
-
revision:
|
61
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
62
62
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
63
63
|
repo_dir: gems
|
64
64
|
- name: date
|
@@ -82,7 +82,7 @@ gems:
|
|
82
82
|
source:
|
83
83
|
type: git
|
84
84
|
name: ruby/gem_rbs_collection
|
85
|
-
revision:
|
85
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
86
86
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
87
87
|
repo_dir: gems
|
88
88
|
- name: io-console
|
@@ -114,7 +114,7 @@ gems:
|
|
114
114
|
source:
|
115
115
|
type: git
|
116
116
|
name: ruby/gem_rbs_collection
|
117
|
-
revision:
|
117
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
118
118
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
119
119
|
repo_dir: gems
|
120
120
|
- name: optparse
|
@@ -126,7 +126,7 @@ gems:
|
|
126
126
|
source:
|
127
127
|
type: git
|
128
128
|
name: ruby/gem_rbs_collection
|
129
|
-
revision:
|
129
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
130
130
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
131
131
|
repo_dir: gems
|
132
132
|
- name: parser
|
@@ -134,7 +134,7 @@ gems:
|
|
134
134
|
source:
|
135
135
|
type: git
|
136
136
|
name: ruby/gem_rbs_collection
|
137
|
-
revision:
|
137
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
138
138
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
139
139
|
repo_dir: gems
|
140
140
|
- name: pathname
|
@@ -154,7 +154,7 @@ gems:
|
|
154
154
|
source:
|
155
155
|
type: git
|
156
156
|
name: ruby/gem_rbs_collection
|
157
|
-
revision:
|
157
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
158
158
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
159
159
|
repo_dir: gems
|
160
160
|
- name: rails-dom-testing
|
@@ -162,7 +162,7 @@ gems:
|
|
162
162
|
source:
|
163
163
|
type: git
|
164
164
|
name: ruby/gem_rbs_collection
|
165
|
-
revision:
|
165
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
166
166
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
167
167
|
repo_dir: gems
|
168
168
|
- name: railties
|
@@ -170,7 +170,7 @@ gems:
|
|
170
170
|
source:
|
171
171
|
type: git
|
172
172
|
name: ruby/gem_rbs_collection
|
173
|
-
revision:
|
173
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
174
174
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
175
175
|
repo_dir: gems
|
176
176
|
- name: rainbow
|
@@ -178,7 +178,7 @@ gems:
|
|
178
178
|
source:
|
179
179
|
type: git
|
180
180
|
name: ruby/gem_rbs_collection
|
181
|
-
revision:
|
181
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
182
182
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
183
183
|
repo_dir: gems
|
184
184
|
- name: rake
|
@@ -186,7 +186,7 @@ gems:
|
|
186
186
|
source:
|
187
187
|
type: git
|
188
188
|
name: ruby/gem_rbs_collection
|
189
|
-
revision:
|
189
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
190
190
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
191
191
|
repo_dir: gems
|
192
192
|
- name: rbs
|
@@ -202,7 +202,7 @@ gems:
|
|
202
202
|
source:
|
203
203
|
type: git
|
204
204
|
name: ruby/gem_rbs_collection
|
205
|
-
revision:
|
205
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
206
206
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
207
207
|
repo_dir: gems
|
208
208
|
- name: ripper
|
@@ -214,7 +214,7 @@ gems:
|
|
214
214
|
source:
|
215
215
|
type: git
|
216
216
|
name: ruby/gem_rbs_collection
|
217
|
-
revision:
|
217
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
218
218
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
219
219
|
repo_dir: gems
|
220
220
|
- name: rubocop-ast
|
@@ -222,7 +222,7 @@ gems:
|
|
222
222
|
source:
|
223
223
|
type: git
|
224
224
|
name: ruby/gem_rbs_collection
|
225
|
-
revision:
|
225
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
226
226
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
227
227
|
repo_dir: gems
|
228
228
|
- name: securerandom
|
@@ -246,7 +246,7 @@ gems:
|
|
246
246
|
source:
|
247
247
|
type: git
|
248
248
|
name: ruby/gem_rbs_collection
|
249
|
-
revision:
|
249
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
250
250
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
251
251
|
repo_dir: gems
|
252
252
|
- name: time
|
@@ -266,7 +266,7 @@ gems:
|
|
266
266
|
source:
|
267
267
|
type: git
|
268
268
|
name: ruby/gem_rbs_collection
|
269
|
-
revision:
|
269
|
+
revision: f88536536950701925e9293f7fa7d3629965c53f
|
270
270
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
271
271
|
repo_dir: gems
|
272
272
|
- name: uri
|
@@ -12,6 +12,12 @@ module RbsActivesupport
|
|
12
12
|
|
13
13
|
private
|
14
14
|
|
15
|
+
# @rbs delegate_to: Array[RBS::MethodType]
|
16
|
+
def return_type_names_for: (Array[RBS::MethodType] delegate_to) -> Array[RBS::TypeName]
|
17
|
+
|
18
|
+
# @rbs type: RBS::Types::t
|
19
|
+
def type_name_for: (RBS::Types::t type) -> RBS::TypeName?
|
20
|
+
|
15
21
|
# @rbs type_name: RBS::TypeName
|
16
22
|
# @rbs method: Symbol
|
17
23
|
def lookup_method_types: (RBS::TypeName type_name, Symbol method) -> Array[RBS::MethodType]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs_activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takeshi KOMIYA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|