excemel 1.0.0-java → 1.0.1-java
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/History.txt +10 -1
- data/lib/excemel/excemel.rb +8 -2
- metadata +2 -2
data/History.txt
CHANGED
data/lib/excemel/excemel.rb
CHANGED
@@ -190,11 +190,11 @@ module Excemel
|
|
190
190
|
# Returns a pretty-formatted document with the given indent, max line length
|
191
191
|
# and encoding. The preserve_base_uri determines whether preserves the
|
192
192
|
# original base URIs by inserting extra xml:base attributes.
|
193
|
-
def to_pretty_xml(indent=2,
|
193
|
+
def to_pretty_xml(indent=2, line_length=0, encoding='utf-8', preserve_base_uri=true)
|
194
194
|
baos = Lang::ByteArrayOutputStream.new
|
195
195
|
serializer = XOM::Serializer.new(baos, encoding)
|
196
196
|
serializer.indent = indent
|
197
|
-
serializer.max_length =
|
197
|
+
serializer.max_length = line_length
|
198
198
|
serializer.write @doc
|
199
199
|
baos.to_string
|
200
200
|
end
|
@@ -248,6 +248,12 @@ module Excemel
|
|
248
248
|
baos.to_string
|
249
249
|
end
|
250
250
|
|
251
|
+
# Adds attributes to the current target element (pointer to an element in the document
|
252
|
+
# by default the root of the document)
|
253
|
+
def attributes(attrs)
|
254
|
+
_add_attributes(@target, attrs)
|
255
|
+
end
|
256
|
+
|
251
257
|
private
|
252
258
|
|
253
259
|
# Adds attributes to the given Element (tag) as define by the parameter
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: excemel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.1
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Brian Sam-Bodden
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-07-20 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|