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.
Files changed (3) hide show
  1. data/History.txt +10 -1
  2. data/lib/excemel/excemel.rb +8 -2
  3. metadata +2 -2
data/History.txt CHANGED
@@ -1,3 +1,12 @@
1
1
  == 0.0.1
2
2
 
3
- - initial release
3
+ - initial release
4
+
5
+ == 1.0.0
6
+
7
+ - clean and fixes for jruby 1.6.1
8
+
9
+ == 1.0.1
10
+
11
+ - added the ability to add attributes to the current document target (pointer
12
+ to an element in the document)
@@ -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, line_lenght=0, encoding='utf-8', preserve_base_uri=true)
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 = line_lenght
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.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-06-29 00:00:00 -07:00
13
+ date: 2011-07-20 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency