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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9bee187df49c963339ad5b6ed34721fb558e93b066593ac8fdf34ae453932f4
4
- data.tar.gz: 960b04b95fb1ae5414d4ca820f22e1b2ae117c47e2d4502c9503848fc5048c19
3
+ metadata.gz: fc6fc830978807e48ef5cc142cf9dfa32829e835020e31d09252f29d96d13e42
4
+ data.tar.gz: 3e44eee2fb5e4dafdf6c2070c49d934cee5d0dc5e1c9d56e7146d37628bed239
5
5
  SHA512:
6
- metadata.gz: 6a1432adf0618a77279d580ae9ad8de92a5e601c15256bedbafd870d3f46348c07143c11e25c4e3717dd6de19a99f22f1ce0306247ef5ad0f9529799d04fe0e1
7
- data.tar.gz: 84e0d2ed48ba5650714e0bf994b43b7d9ef8f1191cf24941bf8a376963128145cbb970adb05f3e22f60ba6184d31f598f3b38b1a333b3d8a541149f3298cf9b5
6
+ metadata.gz: 8ae876214f7a2d73764d2a34c04eba1205917120d5133bee4c32ccd1219ba3de1b5e5be69d9deb11d6d53d1aa0e7e8015d4e47b74441c8926ee779d5bcb40db5
7
+ data.tar.gz: 7c588aa80f8a762b8402f173adc902aded19e37821bf91ad0fb7ac5ab7ebf392c7b47f4f12ab31aba09a9b307a629ad3a9e5859f5bcf84515db2e674a899d511
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parser_node_ext (0.5.0)
4
+ parser_node_ext (0.5.1)
5
5
  parser
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ParserNodeExt
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
@@ -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.0
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-25 00:00:00.000000000 Z
11
+ date: 2022-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser