axlsx 1.0.12 → 1.0.14

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 (77) hide show
  1. data/README.md +165 -134
  2. data/examples/example.rb +133 -153
  3. data/lib/axlsx/#cfb.xlsx# +0 -0
  4. data/lib/axlsx/content_type/content_type.rb +23 -0
  5. data/lib/axlsx/content_type/default.rb +37 -0
  6. data/lib/axlsx/content_type/override.rb +37 -0
  7. data/lib/axlsx/doc_props/app.rb +178 -0
  8. data/lib/axlsx/doc_props/core.rb +34 -0
  9. data/lib/axlsx/drawing/axis.rb +93 -0
  10. data/lib/axlsx/drawing/bar_3D_chart.rb +136 -0
  11. data/lib/axlsx/drawing/bar_series.rb +64 -0
  12. data/lib/axlsx/drawing/cat_axis.rb +63 -0
  13. data/lib/axlsx/drawing/cat_axis_data.rb +35 -0
  14. data/lib/axlsx/drawing/chart.rb +193 -0
  15. data/lib/axlsx/drawing/drawing.rb +137 -0
  16. data/lib/axlsx/drawing/graphic_frame.rb +52 -0
  17. data/lib/axlsx/drawing/line_3D_chart.rb +114 -0
  18. data/lib/axlsx/drawing/line_series.rb +46 -0
  19. data/lib/axlsx/drawing/marker.rb +61 -0
  20. data/lib/axlsx/drawing/one_cell_anchor.rb +89 -0
  21. data/lib/axlsx/drawing/pic.rb +153 -0
  22. data/lib/axlsx/drawing/picture_locking.rb +72 -0
  23. data/lib/axlsx/drawing/picture_locking.rb~ +36 -0
  24. data/lib/axlsx/drawing/pie_3D_chart.rb +41 -0
  25. data/lib/axlsx/drawing/pie_series.rb +56 -0
  26. data/lib/axlsx/drawing/scaling.rb +59 -0
  27. data/lib/axlsx/drawing/ser_axis.rb +45 -0
  28. data/lib/axlsx/drawing/series.rb +71 -0
  29. data/lib/axlsx/drawing/series_title.rb +22 -0
  30. data/lib/axlsx/drawing/title.rb +65 -0
  31. data/lib/axlsx/drawing/two_cell_anchor.rb +76 -0
  32. data/lib/axlsx/drawing/val_axis.rb +34 -0
  33. data/lib/axlsx/drawing/val_axis_data.rb +26 -0
  34. data/lib/axlsx/drawing/view_3D.rb +85 -0
  35. data/lib/axlsx/package.rb +223 -0
  36. data/lib/axlsx/rels/relationship.rb +44 -0
  37. data/lib/axlsx/rels/relationships.rb +25 -0
  38. data/lib/axlsx/stylesheet/border.rb +57 -0
  39. data/lib/axlsx/stylesheet/border_pr.rb +68 -0
  40. data/lib/axlsx/stylesheet/cell_alignment.rb +105 -0
  41. data/lib/axlsx/stylesheet/cell_protection.rb +36 -0
  42. data/lib/axlsx/stylesheet/cell_style.rb +65 -0
  43. data/lib/axlsx/stylesheet/color.rb +69 -0
  44. data/lib/axlsx/stylesheet/fill.rb +32 -0
  45. data/lib/axlsx/stylesheet/font.rb +139 -0
  46. data/lib/axlsx/stylesheet/gradient_fill.rb +76 -0
  47. data/lib/axlsx/stylesheet/gradient_stop.rb +33 -0
  48. data/lib/axlsx/stylesheet/num_fmt.rb +63 -0
  49. data/lib/axlsx/stylesheet/pattern_fill.rb +66 -0
  50. data/lib/axlsx/stylesheet/styles.rb +298 -0
  51. data/lib/axlsx/stylesheet/table_style.rb +47 -0
  52. data/lib/axlsx/stylesheet/table_style_element.rb +71 -0
  53. data/lib/axlsx/stylesheet/table_styles.rb +39 -0
  54. data/lib/axlsx/stylesheet/xf.rb +138 -0
  55. data/lib/axlsx/util/constants.rb +216 -0
  56. data/lib/axlsx/util/ms_off_crypto.rb +88 -0
  57. data/lib/axlsx/util/ms_off_crypto.rb~ +3 -0
  58. data/lib/axlsx/util/ms_offcrypto.rb~ +0 -0
  59. data/lib/axlsx/util/parser.rb +43 -0
  60. data/lib/axlsx/util/parser.rb~ +6 -0
  61. data/lib/axlsx/util/simple_typed_list.rb +160 -0
  62. data/lib/axlsx/util/validators.rb +132 -0
  63. data/lib/axlsx/version.rb +4 -0
  64. data/lib/axlsx/workbook/workbook.rb +161 -0
  65. data/lib/axlsx/workbook/worksheet/cell.rb +350 -0
  66. data/lib/axlsx/workbook/worksheet/row.rb +107 -0
  67. data/lib/axlsx/workbook/worksheet/worksheet.rb +335 -0
  68. data/lib/axlsx.rb +59 -0
  69. data/test/drawing/tc_axis.rb +1 -1
  70. data/test/drawing/tc_cat_axis.rb +1 -1
  71. data/test/drawing/tc_line_series.tc~ +34 -0
  72. data/test/drawing/tc_picture_locking.rb~ +77 -0
  73. data/test/tc_package.rb +10 -0
  74. data/test/workbook/worksheet/tc_cell.rb +15 -0
  75. data/test/workbook/worksheet/tc_worksheet.rb +22 -1
  76. metadata +117 -5
  77. data/examples/follow_20111202.xlsx +0 -0
