axlsx 1.0.8 → 1.0.9

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 (128) hide show
  1. data/CHANGELOG.md +14 -0
  2. data/README.md +22 -21
  3. data/Rakefile +1 -1
  4. data/axlsx.gemspec +36 -0
  5. data/doc/Axlsx.html +373 -559
  6. data/doc/Axlsx/App.html +257 -360
  7. data/doc/Axlsx/Axis.html +113 -144
  8. data/doc/Axlsx/Bar3DChart.html +122 -152
  9. data/doc/Axlsx/BarSeries.html +67 -81
  10. data/doc/Axlsx/Border.html +96 -119
  11. data/doc/Axlsx/BorderPr.html +89 -114
  12. data/doc/Axlsx/CatAxis.html +79 -104
  13. data/doc/Axlsx/CatAxisData.html +40 -54
  14. data/doc/Axlsx/Cell.html +193 -679
  15. data/doc/Axlsx/CellAlignment.html +116 -157
  16. data/doc/Axlsx/CellProtection.html +50 -68
  17. data/doc/Axlsx/CellStyle.html +78 -106
  18. data/doc/Axlsx/Chart.html +361 -432
  19. data/doc/Axlsx/Color.html +56 -78
  20. data/doc/Axlsx/ContentType.html +28 -41
  21. data/doc/Axlsx/Core.html +43 -55
  22. data/doc/Axlsx/DataTypeValidator.html +34 -43
  23. data/doc/Axlsx/Default.html +55 -81
  24. data/doc/Axlsx/Drawing.html +322 -412
  25. data/doc/Axlsx/Fill.html +34 -47
  26. data/doc/Axlsx/Font.html +157 -207
  27. data/doc/Axlsx/GradientFill.html +90 -122
  28. data/doc/Axlsx/GradientStop.html +36 -50
  29. data/doc/Axlsx/GraphicFrame.html +106 -130
  30. data/doc/Axlsx/Line3DChart.html +108 -134
  31. data/doc/Axlsx/LineSeries.html +58 -67
  32. data/doc/Axlsx/Marker.html +84 -111
  33. data/doc/Axlsx/NumFmt.html +83 -102
  34. data/doc/Axlsx/OneCellAnchor.html +158 -196
  35. data/doc/Axlsx/Override.html +60 -92
  36. data/doc/Axlsx/Package.html +190 -759
  37. data/doc/Axlsx/PatternFill.html +78 -99
  38. data/doc/Axlsx/Pic.html +451 -405
  39. data/doc/Axlsx/Pie3DChart.html +33 -42
  40. data/doc/Axlsx/PieSeries.html +68 -80
  41. data/doc/Axlsx/RegexValidator.html +15 -20
  42. data/doc/Axlsx/Relationship.html +49 -66
  43. data/doc/Axlsx/Relationships.html +28 -41
  44. data/doc/Axlsx/RestrictionValidator.html +23 -32
  45. data/doc/Axlsx/Row.html +132 -161
  46. data/doc/Axlsx/Scaling.html +71 -90
  47. data/doc/Axlsx/SerAxis.html +61 -79
  48. data/doc/Axlsx/Series.html +125 -201
  49. data/doc/Axlsx/SeriesTitle.html +26 -31
  50. data/doc/Axlsx/Styles.html +286 -355
  51. data/doc/Axlsx/TableStyle.html +62 -87
  52. data/doc/Axlsx/TableStyleElement.html +84 -104
  53. data/doc/Axlsx/TableStyles.html +59 -82
  54. data/doc/Axlsx/Title.html +58 -155
  55. data/doc/Axlsx/TwoCellAnchor.html +165 -204
  56. data/doc/Axlsx/ValAxis.html +39 -53
  57. data/doc/Axlsx/ValAxisData.html +29 -39
  58. data/doc/Axlsx/View3D.html +93 -122
  59. data/doc/Axlsx/Workbook.html +359 -362
  60. data/doc/Axlsx/Worksheet.html +471 -816
  61. data/doc/Axlsx/Xf.html +341 -296
  62. data/doc/_index.html +7 -11
  63. data/doc/class_list.html +1 -1
  64. data/doc/file.LICENSE.html +86 -0
  65. data/doc/file.README.html +105 -107
  66. data/doc/file_list.html +3 -0
  67. data/doc/frames.html +1 -1
  68. data/doc/index.html +105 -107
  69. data/doc/method_list.html +426 -602
  70. data/doc/top-level-namespace.html +3 -3
  71. data/examples/example.rb +20 -1
  72. data/lib/axlsx.rb +20 -15
  73. data/lib/axlsx/content_type/default.rb +8 -3
  74. data/lib/axlsx/content_type/override.rb +11 -4
  75. data/lib/axlsx/doc_props/app.rb +53 -23
  76. data/lib/axlsx/drawing/axis.rb +16 -5
  77. data/lib/axlsx/drawing/bar_3D_chart.rb +15 -7
  78. data/lib/axlsx/drawing/bar_series.rb +7 -5
  79. data/lib/axlsx/drawing/cat_axis.rb +10 -3
  80. data/lib/axlsx/drawing/chart.rb +21 -15
  81. data/lib/axlsx/drawing/drawing.rb +16 -30
  82. data/lib/axlsx/drawing/graphic_frame.rb +2 -4
  83. data/lib/axlsx/drawing/line_3D_chart.rb +5 -2
  84. data/lib/axlsx/drawing/line_series.rb +6 -5
  85. data/lib/axlsx/drawing/marker.rb +9 -5
  86. data/lib/axlsx/drawing/one_cell_anchor.rb +7 -7
  87. data/lib/axlsx/drawing/pic.rb +29 -37
  88. data/lib/axlsx/drawing/pie_series.rb +7 -5
  89. data/lib/axlsx/drawing/scaling.rb +11 -5
  90. data/lib/axlsx/drawing/ser_axis.rb +6 -2
  91. data/lib/axlsx/drawing/series.rb +11 -11
  92. data/lib/axlsx/drawing/series_title.rb +1 -1
  93. data/lib/axlsx/drawing/title.rb +5 -12
  94. data/lib/axlsx/drawing/two_cell_anchor.rb +2 -3
  95. data/lib/axlsx/drawing/val_axis.rb +2 -2
  96. data/lib/axlsx/drawing/view_3D.rb +16 -9
  97. data/lib/axlsx/package.rb +25 -27
  98. data/lib/axlsx/rels/relationship.rb +4 -2
  99. data/lib/axlsx/stylesheet/border.rb +9 -4
  100. data/lib/axlsx/stylesheet/border_pr.rb +7 -4
  101. data/lib/axlsx/stylesheet/cell_alignment.rb +18 -9
  102. data/lib/axlsx/stylesheet/cell_protection.rb +5 -2
  103. data/lib/axlsx/stylesheet/cell_style.rb +12 -7
  104. data/lib/axlsx/stylesheet/color.rb +8 -6
  105. data/lib/axlsx/stylesheet/fill.rb +2 -1
  106. data/lib/axlsx/stylesheet/font.rb +24 -13
  107. data/lib/axlsx/stylesheet/gradient_fill.rb +16 -10
  108. data/lib/axlsx/stylesheet/gradient_stop.rb +5 -3
  109. data/lib/axlsx/stylesheet/num_fmt.rb +4 -2
  110. data/lib/axlsx/stylesheet/pattern_fill.rb +6 -4
  111. data/lib/axlsx/stylesheet/styles.rb +12 -12
  112. data/lib/axlsx/stylesheet/table_style.rb +6 -3
  113. data/lib/axlsx/stylesheet/table_style_element.rb +9 -4
  114. data/lib/axlsx/stylesheet/table_styles.rb +4 -4
  115. data/lib/axlsx/stylesheet/xf.rb +52 -31
  116. data/lib/axlsx/util/validators.rb +3 -3
  117. data/lib/axlsx/version.rb +1 -1
  118. data/lib/axlsx/workbook/workbook.rb +8 -9
  119. data/lib/axlsx/workbook/worksheet/cell.rb +25 -16
  120. data/lib/axlsx/workbook/worksheet/row.rb +2 -4
  121. data/lib/axlsx/workbook/worksheet/worksheet.rb +23 -32
  122. data/test/drawing/tc_one_cell_anchor.rb +1 -1
  123. metadata +135 -165
  124. data/doc/Axlsx/SimpleTypedList.html +0 -1686
  125. data/lib/schema/dc.xsd~ +0 -118
  126. data/lib/schema/dcterms.xsd~ +0 -331
  127. data/lib/schema/opc-coreProperties.xsd~ +0 -50
  128. data/test/drawing/tc_line_series.tc~ +0 -34
