rexle 0.8.2 → 0.8.3
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.
- data/lib/rexle.rb +12 -2
- metadata +2 -2
data/lib/rexle.rb
CHANGED
@@ -196,13 +196,23 @@ class Rexle
|
|
196
196
|
end
|
197
197
|
|
198
198
|
def root() self end
|
199
|
+
|
199
200
|
def text(s='')
|
201
|
+
|
200
202
|
if s.empty? then
|
201
|
-
@value
|
203
|
+
result = @value
|
202
204
|
else
|
203
205
|
e = self.element(s)
|
204
|
-
e.value if e
|
206
|
+
result = e.value if e
|
205
207
|
end
|
208
|
+
|
209
|
+
def result.unescape()
|
210
|
+
s = self.clone
|
211
|
+
%w(< < > > & &).each_slice(2){|x| s.gsub!(*x)}
|
212
|
+
s
|
213
|
+
end
|
214
|
+
|
215
|
+
result
|
206
216
|
end
|
207
217
|
|
208
218
|
def value=(s)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rexle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors: []
|
7
7
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2011-01-
|
12
|
+
date: 2011-01-14 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|