@@ -0,0 +1,69 @@
1
+ module Axlsx
2
+ # The color class represents a color used for borders, fills an fonts
3
+ class Color
4
+ # Determines if the color is system color dependant
5
+ # @return [Boolean]
6
+ attr_reader :auto
7
+
8
+ # The color as defined in rgb terms.
9
+ # @note
10
+ # rgb colors need to conform to ST_UnsignedIntHex. That basically means put 'FF' before you color
11
+ # When assigning the rgb value the behavior is much like CSS selectors and can use shorthand versions as follows:
12
+ # If you provide a two character value it will be repeated for each r, g, b assignment
13
+ # If you provide data that is not 2 characters in length, and is less than 8 characters it will be padded with "F"
14
+ # @example
15
+ # Color.new :rgb => "FF000000"
16
+ # => #<Axlsx::Color:0x102106b68 @rgb="FF000000">
17
+ # Color.new :rgb => "0A"
18
+ # => #<Axlsx::Color:0x102106b68 @rgb="FF0A0A0A">
19
+ # Color.new :rgb => "00BB"
20
+ # => #<Axlsx::Color:0x102106b68 @rgb="FFFF00BB">
21
+ # @return [String]
22
+ attr_reader :rgb
23
+
24
+ # no support for theme just yet
25
+ # @return [Integer]
26
+ #attr_reader :theme
27
+
28
+ # The tint value.
29
+ # @note valid values are between -1.0 and 1.0
30
+ # @return [Float]
31
+ attr_reader :tint
32
+
33
+ # Creates a new Color object
34
+ # @option options [Boolean] auto
35
+ # @option options [String] rgb
36
+ # @option options [Float] tint
37
+ def initialize(options={})
38
+ @rgb = "FF000000"
39
+ options.each do |o|
40
+ self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
41
+ end
42
+ end
43
+ # @see auto
44
+ def auto=(v) Axlsx::validate_boolean v; @auto = v end
45
+ # @see color
46
+ def rgb=(v)
47
+ Axlsx::validate_string(v)
48
+ v.upcase!
49
+ v = v * 3 if v.size == 2
50
+ v = v.rjust(8, 'FF')
51
+ raise ArgumentError, "Invalid color rgb value: #{v}." unless v.match(/[0-9A-F]{8}/)
52
+ @rgb = v
53
+ end
54
+ # @see tint
55
+ def tint=(v) Axlsx::validate_float v; @tint = v end
56
+
57
+ # This version does not support themes
58
+ # def theme=(v) Axlsx::validate_unsigned_integer v; @theme = v end
59
+
60
+ # Indexed colors are for backward compatability which I am choosing not to support
61
+ # def indexed=(v) Axlsx::validate_unsigned_integer v; @indexed = v end
62
+
63
+
64
+ # Serializes the color
65
+ # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
66
+ # @return [String]
67
+ def to_xml(xml) xml.color(self.instance_values) end
68
+ end
69
+ end
@@ -0,0 +1,32 @@
1
+ module Axlsx
2
+ # The Fill is a formatting object that manages the background color, and pattern for cells.
3
+ # @note The recommended way to manage styles in your workbook is to use Styles#add_style.
4
+ # @see Styles#add_style
5
+ # @see PatternFill
6
+ # @see GradientFill
7
+ class Fill
8
+
9
+ # The type of fill
10
+ # @return [PatternFill, GradientFill]
11
+ attr_reader :fill_type
12
+
13
+ # Creates a new Fill object
14
+ # @param [PatternFill, GradientFill] fill_type
15
+ # @raise [ArgumentError] if the fill_type parameter is not a PatternFill or a GradientFill instance
16
+ def initialize(fill_type)
17
+ self.fill_type = fill_type
18
+ end
19
+
20
+ # Serializes the fill
21
+ # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
22
+ # @return [String]
23
+ def to_xml(xml)
24
+ xml.fill { @fill_type.to_xml(xml) }
25
+ end
26
+
27
+ # @see fill_type
28
+ def fill_type=(v) DataTypeValidator.validate "Fill.fill_type", [PatternFill, GradientFill], v; @fill_type = v; end
29
+
30
+
31
+ end
32
+ end
@@ -0,0 +1,139 @@
1
+ module Axlsx
2
+ # The Font class details a font instance for use in styling cells.
3
+ # @note The recommended way to manage fonts, and other styles is Styles#add_style
4
+ # @see Styles#add_style
5
+ class Font
6
+ # The name of the font
7
+ # @return [String]
8
+ attr_reader :name
9
+
10
+ # The charset of the font
11
+ # @return [Integer]
12
+ # @note
13
+ # The following values are defined in the OOXML specification and are OS dependant values
14
+ # 0 ANSI_CHARSET
15
+ # 1 DEFAULT_CHARSET
16
+ # 2 SYMBOL_CHARSET
17
+ # 77 MAC_CHARSET
18
+ # 128 SHIFTJIS_CHARSET
19
+ # 129 HANGUL_CHARSET
20
+ # 130 JOHAB_CHARSET
21
+ # 134 GB2312_CHARSET
22
+ # 136 CHINESEBIG5_CHARSET
23
+ # 161 GREEK_CHARSET
24
+ # 162 TURKISH_CHARSET
25
+ # 163 VIETNAMESE_CHARSET
26
+ # 177 HEBREW_CHARSET
27
+ # 178 ARABIC_CHARSET
28
+ # 186 BALTIC_CHARSET
29
+ # 204 RUSSIAN_CHARSET
30
+ # 222 THAI_CHARSET
31
+ # 238 EASTEUROPE_CHARSET
32
+ # 255 OEM_CHARSET
33
+ attr_reader :charset
34
+
35
+ # The font's family
36
+ # @note
37
+ # The following are defined OOXML specification
38
+ # 0 Not applicable.
39
+ # 1 Roman
40
+ # 2 Swiss
41
+ # 3 Modern
42
+ # 4 Script
43
+ # 5 Decorative
44
+ # 6..14 Reserved for future use
45
+ # @return [Integer]
46
+ attr_reader :family
47
+
48
+ # Indicates if the font should be rendered in *bold*
49
+ # @return [Boolean]
50
+ attr_reader :b
51
+
52
+ # Indicates if the font should be rendered italicized
53
+ # @return [Boolean]
54
+ attr_reader :i
55
+
56
+ # Indicates if the font should be rendered with a strikthrough
57
+ # @return [Boolean]
58
+ attr_reader :strike
59
+
60
+ # Indicates if the font should be rendered with an outline
61
+ # @return [Boolean]
62
+ attr_reader :outline
63
+
64
+ # Indicates if the font should be rendered with a shadow
65
+ # @return [Boolean]
66
+ attr_reader :shadow
67
+
68
+ # Indicates if the font should be condensed
69
+ # @return [Boolean]
70
+ attr_reader :condense
71
+
72
+ # The font's extend property
73
+ # @return [Boolean]
74
+ attr_reader :extend
75
+
76
+ # The color of the font
77
+ # @return [Color]
78
+ attr_reader :color
79
+
80
+ # The size of the font.
81
+ # @return [Integer]
82
+ attr_reader :sz
83
+
84
+ # Creates a new Font
85
+ # @option options [String] name
86
+ # @option options [Integer] charset
87
+ # @option options [Integer] family
88
+ # @option options [Integer] family
89
+ # @option options [Boolean] b
90
+ # @option options [Boolean] i
91
+ # @option options [Boolean] strike
92
+ # @option options [Boolean] outline
93
+ # @option options [Boolean] shadow
94
+ # @option options [Boolean] condense
95
+ # @option options [Boolean] extend
96
+ # @option options [Color] color
97
+ # @option options [Integer] sz
98
+ def initialize(options={})
99
+ options.each do |o|
100
+ self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
101
+ end
102
+ end
103
+ # @see name
104
+ def name=(v) Axlsx::validate_string v; @name = v end
105
+ # @see charset
106
+ def charset=(v) Axlsx::validate_unsigned_int v; @charset = v end
107
+ # @see family
108
+ def family=(v) Axlsx::validate_unsigned_int v; @family = v end
109
+ # @see b
110
+ def b=(v) Axlsx::validate_boolean v; @b = v end
111
+ # @see i
112
+ def i=(v) Axlsx::validate_boolean v; @i = v end
113
+ # @see strike
114
+ def strike=(v) Axlsx::validate_boolean v; @strike = v end
115
+ # @see outline
116
+ def outline=(v) Axlsx::validate_boolean v; @outline = v end
117
+ # @see shadow
118
+ def shadow=(v) Axlsx::validate_boolean v; @shadow = v end
119
+ # @see condense
120
+ def condense=(v) Axlsx::validate_boolean v; @condense = v end
121
+ # @see extend
122
+ def extend=(v) Axlsx::validate_boolean v; @extend = v end
123
+ # @see color
124
+ def color=(v) DataTypeValidator.validate "Font.color", Color, v; @color=v end
125
+ # @see sz
126
+ def sz=(v) Axlsx::validate_unsigned_int v; @sz=v end
127
+
128
+ # Serializes the fill
129
+ # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
130
+ # @return [String]
131
+ def to_xml(xml)
132
+ xml.font {
133
+ self.instance_values.each do |k, v|
134
+ v.is_a?(Color) ? v.to_xml(xml) : xml.send(k, {:val => v})
135
+ end
136
+ }
137
+ end
138
+ end
139
+ end
@@ -0,0 +1,76 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Axlsx
3
+ # A GradientFill defines the color and positioning for gradiant cell fill.
4
+ # @see Open Office XML Part 1 §18.8.24
5
+ class GradientFill
6
+
7
+ # The type of gradient.
8
+ # @note
9
+ # valid options are
10
+ # :linear
11
+ # :path
12
+ # @return [Symbol]
13
+ attr_reader :type
14
+
15
+ # Angle of the linear gradient
16
+ # @return [Float]
17
+ attr_reader :degree
18
+
19
+ # Percentage format left
20
+ # @return [Float]
21
+ attr_reader :left
22
+
23
+ # Percentage format right
24
+ # @return [Float]
25
+ attr_reader :right
26
+
27
+ # Percentage format top
28
+ # @return [Float]
29
+ attr_reader :top
30
+
31
+ # Percentage format bottom
32
+ # @return [Float]
33
+ attr_reader :bottom
34
+
35
+ # Collection of stop objects
36
+ # @return [SimpleTypedList]
37
+ attr_reader :stop
38
+
39
+ # Creates a new GradientFill object
40
+ # @option options [Symbol] type
41
+ # @option options [Float] degree
42
+ # @option options [Float] left
43
+ # @option options [Float] right
44
+ # @option options [Float] top
45
+ # @option options [Float] bottom
46
+ def initialize(options={})
47
+ options[:type] ||= :linear
48
+ options.each do |o|
49
+ self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
50
+ end
51
+ @stop = SimpleTypedList.new GradientStop
52
+ end
53
+
54
+ # @see type
55
+ def type=(v) Axlsx::validate_gradient_type v; @type = v end
56
+ # @see degree
57
+ def degree=(v) Axlsx::validate_float v; @degree = v end
58
+ # @see left
59
+ def left=(v) DataTypeValidator.validate "GradientFill.left", Float, v, lambda { |arg| arg >= 0.0 && arg <= 1.0}; @left = v end
60
+ # @see right
61
+ def right=(v) DataTypeValidator.validate "GradientFill.right", Float, v, lambda { |arg| arg >= 0.0 && arg <= 1.0}; @right = v end
62
+ # @see top
63
+ def top=(v) DataTypeValidator.validate "GradientFill.top", Float, v, lambda { |arg| arg >= 0.0 && arg <= 1.0}; @top = v end
64
+ # @see bottom
65
+ def bottom=(v) DataTypeValidator.validate "GradientFill.bottom", Float, v, lambda { |arg| arg >= 0.0 && arg <= 1.0}; @bottom= v end
66
+
67
+ # Serializes the gradientFill
68
+ # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
69
+ # @return [String]
70
+ def to_xml(xml)
71
+ xml.gradientFill(self.instance_values.reject { |k,v| k.to_sym == :stop }) {
72
+ @stop.each { |s| s.to_xml(xml) }
73
+ }
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,33 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Axlsx
3
+ # The GradientStop object represents a color point in a gradient.
4
+ # @see Open Office XML Part 1 §18.8.24
5
+ class GradientStop
6
+ # The color for this gradient stop
7
+ # @return [Color]
8
+ # @see Color
9
+ attr_reader :color
10
+
11
+ # The position of the color
12
+ # @return [Float]
13
+ attr_reader :position
14
+
15
+ # Creates a new GradientStop object
16
+ # @param [Color] color
17
+ # @param [Float] position
18
+ def initialize(color, position)
19
+ self.color = color
20
+ self.position = position
21
+ end
22
+
23
+ # @see color
24
+ def color=(v) DataTypeValidator.validate "GradientStop.color", Color, v; @color=v end
25
+ # @see position
26
+ def position=(v) DataTypeValidator.validate "GradientStop.position", Float, v, lambda { |arg| arg >= 0 && arg <= 1}; @position = v end
27
+
28
+ # Serializes the gradientStop
29
+ # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
30
+ # @return [String]
31
+ def to_xml(xml) xml.stop(:position => self.position) {self.color.to_xml(xml)} end
32
+ end
33
+ end
@@ -0,0 +1,63 @@
1
+ module Axlsx
2
+ # A NumFmt object defines an identifier and formatting code for data in cells.
3
+ # @note The recommended way to manage styles is Styles#add_style
4
+ class NumFmt
5
+ # @return [Integer] An unsinged integer referencing a standard or custom number format.
6
+ # @note
7
+ # These are the known formats I can dig up. The constant NUM_FMT_PERCENT is 9, and uses the default % formatting. Axlsx also defines a few formats for date and time that are commonly used in asia as NUM_FMT_YYYYMMDD and NUM_FRM_YYYYMMDDHHMMSS.
8
+ # 1 0
9
+ # 2 0.00
10
+ # 3 #,##0
11
+ # 4 #,##0.00
12
+ # 5 $#,##0_);($#,##0)
13
+ # 6 $#,##0_);[Red]($#,##0)
14
+ # 7 $#,##0.00_);($#,##0.00)
15
+ # 8 $#,##0.00_);[Red]($#,##0.00)
16
+ # 9 0%
17
+ # 10 0.00%
18
+ # 11 0.00E+00
19
+ # 12 # ?/?
20
+ # 13 # ??/??
21
+ # 14 m/d/yyyy
22
+ # 15 d-mmm-yy
23
+ # 16 d-mmm
24
+ # 17 mmm-yy
25
+ # 18 h:mm AM/PM
26
+ # 19 h:mm:ss AM/PM
27
+ # 20 h:mm
28
+ # 21 h:mm:ss
29
+ # 22 m/d/yyyy h:mm
30
+ # 37 #,##0_);(#,##0)
31
+ # 38 #,##0_);[Red](#,##0)
32
+ # 39 #,##0.00_);(#,##0.00)
33
+ # 40 #,##0.00_);[Red](#,##0.00)
34
+ # 45 mm:ss
35
+ # 46 [h]:mm:ss
36
+ # 47 mm:ss.0
37
+ # 48 ##0.0E+0
38
+ # 49 @
39
+ # @see Axlsx
40
+ attr_reader :numFmtId
41
+
42
+ # @return [String] The formatting to use for this number format.
43
+ # @see http://support.microsoft.com/kb/264372
44
+ attr_reader :formatCode
45
+ def initialize(options={})
46
+ @numFmtId = 0
47
+ @formatCode = ""
48
+ options.each do |o|
49
+ self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
50
+ end
51
+ end
52
+
53
+ # @see numFmtId
54
+ def numFmtId=(v) Axlsx::validate_unsigned_int v; @numFmtId = v end
55
+ # @see formatCode
56
+ def formatCode=(v) Axlsx::validate_string v; @formatCode = v end
57
+
58
+ # Creates a numFmt element applying the instance values of this object as attributes.
59
+ # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
60
+ def to_xml(xml) xml.numFmt(self.instance_values) end
61
+
62
+ end
63
+ end
@@ -0,0 +1,66 @@
1
+ module Axlsx
2
+ # A PatternFill is the pattern and solid fill styling for a cell.
3
+ # @note The recommended way to manage styles is with Styles#add_style
4
+ # @see Style#add_style
5
+ class PatternFill
6
+
7
+ # The color to use for the the background in solid fills.
8
+ # @return [Color]
9
+ attr_reader :fgColor
10
+
11
+ # The color to use for the background of the fill when the type is not solid.
12
+ # @return [Color]
13
+ attr_reader :bgColor
14
+
15
+ # The pattern type to use
16
+ # @note
17
+ # patternType must be one of
18
+ # :none
19
+ # :solid
20
+ # :mediumGray
21
+ # :darkGray
22
+ # :lightGray
23
+ # :darkHorizontal
24
+ # :darkVertical
25
+ # :darkDown
26
+ # :darkUp
27
+ # :darkGrid
28
+ # :darkTrellis
29
+ # :lightHorizontal
30
+ # :lightVertical
31
+ # :lightDown
32
+ # :lightUp
33
+ # :lightGrid
34
+ # :lightTrellis
35
+ # :gray125
36
+ # :gray0625
37
+ # @see Office Open XML Part 1 18.18.55
38
+ attr_reader :patternType
39
+
40
+ # Creates a new PatternFill Object
41
+ # @option options [Symbol] patternType
42
+ # @option options [Color] fgColor
43
+ # @option options [Color] bgColor
44
+ def initialize(options={})
45
+ @patternType = :none
46
+ options.each do |o|
47
+ self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
48
+ end
49
+ end
50
+ # @see fgColor
51
+ def fgColor=(v) DataTypeValidator.validate "PatternFill.fgColor", Color, v; @fgColor=v end
52
+ # @see bgColor
53
+ def bgColor=(v) DataTypeValidator.validate "PatternFill.bgColor", Color, v; @bgColor=v end
54
+ # @see patternType
55
+ def patternType=(v) Axlsx::validate_pattern_type v; @patternType = v end
56
+
57
+ # Serializes the pattern fill
58
+ # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
59
+ # @return [String]
60
+ def to_xml(xml)
61
+ xml.patternFill(:patternType => self.patternType) {
62
+ self.instance_values.reject { |k,v| k.to_sym == :patternType }.each { |k,v| xml.send(k, v.instance_values) }
63
+ }
64
+ end
65
+ end
66
+ end