decode 0.24.1 → 0.24.2
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/decode/rbs/generator.rb +4 -4
- data/lib/decode/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6a3ca54cbbfe55c6946466efdeef71ee9b103ceb59ab27c313a9e3a4345264b
|
4
|
+
data.tar.gz: 00fe1c5faa769e7daa607cd46a48920ad04b4926493e1b841154d9a5f193b12a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 288e3c278877013c633055242d28c1f2097ca38576896f86d486ee56f1ef3e246af36dce75d30c9c364cd65b9d4928b875b0f7d384c485efde3b27cad8658b14
|
7
|
+
data.tar.gz: debf415bab150aaeb345e3013bc6d07896ccf02006e0787eef2ba73754b9c02725007df042e397bedfc02d0b7b8acc266a946535acafcc6d03bd4e069836a937
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/decode/rbs/generator.rb
CHANGED
@@ -26,18 +26,18 @@ module Decode
|
|
26
26
|
def generate(index, output: $stdout)
|
27
27
|
# Build nested RBS AST structure using a hash for proper ||= behavior
|
28
28
|
declarations = {}
|
29
|
-
roots =
|
29
|
+
roots = {}
|
30
30
|
|
31
31
|
# Efficiently traverse the trie to find containers and their methods
|
32
32
|
index.trie.traverse do |lexical_path, node, descend|
|
33
33
|
# Process container definitions at this node
|
34
34
|
if node.values
|
35
|
-
containers = node.values.select
|
35
|
+
containers = node.values.select{|definition| definition.container? && definition.public?}
|
36
36
|
containers.each do |definition|
|
37
37
|
case definition
|
38
38
|
when Decode::Language::Ruby::Class, Decode::Language::Ruby::Module
|
39
39
|
if declaration = build_nested_declaration(definition, declarations, index)
|
40
|
-
roots
|
40
|
+
roots[definition.qualified_name] ||= declaration
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -51,7 +51,7 @@ module Decode
|
|
51
51
|
writer = ::RBS::Writer.new(out: output)
|
52
52
|
|
53
53
|
unless roots.empty?
|
54
|
-
writer.write(roots)
|
54
|
+
writer.write(roots.values)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
data/lib/decode/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|