dynarex 0.1.5 → 0.1.6

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 +15 -5
  2. metadata +1 -1
@@ -19,7 +19,18 @@ class Dynarex
19
19
  @records
20
20
  end
21
21
 
22
- def save(filepath)
22
+ def to_xml
23
+ display_xml()
24
+ end
25
+
26
+ def save(filepath)
27
+ xml = display_xml()
28
+ File.open(filepath,'w'){|f| f.write xml}
29
+ end
30
+
31
+ private
32
+
33
+ def display_xml
23
34
 
24
35
  xml = Builder::XmlMarkup.new( :target => buffer='', :indent => 2 )
25
36
  xml.instruct! :xml, :version => "1.0", :encoding => "UTF-8"
@@ -37,13 +48,12 @@ class Dynarex
37
48
  end
38
49
  end
39
50
  end
40
- end
51
+ end
52
+
53
+ buffer
41
54
 
42
- File.open(filepath,'w'){|f| f.write buffer}
43
55
  end
44
56
 
45
- private
46
-
47
57
  def open(location)
48
58
  if location[/^https?:\/\//] then
49
59
  buffer = Kernel.open(location, 'UserAgent' => 'Dynarex-Reader').read
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors: []
7
7