orthoses-yard 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 +4 -4
- data/lib/orthoses/yard/version.rb +1 -1
- data/lib/orthoses/yard/yard2rbs.rb +12 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36b54b543b79745b042a7ec072d923adaf37d46a51e61477637a6b14ec2051bc
|
4
|
+
data.tar.gz: 5f591556c56266c92d83e58f6af2f9a970734b5f5c6f2b21894d93a350bf1f55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 712dbf70f932c3d5fdea40b6844e5a78a363f51b33bf96dfec250fd0e20d3ca61c2b13ac1320c6edf1e503cbb45d601f9a3da2416731bb6a8efe64a7a5d69426
|
7
|
+
data.tar.gz: a03f7ca554c4548f99ef07eaed0213fd68ab6aa4a5cc3f0dcd5bd7ce2386a81d800efc5aa28a9af0091b30d9b5afdfbe8bf4dff309f23460a9aba0b178db53a9
|
@@ -269,12 +269,21 @@ module Orthoses
|
|
269
269
|
)
|
270
270
|
end
|
271
271
|
else
|
272
|
+
name = TypeName(types_explainer_type.name)
|
273
|
+
type_params = temporary_type_params(name.to_s)
|
274
|
+
args = if 2 <= type_params.length
|
275
|
+
Orthoses.logger.warn("Cannot convert to rbs since generics mismatch. `#{name}` has #{type_params.length} generics in RBS. But YARD tag type is `#{types_explainer_type.to_s}`. Use `#{name}[#{type_params.join(', ')}]` instead.")
|
276
|
+
type_params
|
277
|
+
else
|
278
|
+
[type]
|
279
|
+
end
|
280
|
+
|
272
281
|
::RBS::Types::ClassInstance.new(
|
273
|
-
name:
|
274
|
-
args:
|
282
|
+
name: name,
|
283
|
+
args: args,
|
275
284
|
location: nil
|
276
285
|
)
|
277
|
-
|
286
|
+
end
|
278
287
|
when ::YARD::Tags::TypesExplainer::HashCollectionType
|
279
288
|
::RBS::Types::ClassInstance.new(
|
280
289
|
name: TypeName(types_explainer_type.name),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orthoses-yard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orthoses
|