polyrex 0.8.14 → 0.8.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/polyrex.rb +5 -3
- metadata +2 -2
data/lib/polyrex.rb
CHANGED
@@ -49,12 +49,14 @@ class Polyrex
|
|
49
49
|
@doc.to_s(options)
|
50
50
|
end
|
51
51
|
|
52
|
-
def save(filepath=nil)
|
52
|
+
def save(filepath=nil, options={})
|
53
53
|
refresh_summary
|
54
54
|
filepath ||= @local_filepath
|
55
55
|
@local_filepath = filepath
|
56
|
-
|
57
|
-
|
56
|
+
xml = @doc.to_s(options)
|
57
|
+
buffer = block_given? ? yield(xml) : xml
|
58
|
+
File.open(filepath,'w'){|f| f.write buffer}
|
59
|
+
end
|
58
60
|
|
59
61
|
# -- start of crud methods --
|
60
62
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: polyrex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.8.
|
5
|
+
version: 0.8.15
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- James Robertson
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-03-
|
13
|
+
date: 2012-03-29 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|