parser_node_ext 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/parser_node_ext/version.rb +1 -1
- data/lib/parser_node_ext.rb +8 -0
- 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: fc6fc830978807e48ef5cc142cf9dfa32829e835020e31d09252f29d96d13e42
|
4
|
+
data.tar.gz: 3e44eee2fb5e4dafdf6c2070c49d934cee5d0dc5e1c9d56e7146d37628bed239
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ae876214f7a2d73764d2a34c04eba1205917120d5133bee4c32ccd1219ba3de1b5e5be69d9deb11d6d53d1aa0e7e8015d4e47b74441c8926ee779d5bcb40db5
|
7
|
+
data.tar.gz: 7c588aa80f8a762b8402f173adc902aded19e37821bf91ad0fb7ac5ab7ebf392c7b47f4f12ab31aba09a9b307a629ad3a9e5859f5bcf84515db2e674a899d511
|
data/Gemfile.lock
CHANGED
data/lib/parser_node_ext.rb
CHANGED
@@ -181,6 +181,14 @@ module ParserNodeExt
|
|
181
181
|
end
|
182
182
|
end
|
183
183
|
|
184
|
+
def pairs
|
185
|
+
if :hash == type
|
186
|
+
children
|
187
|
+
else
|
188
|
+
raise MethodNotSupported, "pairs is not supported for #{self}"
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
184
192
|
# Get keys of :hash node.
|
185
193
|
# @example
|
186
194
|
# node # s(:hash, s(:pair, s(:sym, :foo), s(:sym, :bar)), s(:pair, s(:str, "foo"), s(:str, "bar")))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parser_node_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|