rexle 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rexle.rb +2 -2
- metadata +2 -2
data/lib/rexle.rb
CHANGED
@@ -12,14 +12,14 @@ module XMLhelper
|
|
12
12
|
|
13
13
|
def doc_print(children)
|
14
14
|
|
15
|
-
body = scan_print(children).join
|
15
|
+
body = children.empty? ? self.root.value : scan_print(children).join
|
16
16
|
a = self.root.attributes.to_a.map{|k,v| "%s='%s'" % [k,v]}
|
17
17
|
"<%s%s>%s</%s>" % [self.root.name, a.empty? ? '' : ' ' + a.join(' '), body, self.root.name]
|
18
18
|
end
|
19
19
|
|
20
20
|
def doc_pretty_print(children)
|
21
21
|
|
22
|
-
body = pretty_print(children,2).join
|
22
|
+
body = children.empty? ? self.value : pretty_print(children,2).join
|
23
23
|
a = self.root.attributes.to_a.map{|k,v| "%s='%s'" % [k,v]}
|
24
24
|
ind = "\n "
|
25
25
|
"<%s%s>%s%s%s</%s>" % [self.root.name, a.empty? ? '' : ' ' + a.join(' '), ind, body, "\n", self.root.name]
|
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.8
|
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-02-
|
12
|
+
date: 2011-02-04 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|