dynarex 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dynarex.rb +9 -3
- metadata +2 -2
data/lib/dynarex.rb
CHANGED
@@ -11,6 +11,8 @@ require 'ostruct'
|
|
11
11
|
class Dynarex
|
12
12
|
include REXML
|
13
13
|
|
14
|
+
attr_accessor :format_mask
|
15
|
+
|
14
16
|
#Create a new dynarex document from 1 of the following options:
|
15
17
|
#* a local file path
|
16
18
|
#* a URL
|
@@ -26,6 +28,11 @@ class Dynarex
|
|
26
28
|
def fields
|
27
29
|
@fields
|
28
30
|
end
|
31
|
+
|
32
|
+
def format_mask=(s)
|
33
|
+
@format_mask = s
|
34
|
+
@summary[:format_mask] = @format_mask
|
35
|
+
end
|
29
36
|
|
30
37
|
# Returns the hash representation of the document summary.
|
31
38
|
|
@@ -51,7 +58,7 @@ class Dynarex
|
|
51
58
|
def to_s
|
52
59
|
xsl_buffer =<<EOF
|
53
60
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
54
|
-
<xsl:output encoding="UTF-8"
|
61
|
+
<xsl:output encoding="UTF-8"display_xml
|
55
62
|
method="text"
|
56
63
|
indent="no"
|
57
64
|
omit-xml-declaration="yes"/>
|
@@ -74,7 +81,7 @@ EOF
|
|
74
81
|
out.text
|
75
82
|
end
|
76
83
|
|
77
|
-
def to_xml
|
84
|
+
def to_xml
|
78
85
|
display_xml()
|
79
86
|
end
|
80
87
|
|
@@ -381,4 +388,3 @@ end))
|
|
381
388
|
end
|
382
389
|
|
383
390
|
end
|
384
|
-
|
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.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors: []
|
7
7
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-11-23 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|