@@ -3,7 +3,7 @@ module Axlsx
3
3
  class BorderPr
4
4
 
5
5
  # @return [Color] The color of this border part.
6
- attr_accessor :color
6
+ attr_reader :color
7
7
 
8
8
  # @return [Symbol] The syle of this border part.
9
9
  # @note
@@ -22,7 +22,7 @@ module Axlsx
22
22
  # :dashDotDot
23
23
  # :mediumDashDotDot
24
24
  # :slantDashDot
25
- attr_accessor :style
25
+ attr_reader :style
26
26
 
27
27
  # @return [Symbol] The name of this border part
28
28
  # @note
@@ -36,7 +36,7 @@ module Axlsx
36
36
  # :diagonal
37
37
  # :vertical
38
38
  # :horizontal
39
- attr_accessor :name
39
+ attr_reader :name
40
40
 
41
41
  # Creates a new Border Part Object
42
42
  # @option options [Color] color
@@ -49,15 +49,18 @@ module Axlsx
49
49
  end
50
50
  end
51
51
 
52
+ # @see name
52
53
  def name=(v) RestrictionValidator.validate "BorderPr.name", [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal], v; @name = v end
54
+ # @see color
53
55
  def color=(v) DataTypeValidator.validate(:color, Color, v); @color = v end
