decode 0.17.2 → 0.17.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/decode/definition.rb +6 -2
- data/lib/decode/index.rb +0 -1
- data/lib/decode/language/ruby/class.rb +14 -6
- data/lib/decode/language/ruby/module.rb +8 -3
- data/lib/decode/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- 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: a838fd5f42db321e8afe7627740faca8a0bce85e66016b1a9f5eac4c1b800e13
|
4
|
+
data.tar.gz: 2d2e88c8dfbddaf2507f8b94ef7b3678247640ff48768dd8971afe4bca32a579
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fd7f4dc09a37c14d87750e3cf12ed22f6352877a382ab6a08f8571b48d774761fa2deb6dcc7382bb43868361774816d018c086f3ae2e0b0908a89c8e9704154
|
7
|
+
data.tar.gz: e6b60875db3b53417736599852a9354eabbdc08503b3dda594bd364df7c98fa84702303917f27c7850054ab40d0f5c25b018a0a9919bf07a9e7d922cd8b480fb
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/decode/definition.rb
CHANGED
@@ -97,13 +97,17 @@ module Decode
|
|
97
97
|
@path
|
98
98
|
elsif @parent
|
99
99
|
# Merge with parent:
|
100
|
-
@path = [*@parent.path,
|
100
|
+
@path = [*@parent.path, *path_name].freeze
|
101
101
|
else
|
102
102
|
# At top:
|
103
|
-
@path =
|
103
|
+
@path = path_name.freeze
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
def path_name
|
108
|
+
[@name]
|
109
|
+
end
|
110
|
+
|
107
111
|
alias lexical_path path
|
108
112
|
|
109
113
|
# A short form of the definition.
|
data/lib/decode/index.rb
CHANGED
@@ -37,18 +37,22 @@ module Decode
|
|
37
37
|
# The short form of the class.
|
38
38
|
# e.g. `class Animal`.
|
39
39
|
def short_form
|
40
|
-
"class #{
|
40
|
+
"class #{path_name.last}"
|
41
41
|
end
|
42
42
|
|
43
43
|
# The long form of the class.
|
44
44
|
# e.g. `class Dog < Animal`.
|
45
45
|
def long_form
|
46
|
-
if
|
47
|
-
|
48
|
-
super_node.location.expression
|
49
|
-
).source
|
46
|
+
if super_class = self.super_class
|
47
|
+
"#{qualified_form} < #{super_class}"
|
50
48
|
else
|
51
|
-
|
49
|
+
qualified_form
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def super_class
|
54
|
+
if super_node = @node.children[1]
|
55
|
+
super_node.location.expression.source
|
52
56
|
end
|
53
57
|
end
|
54
58
|
|
@@ -57,6 +61,10 @@ module Decode
|
|
57
61
|
def qualified_form
|
58
62
|
"class #{self.qualified_name}"
|
59
63
|
end
|
64
|
+
|
65
|
+
def path_name
|
66
|
+
@name.to_s.split('::').map(&:to_sym)
|
67
|
+
end
|
60
68
|
end
|
61
69
|
|
62
70
|
# A Ruby-specific singleton class.
|
@@ -37,17 +37,22 @@ module Decode
|
|
37
37
|
# The short form of the module.
|
38
38
|
# e.g. `module Barnyard`.
|
39
39
|
def short_form
|
40
|
-
"module #{
|
40
|
+
"module #{path_name.last}"
|
41
41
|
end
|
42
42
|
|
43
|
-
|
44
|
-
|
43
|
+
def long_form
|
44
|
+
qualified_form
|
45
|
+
end
|
45
46
|
|
46
47
|
# The fully qualified name of the class.
|
47
48
|
# e.g. `module ::Barnyard::Dog`.
|
48
49
|
def qualified_form
|
49
50
|
"module #{self.qualified_name}"
|
50
51
|
end
|
52
|
+
|
53
|
+
def path_name
|
54
|
+
@name.to_s.split('::').map(&:to_sym)
|
55
|
+
end
|
51
56
|
end
|
52
57
|
end
|
53
58
|
end
|
data/lib/decode/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
|
37
37
|
HiLJ8VOFx6w=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date:
|
39
|
+
date: 2022-05-13 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: parser
|
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
|
-
rubygems_version: 3.
|
180
|
+
rubygems_version: 3.3.7
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: Code analysis for documentation generation.
|
metadata.gz.sig
CHANGED
Binary file
|