syntax_tree_ext 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/lib/syntax_tree_ext/version.rb +1 -1
- data/lib/syntax_tree_ext.rb +1 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1652ff82c38eae093e5149cee9890481a7785cd02f3abb6b9b96d413afd9c770
|
4
|
+
data.tar.gz: c20755aeddb8801aa87966642b342f085c25d444fb65d77298681a84393590ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7546c74ea30c030c3f51a47b98e6446e3bca4e5e55575329eed52090e3151d43f5305e3190208d9fdaeb5d605a9a2abee37e0690d4aaf5525fffd8b1e33a4165
|
7
|
+
data.tar.gz: a8a4b6837c0c2a4770e6e1a6b51d72dd13c80e52339be8a5aa91a93a0af5c13c5b1d12650d2bdb2e30f586a10603deb0b7c5dbede845167d8c14ddf24d40fdb9
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/syntax_tree_ext.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative "syntax_tree_ext/version"
|
|
4
4
|
|
5
5
|
require 'syntax_tree'
|
6
6
|
require_relative "syntax_tree_ext/source_ext"
|
7
|
+
require_relative "syntax_tree_ext/parent_node_ext"
|
7
8
|
|
8
9
|
module SyntaxTreeExt
|
9
10
|
class Error < StandardError; end
|
@@ -20,14 +21,6 @@ module SyntaxTree
|
|
20
21
|
assocs.map(&:value)
|
21
22
|
end
|
22
23
|
|
23
|
-
def hash_assoc(key)
|
24
|
-
assocs.find { |assoc_node| assoc_node.key.to_value == key }
|
25
|
-
end
|
26
|
-
|
27
|
-
def hash_value(key)
|
28
|
-
assocs.find { |assoc_node| assoc_node.key.to_value == key }&.value
|
29
|
-
end
|
30
|
-
|
31
24
|
# Respond key value and source for hash node
|
32
25
|
def method_missing(method_name, *args, &block)
|
33
26
|
if method_name.to_s.end_with?('_assoc')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syntax_tree_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: syntax_tree
|
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '0'
|
65
65
|
requirements: []
|
66
|
-
rubygems_version: 3.5.
|
66
|
+
rubygems_version: 3.5.14
|
67
67
|
signing_key:
|
68
68
|
specification_version: 4
|
69
69
|
summary: extend syntax_tree
|