56
+ # @see style
54
57
  def style=(v) RestrictionValidator.validate "BorderPr.style", [:none, :thin, :medium, :dashed, :dotted, :thick, :double, :hair, :mediumDashed, :dashDot, :mediumDashDot, :dashDotDot, :mediumDashDotDot, :slantDashDot], v; @style = v end
55
58
 
56
59
  # Serializes the border part
57
60
  # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
58
61
  # @return [String]
59
62
  def to_xml(xml)
60
- xml.send(@name, :style=>@style) {
63
+ xml.send(@name, :style => @style) {
61
64
  @color.to_xml(xml) if @color.is_a? Color
62
65
  }
63
66
  end
@@ -15,7 +15,7 @@ module Axlsx
15
15
  # :centerContinuous
16
16
  # :distributed
17
17
  # @return [Symbol]
18
- attr_accessor :horizontal
18
+ attr_reader :horizontal
19
19
 
20
20
  # The vertical alignment of the cell.
21
21
  # @note
@@ -26,38 +26,38 @@ module Axlsx
26
26
  # :justify
27
27
  # :distributed
28
28
  # @return [Symbol]
29
- attr_accessor :vertical
29
+ attr_reader :vertical
30
30
 
31
31
  # The textRotation of the cell.
32
32
  # @return [Integer]
33
- attr_accessor :textRotation
33
+ attr_reader :textRotation
34
34
 
35
35
  # Indicate if the text of the cell should wrap
36
36
  # @return [Boolean]
37
- attr_accessor :wrapText
37
+ attr_reader :wrapText
38
38
 
39
39
  # The amount of indent
40
40
  # @return [Integer]
41
- attr_accessor :indent
41
+ attr_reader :indent
42
42
 
43
43
  # The amount of relativeIndent
44
44
  # @return [Integer]
45
- attr_accessor :relativeIndent
45
+ attr_reader :relativeIndent
46
46
 
47
47
  # Indicate if the last line should be justified.
48
48
  # @return [Boolean]
49
- attr_accessor :justifyLastLine
49
+ attr_reader :justifyLastLine
50
50
 
51
51
  # Indicate if the text should be shrunk to the fit in the cell.
52
52
  # @return [Boolean]
53
- attr_accessor :shrinkToFit
53
+ attr_reader :shrinkToFit
54
54
 
55
55
  # The reading order of the text
56
56
  # 0 Context Dependent
57
57
  # 1 Left-to-Right
58
58
  # 2 Right-to-Left
59
59
  # @return [Integer]
60
- attr_accessor :readingOrder
60
+ attr_reader :readingOrder
61
61
 
62
62
  # Create a new cell_alignment object
63
63
  # @option options [Symbol] horizontal
@@ -75,14 +75,23 @@ module Axlsx
75
75
  end
76
76
  end
77
77
 
78
+ # @see horizontal
78
79
  def horizontal=(v) Axlsx::validate_horizontal_alignment v; @horizontal = v end
80
+ # @see vertical
79
81
  def vertical=(v) Axlsx::validate_vertical_alignment v; @vertical = v end
82
+ # @see textRotation
80
83
  def textRotation=(v) Axlsx::validate_unsigned_int v; @textRotation = v end
84
+ # @see wrapText
81
85
  def wrapText=(v) Axlsx::validate_boolean v; @wrapText = v end
86
+ # @see indent
82
87
  def indent=(v) Axlsx::validate_unsigned_int v; @indent = v end
88
+ # @see relativeIndent
83
89
  def relativeIndent=(v) Axlsx::validate_int v; @relativeIndent = v end
90
+ # @see justifyLastLine
84
91
  def justifyLastLine=(v) Axlsx::validate_boolean v; @justifyLastLine = v end
92
+ # @see shrinkToFit
85
93
  def shrinkToFit=(v) Axlsx::validate_boolean v; @shrinkToFit = v end
94
+ # @see readingOrder
86
95
  def readingOrder=(v) Axlsx::validate_unsigned_int v; @readingOrder = v end
87
96
 
88
97
  # Serializes the cell alignment
@@ -6,11 +6,11 @@ module Axlsx
6
6
 
7
7
  # specifies locking for cells that have the style containing this protection
8
8
  # @return [Boolean]
9
- attr_accessor :hidden
9
+ attr_reader :hidden
10
10
 
11
11
  # specifies if the cells that have the style containing this protection
12
12
  # @return [Boolean]
13
- attr_accessor :locked
13
+ attr_reader :locked
14
14
 
15
15
  # Creates a new CellProtection
16
16
  # @option options [Boolean] hidden value for hidden protection
@@ -20,7 +20,10 @@ module Axlsx
20
20
  self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
21
21
  end
22
22
  end
23
+
24
+ # @see hidden
23
25
  def hidden=(v) Axlsx::validate_boolean v; @hidden = v end
26
+ # @see locked
24
27
  def locked=(v) Axlsx::validate_boolean v; @locked = v end
25
28
 
26
29
  # Serializes the cell protection
@@ -5,29 +5,29 @@ module Axlsx
5
5
  class CellStyle
6
6
  # The name of this cell style
7
7
  # @return [String]
8
- attr_accessor :name
8
+ attr_reader :name
9
9
 
10
10
  # The formatting record id this named style utilizes
11
11
  # @return [Integer]
12
12
  # @see Axlsx::Xf
13
- attr_accessor :xfId
13
+ attr_reader :xfId
14
14
 
15
15
  # The buildinId to use when this named style is applied
16
16
  # @return [Integer]
17
17
  # @see Axlsx::NumFmt
18
- attr_accessor :builtinId
18
+ attr_reader :builtinId
19
19
 
20
20
  # Determines if this formatting is for an outline style, and what level of the outline it is to be applied to.
21
21
  # @return [Integer]
22
- attr_accessor :iLevel
22
+ attr_reader :iLevel
23
23
 
24
24
  # Determines if this named style should show in the list of styles when using excel
25
25
  # @return [Boolean]
26
- attr_accessor :hidden
26
+ attr_reader :hidden
27
27
 
28
28
  # Indicates that the build in style reference has been customized.
29
29
  # @return [Boolean]
30
- attr_accessor :customBuiltin
30
+ attr_reader :customBuiltin
31
31
 
32
32
  # Creats a new CellStyle object
33
33
  # @option options [String] name
@@ -41,12 +41,17 @@ module Axlsx
41
41
  self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
42
42
  end
43
43
  end
44
-
44
+ # @see name
45
45
  def name=(v) Axlsx::validate_string v; @name = v end
46
+ # @see xfId
46
47
  def xfId=(v) Axlsx::validate_unsigned_int v; @xfId = v end
48
+ # @see builtinId
47
49
  def builtinId=(v) Axlsx::validate_unsigned_int v; @builtinId = v end
50
+ # @see iLivel
48
51
  def iLevel=(v) Axlsx::validate_unsigned_int v; @iLevel = v end
52
+ # @see hidden
49
53
  def hidden=(v) Axlsx::validate_boolean v; @hidden = v end
54
+ # @see customBuiltin
50
55
  def customBuiltin=(v) Axlsx::validate_boolean v; @customBuiltin = v end
51
56
 
52
57
  # Serializes the cell style
@@ -3,11 +3,11 @@ module Axlsx
3
3
  class Color
4
4
  # Determines if the color is system color dependant
5
5
  # @return [Boolean]
6
- attr_accessor :auto
6
+ attr_reader :auto
7
7
 
8
8
  # Backwards compatability color index
9
9
  # return [Integer]
10
- #attr_accessor :indexed
10
+ #attr_reader :indexed
11
11
 
12
12
  # The color as defined in rgb terms.
13
13
  # @note
@@ -16,16 +16,16 @@ module Axlsx
16
16
  # "FF000000" is black
17
17
  # "FFFFFFFF" is white
18
18
  # @return [String]
19
- attr_accessor :rgb
19
+ attr_reader :rgb
20
20
 
21
21
  # no support for theme just yet
22
22
  # @return [Integer]
23
- #attr_accessor :theme
23
+ #attr_reader :theme
24
24
 
25
25
  # The tint value.
26
26
  # @note valid values are between -1.0 and 1.0
27
27
  # @return [Float]
28
- attr_accessor :tint
28
+ attr_reader :tint
29
29
 
30
30
  # Creates a new Color object
31
31
  # @option options [Boolean] auto
@@ -37,9 +37,11 @@ module Axlsx
37
37
  self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
38
38
  end
39
39
  end
40
-
40
+ # @see auto
41
41
  def auto=(v) Axlsx::validate_boolean v; @auto = v end
42
+ # @see rgb
42
43
  def rgb=(v) Axlsx::validate_string v; @rgb = v end
44
+ # @see tint
43
45
  def tint=(v) Axlsx::validate_float v; @tint = v end
44
46
 
45
47
  # This version does not support themes
@@ -8,7 +8,7 @@ module Axlsx
8
8
 
9
9
  # The type of fill
10
10
  # @return [PatternFill, GradientFill]
11
- attr_accessor :fill_type
11
+ attr_reader :fill_type
12
12
 
13
13
  # Creates a new Fill object
14
14
  # @param [PatternFill, GradientFill] fill_type
@@ -24,6 +24,7 @@ module Axlsx
24
24
  xml.fill { @fill_type.to_xml(xml) }
25
25
  end
26
26
 
27
+ # @see fill_type
27
28
  def fill_type=(v) DataTypeValidator.validate "Fill.fill_type", [PatternFill, GradientFill], v; @fill_type = v; end
28
29
 
29
30
 
@@ -5,7 +5,7 @@ module Axlsx
5
5
  class Font
6
6
  # The name of the font
7
7
  # @return [String]
8
- attr_accessor :name
8
+ attr_reader :name
9
9
 
10
10
  # The charset of the font
11
11
  # @return [Integer]
@@ -30,7 +30,7 @@ module Axlsx
30
30
  # 222 THAI_CHARSET
31
31
  # 238 EASTEUROPE_CHARSET
32
32
  # 255 OEM_CHARSET
33
- attr_accessor :charset
33
+ attr_reader :charset
34
34
 
35
35
  # The font's family
36
36
  # @note
@@ -43,43 +43,43 @@ module Axlsx
43
43
  # 5 Decorative
44
44
  # 6..14 Reserved for future use
45
45
  # @return [Integer]
46
- attr_accessor :family
46
+ attr_reader :family
47
47
 
48
48
  # Indicates if the font should be rendered in *bold*
49
49
  # @return [Boolean]
50
- attr_accessor :b
50
+ attr_reader :b
51
51
 
52
52
  # Indicates if the font should be rendered italicized
53
53
  # @return [Boolean]
54
- attr_accessor :i
54
+ attr_reader :i
55
55
 
56
56
  # Indicates if the font should be rendered with a strikthrough
57
57
  # @return [Boolean]
58
- attr_accessor :strike
58
+ attr_reader :strike
59
59
 
60
60
  # Indicates if the font should be rendered with an outline
61
61
  # @return [Boolean]
62
- attr_accessor :outline
62
+ attr_reader :outline
63
63
 
64
64
  # Indicates if the font should be rendered with a shadow
65
65
  # @return [Boolean]
66
- attr_accessor :shadow
66
+ attr_reader :shadow
67
67
 
68
68
  # Indicates if the font should be condensed
69
69
  # @return [Boolean]
70
- attr_accessor :condense
70
+ attr_reader :condense
71
71
 
72
72
  # The font's extend property
73
73
  # @return [Boolean]
74
- attr_accessor :extend
74
+ attr_reader :extend
75
75
 
76
76
  # The color of the font
77
77
  # @return [Color]
78
- attr_accessor :color
78
+ attr_reader :color
79
79
 
80
80
  # The size of the font.
81
81
  # @return [Integer]
82
- attr_accessor :sz
82
+ attr_reader :sz
83
83
 
84
84
  # Creates a new Font
85
85
  # @option options [String] name
@@ -100,18 +100,29 @@ module Axlsx
100
100
  self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
101
101
  end
102
102
  end
103
-
103
+ # @see name
104
104
  def name=(v) Axlsx::validate_string v; @name = v end
105
+ # @see charset
105
106
  def charset=(v) Axlsx::validate_unsigned_int v; @charset = v end
107
+ # @see family
106
108
  def family=(v) Axlsx::validate_unsigned_int v; @family = v end
109
+ # @see b
107
110
  def b=(v) Axlsx::validate_boolean v; @b = v end
111
+ # @see i
108
112
  def i=(v) Axlsx::validate_boolean v; @i = v end
113
+ # @see strike
109
114
  def strike=(v) Axlsx::validate_boolean v; @strike = v end
115
+ # @see outline
110
116
  def outline=(v) Axlsx::validate_boolean v; @outline = v end
117
+ # @see shadow
111
118
  def shadow=(v) Axlsx::validate_boolean v; @shadow = v end
119
+ # @see condense
112
120
  def condense=(v) Axlsx::validate_boolean v; @condense = v end
121
+ # @see extend
113
122
  def extend=(v) Axlsx::validate_boolean v; @extend = v end
123
+ # @see color
114
124
  def color=(v) DataTypeValidator.validate "Font.color", Color, v; @color=v end
125
+ # @see sz
115
126
  def sz=(v) Axlsx::validate_unsigned_int v; @sz=v end
116
127
 
117
128
  # Serializes the fill
@@ -10,27 +10,27 @@ module Axlsx
10
10
  # :linear
11
11
  # :path
12
12
  # @return [Symbol]
13
- attr_accessor :type
13
+ attr_reader :type
14
14
 
15
15
  # Angle of the linear gradient
16
16
  # @return [Float]
17
- attr_accessor :degree
17
+ attr_reader :degree
18
18
 
19
19
  # Percentage format left
20
20
  # @return [Float]
21
- attr_accessor :left
21
+ attr_reader :left
22
22
 
23
23
  # Percentage format right
24
24
  # @return [Float]
25
- attr_accessor :right
25
+ attr_reader :right
26
26
 
27
27
  # Percentage format top
28
28
  # @return [Float]
29
- attr_accessor :top
29
+ attr_reader :top
30
30
 
31
31
  # Percentage format bottom
32
32
  # @return [Float]
33
- attr_accessor :bottom
33
+ attr_reader :bottom
34
34
 
35
35
  # Collection of stop objects
36
36
  # @return [SimpleTypedList]
@@ -51,12 +51,18 @@ module Axlsx
51
51
  @stop = SimpleTypedList.new GradientStop
52
52
  end
53
53
 
54
+ # @see type
54
55
  def type=(v) Axlsx::validate_gradient_type v; @type = v end
56
+ # @see degree
55
57
  def degree=(v) Axlsx::validate_float v; @degree = v end
56
- def left=(v) DataTypeValidator.validate "GradientFill.left", Float, v, lambda { |v| v >= 0.0 && v <= 1.0}; @left = v end
57
- def right=(v) DataTypeValidator.validate "GradientFill.right", Float, v, lambda { |v| v >= 0.0 && v <= 1.0}; @right = v end
58
- def top=(v) DataTypeValidator.validate "GradientFill.top", Float, v, lambda { |v| v >= 0.0 && v <= 1.0}; @top = v end
59
- def bottom=(v) DataTypeValidator.validate "GradientFill.bottom", Float, v, lambda { |v| v >= 0.0 && v <= 1.0}; @bottom= 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
60
66
 
61
67
  # Serializes the gradientFill
62
68
  # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
@@ -6,11 +6,11 @@ module Axlsx
6
6
  # The color for this gradient stop
7
7
  # @return [Color]
8
8
  # @see Color
9
- attr_accessor :color
9
+ attr_reader :color
10
10
 
11
11
  # The position of the color
12
12
  # @return [Float]
13
- attr_accessor :position
13
+ attr_reader :position
14
14
 
15
15
  # Creates a new GradientStop object
16
16
  # @param [Color] color
@@ -20,8 +20,10 @@ module Axlsx
20
20
  self.position = position
21
21
  end
22
22
 
23
+ # @see color
23
24
  def color=(v) DataTypeValidator.validate "GradientStop.color", Color, v; @color=v end
24
- def position=(v) DataTypeValidator.validate "GradientStop.position", Float, v, lambda { |v| v >= 0 && v <= 1}; @position = v end
25
+ # @see position
26
+ def position=(v) DataTypeValidator.validate "GradientStop.position", Float, v, lambda { |arg| arg >= 0 && arg <= 1}; @position = v end
25
27
 
26
28
  # Serializes the gradientStop
27
29
  # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.