method_parser 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data/lib/method_parser.rb +8 -6
- data.tar.gz.sig +0 -0
- metadata +39 -35
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: eb67340230b5ced6cb711b0a8ea38431351a9f51b844aa5c20541f6846921277
|
4
|
+
data.tar.gz: 471cd622b0a8b2593f25b993de8b1ddd12e27975c710589a5798af591717bed5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8478e6f29ed0eee4830901e17385277539eac4aa30a9ee3213e6ed2375f63ab552b66ef7b74f6c9376c1b79f63b89227d7780391d52a124f111d96aeca609d1
|
7
|
+
data.tar.gz: dc46ba02b90e8790c4331ce4a0082b99f9e4e07474c9e85263123e07085bf5d0f8dae1c7fb61ae35d1f27af2914d2894f064887c5e47a7d55b6e43f1de77941d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/method_parser.rb
CHANGED
@@ -11,7 +11,9 @@ class MethodParser
|
|
11
11
|
attr_reader :to_a
|
12
12
|
|
13
13
|
def initialize(s)
|
14
|
-
|
14
|
+
a = scan Parser::CurrentRuby.parse(s)
|
15
|
+
a2 = flatten_down(a)
|
16
|
+
@to_a = nestify(a2)
|
15
17
|
end
|
16
18
|
|
17
19
|
def to_xml
|
@@ -23,8 +25,8 @@ class MethodParser
|
|
23
25
|
container, name, children = x
|
24
26
|
xml.send(container.to_s.sub(/^c/,'k').to_sym, name: name.to_s) do
|
25
27
|
children.each do |y|
|
26
|
-
_, name, scope = y.map(&:to_s)
|
27
|
-
xml.send(y.first, name: name, scope: scope)
|
28
|
+
_, name, scope, args = y[0..2].map(&:to_s) << y[-1]
|
29
|
+
xml.send(y.first, name: name, scope: scope, args: args.join(', '))
|
28
30
|
end
|
29
31
|
end
|
30
32
|
end
|
@@ -52,7 +54,7 @@ class MethodParser
|
|
52
54
|
a2 = case x.type
|
53
55
|
|
54
56
|
when :def
|
55
|
-
[x.type, x.to_a.first]
|
57
|
+
[x.type, x.to_a.first, x.children[1].children.map{|x| x.children[0]}]
|
56
58
|
when :class
|
57
59
|
[x.type, x.to_a.first.to_a[1]]
|
58
60
|
|
@@ -98,9 +100,9 @@ class MethodParser
|
|
98
100
|
case mx.first
|
99
101
|
when :def
|
100
102
|
|
101
|
-
method = mx
|
103
|
+
method = mx[1]
|
102
104
|
r.last.last <<
|
103
|
-
[:def, method, method == :initialize ? :private : scope]
|
105
|
+
[:def, method, method == :initialize ? :private : scope, mx[2]]
|
104
106
|
when :private
|
105
107
|
scope = :private
|
106
108
|
when :protected
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: method_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,33 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIEljCCAv6gAwIBAgIBATANBgkqhkiG9w0BAQsFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTIzMDMwMjA4NTE0OFoXDTI0MDMwMTA4NTE0OFowSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
|
-
E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BgQCVnDMlu4JzigMcxYPuirDXKGEGiwEE
|
30
|
+
GHmQgy3u1VC37V/2DRBC5FyZPqS44P8dN6hxYTMAtYOvQAaYhos1JMzTAHBUClsL
|
31
|
+
kLls0zT3hbLLMG6Wd91iTRB1ScnQiP5zH/Bg0Slldr2Np9g63tjM0XxKftj1zxy/
|
32
|
+
iF+2KvbtufAlsjjzoU6y+An2uwHZHImZwmjDkk6uaHTmlhzs62ZkgrNrvyPRRx6o
|
33
|
+
AU3Qyxw/T51SuIoO4XJWYfig076j+V4J3lllNP4pRSUTewfimirquUZ0MqEATWTK
|
34
|
+
SO1/I80/TwPoIrA17UOZQjVKIJR99JHXw5a1VKWnSzxC2o9OdS3RmfSB7a8o1/0M
|
35
|
+
ZuRWkSwCUbFPEVUTvaKl2zXaH9/ZRipDl2fgQuaxbl4cEcMyOj0nqvd0i2zyiLJk
|
36
|
+
ryaLH3SE1A9fxkWzCDV5LiLF1VqfUoqza6lhMuSqrtovrtMbNPwq4oip4xARoBIr
|
37
|
+
ZjeQZqCgGJ/3avZa7OHaJT7vo/rej2LtB8s=
|
33
38
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
39
|
+
date: 2023-03-02 00:00:00.000000000 Z
|
35
40
|
dependencies:
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: parser
|
@@ -39,62 +44,62 @@ dependencies:
|
|
39
44
|
requirements:
|
40
45
|
- - "~>"
|
41
46
|
- !ruby/object:Gem::Version
|
42
|
-
version: '2
|
47
|
+
version: '3.2'
|
43
48
|
- - ">="
|
44
49
|
- !ruby/object:Gem::Version
|
45
|
-
version: 2.
|
50
|
+
version: 3.2.10
|
46
51
|
type: :runtime
|
47
52
|
prerelease: false
|
48
53
|
version_requirements: !ruby/object:Gem::Requirement
|
49
54
|
requirements:
|
50
55
|
- - "~>"
|
51
56
|
- !ruby/object:Gem::Version
|
52
|
-
version: '2
|
57
|
+
version: '3.2'
|
53
58
|
- - ">="
|
54
59
|
- !ruby/object:Gem::Version
|
55
|
-
version: 2.
|
60
|
+
version: 3.2.10
|
56
61
|
- !ruby/object:Gem::Dependency
|
57
62
|
name: rexle-builder
|
58
63
|
requirement: !ruby/object:Gem::Requirement
|
59
64
|
requirements:
|
60
65
|
- - "~>"
|
61
66
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0
|
67
|
+
version: '1.0'
|
63
68
|
- - ">="
|
64
69
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
70
|
+
version: 1.0.8
|
66
71
|
type: :runtime
|
67
72
|
prerelease: false
|
68
73
|
version_requirements: !ruby/object:Gem::Requirement
|
69
74
|
requirements:
|
70
75
|
- - "~>"
|
71
76
|
- !ruby/object:Gem::Version
|
72
|
-
version: '0
|
77
|
+
version: '1.0'
|
73
78
|
- - ">="
|
74
79
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
80
|
+
version: 1.0.8
|
76
81
|
- !ruby/object:Gem::Dependency
|
77
82
|
name: rexle
|
78
83
|
requirement: !ruby/object:Gem::Requirement
|
79
84
|
requirements:
|
80
85
|
- - "~>"
|
81
86
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
87
|
+
version: '1.5'
|
83
88
|
- - ">="
|
84
89
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.
|
90
|
+
version: 1.5.14
|
86
91
|
type: :runtime
|
87
92
|
prerelease: false
|
88
93
|
version_requirements: !ruby/object:Gem::Requirement
|
89
94
|
requirements:
|
90
95
|
- - "~>"
|
91
96
|
- !ruby/object:Gem::Version
|
92
|
-
version: '1.
|
97
|
+
version: '1.5'
|
93
98
|
- - ">="
|
94
99
|
- !ruby/object:Gem::Version
|
95
|
-
version: 1.
|
100
|
+
version: 1.5.14
|
96
101
|
description:
|
97
|
-
email:
|
102
|
+
email: digital.robertson@gmail.com
|
98
103
|
executables: []
|
99
104
|
extensions: []
|
100
105
|
extra_rdoc_files: []
|
@@ -119,8 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
124
|
- !ruby/object:Gem::Version
|
120
125
|
version: '0'
|
121
126
|
requirements: []
|
122
|
-
|
123
|
-
rubygems_version: 2.2.2
|
127
|
+
rubygems_version: 3.4.4
|
124
128
|
signing_key:
|
125
129
|
specification_version: 4
|
126
130
|
summary: Uses the Parser gem to primarily return the defined methods for the class
|
metadata.gz.sig
CHANGED
Binary file
|