node_mutation 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/node_mutation/parser_adapter.rb +9 -5
- data/lib/node_mutation/version.rb +1 -1
- 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: 3e22702ce72aa488794a76e0d762283155783d56e1af0e5135ad91d768a917ab
|
4
|
+
data.tar.gz: 4b0c210a8c94cc46bfce28570164210cc2f54bb768df1b470ea3c27e8f2a7c98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22d09f324deb8982994201df87bfcf21562576def43034ac9a5f0a0599ee264df8852a0cde609dc41098d314b9fed7ec70e135a51c0ffe8c9ffa293f2436820c
|
7
|
+
data.tar.gz: a0348978965f9e3fdbdfe20bba6ad40830f1b1f039859f2fafecaa4329f4f81d52cee64f5bcbaf69c32229b75126cb9554c55256fb421134073d19de2759c2bb
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -161,14 +161,18 @@ class NodeMutation::ParserAdapter < NodeMutation::Adapter
|
|
161
161
|
|
162
162
|
if node.respond_to?(direct_child_name)
|
163
163
|
child_node = node.send(direct_child_name)
|
164
|
+
elsif direct_child_name.include?('(') && direct_child_name.include?(')')
|
165
|
+
child_node = eval("node.#{direct_child_name}")
|
166
|
+
else
|
167
|
+
child_node = nil
|
168
|
+
end
|
164
169
|
|
165
|
-
|
170
|
+
return child_node_by_name(child_node, nested_child_name) if nested_child_name
|
166
171
|
|
167
|
-
|
172
|
+
return nil if child_node.nil?
|
168
173
|
|
169
|
-
|
174
|
+
return child_node if child_node.is_a?(Parser::AST::Node)
|
170
175
|
|
171
|
-
|
172
|
-
end
|
176
|
+
return child_node
|
173
177
|
end
|
174
178
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: node_mutation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.4
|
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-09-
|
11
|
+
date: 2022-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|