prism_ext 0.2.0 → 0.2.1
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/prism_ext/version.rb +1 -1
- data/lib/prism_ext.rb +8 -2
- 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: 5579e7f3f46ecbe569deead151875c5a0b4c55ca6b1694c281c206b63c02a806
|
4
|
+
data.tar.gz: c8ea4497448ce416a62261bd0fa217a8080fbdfe07ca4cfd6cf6524d288e1789
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6ec0f9615e24af0e70423988e26b2c5dd92028e4b6efeb7199ca4566c5ec6109c4fccaf7e23c2c0b4e329305dc7ad8a8be3a97be2d2e3a456a9036dc9a03e51
|
7
|
+
data.tar.gz: 9365bc64d9f4dcb77e09e6a6cab9199b332268c3357117fad1305e69521f5468745aecde543e8d73453f721b32c9539614cbbf8755c6cc0be392ff88c0c6c051
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/prism_ext/version.rb
CHANGED
data/lib/prism_ext.rb
CHANGED
@@ -104,7 +104,7 @@ module Prism
|
|
104
104
|
|
105
105
|
# Respond key value and source for hash node
|
106
106
|
def method_missing(method_name, *args, &block)
|
107
|
-
return super unless
|
107
|
+
return super unless respond_to_elements?
|
108
108
|
|
109
109
|
if method_name.to_s.end_with?('_element')
|
110
110
|
key = method_name.to_s[0..-9]
|
@@ -121,7 +121,7 @@ module Prism
|
|
121
121
|
end
|
122
122
|
|
123
123
|
def respond_to_missing?(method_name, *args)
|
124
|
-
return super unless
|
124
|
+
return super unless respond_to_elements?
|
125
125
|
|
126
126
|
if method_name.to_s.end_with?('_element')
|
127
127
|
key = method_name.to_s[0..-9]
|
@@ -136,5 +136,11 @@ module Prism
|
|
136
136
|
|
137
137
|
super
|
138
138
|
end
|
139
|
+
|
140
|
+
private
|
141
|
+
|
142
|
+
def respond_to_elements?
|
143
|
+
is_a?(HashNode) || is_a?(KeywordHashNode)
|
144
|
+
end
|
139
145
|
end
|
140
146
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prism_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.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: 2024-02-
|
11
|
+
date: 2024-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prism
|