dynarex 1.1.9 → 1.1.10

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 (2) hide show
  1. data/lib/dynarex.rb +4 -3
  2. metadata +2 -2
@@ -124,11 +124,12 @@ EOF
124
124
 
125
125
  #Save the document to a local file.
126
126
 
127
- def save(filepath=nil)
127
+ def save(filepath=nil, opt={})
128
128
  filepath ||= @local_filepath
129
129
  @local_filepath = filepath
130
- xml = display_xml()
131
- File.open(filepath,'w'){|f| f.write xml}
130
+ xml = display_xml(opt)
131
+ buffer = block_given? ? yield(xml) : xml
132
+ File.open(filepath,'w'){|f| f.write buffer }
132
133
  end
133
134
 
134
135
  #Parses 1 or more lines of text to create or update existing records.
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.1.9
5
+ version: 1.1.10
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-16 00:00:00 +00:00
13
+ date: 2012-03-21 00:00:00 +00:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency