gloo-lang 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/gloo_lang/core/pn.rb +20 -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: 6d53ee57cd043ef2df43c9f73c3e06dbbc4b4aab69bef954eacf10aa13c5635d
|
4
|
+
data.tar.gz: 01e5791a5ef73fe464af49f2fb050b0e1a83b6e4cccac7fff14ebd09da40af45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19517cd6d7ecc5e6954162dff72260e4b60239f38d32a6ce407830b1d4e469a8e3fd355e21c036f5a7c075ad5a677e759f4bb10e3b23cc4163abcf3bace93986
|
7
|
+
data.tar.gz: cbda84d465f7364102558978f6529c0b34ae2a15d8d7d6b2b87724dad49dd7d2e70b4b51817302e6adf7468499254563b86dc2bcb2f3304b86ee6a26cffaf104
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.2
|
data/lib/gloo_lang/core/pn.rb
CHANGED
@@ -12,6 +12,7 @@ module GlooLang
|
|
12
12
|
ROOT = 'root'.freeze
|
13
13
|
IT = 'it'.freeze
|
14
14
|
ERROR = 'error'.freeze
|
15
|
+
CONTEXT = '@'.freeze
|
15
16
|
|
16
17
|
attr_reader :src, :elements
|
17
18
|
|
@@ -124,6 +125,21 @@ module GlooLang
|
|
124
125
|
return @elements.count > 1
|
125
126
|
end
|
126
127
|
|
128
|
+
#
|
129
|
+
# Does the path start with the context?
|
130
|
+
#
|
131
|
+
def includes_context?
|
132
|
+
return @src.start_with?( "#{CONTEXT}." )
|
133
|
+
end
|
134
|
+
|
135
|
+
#
|
136
|
+
# Expand the context so we have the full path.
|
137
|
+
#
|
138
|
+
def expand_context
|
139
|
+
# return unless @engine.heap.context
|
140
|
+
self.set_to( "#{@engine.heap.context}#{@src[1..-1]}" )
|
141
|
+
end
|
142
|
+
|
127
143
|
#
|
128
144
|
# Get the parent that contains the object referenced.
|
129
145
|
#
|
@@ -180,6 +196,10 @@ module GlooLang
|
|
180
196
|
Here.expand_here( @engine, self )
|
181
197
|
end
|
182
198
|
|
199
|
+
if self.includes_context?
|
200
|
+
expand_context
|
201
|
+
end
|
202
|
+
|
183
203
|
parent = self.get_parent
|
184
204
|
return nil unless parent
|
185
205
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gloo-lang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Crane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|