rubyXL 2.2.0 → 2.3.0

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 (238) hide show
  1. data/VERSION +1 -1
  2. data/lib/rubyXL/objects/border.rb +3 -3
  3. data/lib/rubyXL/objects/chartsheet.rb +20 -5
  4. data/lib/rubyXL/objects/fill.rb +3 -3
  5. data/lib/rubyXL/objects/filters.rb +5 -5
  6. data/lib/rubyXL/objects/font.rb +3 -3
  7. data/lib/rubyXL/objects/ooxml_object.rb +209 -138
  8. data/lib/rubyXL/objects/relationships.rb +2 -2
  9. data/lib/rubyXL/objects/sheet_common.rb +2 -2
  10. data/lib/rubyXL/objects/stylesheet.rb +35 -35
  11. data/lib/rubyXL/objects/workbook.rb +26 -27
  12. data/lib/rubyXL/objects/worksheet.rb +59 -51
  13. data/lib/rubyXL/parser.rb +22 -12
  14. data/lib/rubyXL/workbook.rb +5 -6
  15. data/lib/rubyXL/worksheet.rb +3 -3
  16. data/lib/rubyXL/writer/workbook_writer.rb +2 -2
  17. data/rdoc/README_rdoc.html +1 -1
  18. data/rdoc/RubyXL.html +1 -1
  19. data/rdoc/RubyXL/AExtensionStorageArea.html +1 -1
  20. data/rdoc/RubyXL/Alignment.html +1 -1
  21. data/rdoc/RubyXL/AlternateContent.html +1 -1
  22. data/rdoc/RubyXL/AutoFilter.html +1 -1
  23. data/rdoc/RubyXL/AutoFilterColumn.html +1 -1
  24. data/rdoc/RubyXL/BooleanNode.html +1 -1
  25. data/rdoc/RubyXL/BooleanValue.html +1 -1
  26. data/rdoc/RubyXL/Border.html +1 -1
  27. data/rdoc/RubyXL/BorderEdge.html +1 -1
  28. data/rdoc/RubyXL/{FillContainer.html → Borders.html} +5 -5
  29. data/rdoc/RubyXL/Break.html +1 -1
  30. data/rdoc/RubyXL/BreakList.html +2 -2
  31. data/rdoc/RubyXL/CalculationChain.html +1 -1
  32. data/rdoc/RubyXL/CalculationChainCell.html +1 -1
  33. data/rdoc/RubyXL/CalculationProperties.html +1 -1
  34. data/rdoc/RubyXL/Cell.html +1 -1
  35. data/rdoc/RubyXL/CellSmartTag.html +1 -1
  36. data/rdoc/RubyXL/CellSmartTagProperty.html +1 -1
  37. data/rdoc/RubyXL/CellSmartTags.html +105 -0
  38. data/rdoc/RubyXL/CellStyle.html +1 -1
  39. data/rdoc/RubyXL/CellStyleXFs.html +105 -0
  40. data/rdoc/RubyXL/CellStyles.html +105 -0
  41. data/rdoc/RubyXL/CellValue.html +1 -1
  42. data/rdoc/RubyXL/CellWatch.html +1 -1
  43. data/rdoc/RubyXL/{CellXFContainer.html → CellWatches.html} +5 -5
  44. data/rdoc/RubyXL/CellXFs.html +105 -0
  45. data/rdoc/RubyXL/Chartsheet.html +1 -1
  46. data/rdoc/RubyXL/ChartsheetPageSetup.html +1 -1
  47. data/rdoc/RubyXL/ChartsheetProperties.html +1 -1
  48. data/rdoc/RubyXL/ChartsheetProtection.html +1 -1
  49. data/rdoc/RubyXL/ChartsheetView.html +1 -1
  50. data/rdoc/RubyXL/{BorderContainer.html → ChartsheetViews.html} +4 -4
  51. data/rdoc/RubyXL/Color.html +1 -1
  52. data/rdoc/RubyXL/ColorFilter.html +1 -1
  53. data/rdoc/RubyXL/ColorScale.html +1 -1
  54. data/rdoc/RubyXL/ColorScheme.html +1 -1
  55. data/rdoc/RubyXL/ColorSet.html +1 -1
  56. data/rdoc/RubyXL/Colors.html +1 -1
  57. data/rdoc/RubyXL/ColumnRange.html +1 -1
  58. data/rdoc/RubyXL/ColumnRanges.html +1 -1
  59. data/rdoc/RubyXL/ConditionalFormatValue.html +1 -1
  60. data/rdoc/RubyXL/ConditionalFormatting.html +2 -2
  61. data/rdoc/RubyXL/ConditionalFormattingRule.html +1 -1
  62. data/rdoc/RubyXL/CustomFilter.html +1 -1
  63. data/rdoc/RubyXL/{CustomFilterContainer.html → CustomFilters.html} +5 -5
  64. data/rdoc/RubyXL/{CellStyleXFContainer.html → CustomProperties.html} +5 -5
  65. data/rdoc/RubyXL/CustomProperty.html +1 -1
  66. data/rdoc/RubyXL/CustomSheetView.html +1 -1
  67. data/rdoc/RubyXL/CustomSheetViews.html +2 -2
  68. data/rdoc/RubyXL/CustomWorkbookView.html +1 -1
  69. data/rdoc/RubyXL/{CustomWorkbookViewContainer.html → CustomWorkbookViews.html} +5 -5
  70. data/rdoc/RubyXL/DXF.html +1 -1
  71. data/rdoc/RubyXL/DXFs.html +1 -1
  72. data/rdoc/RubyXL/DataBar.html +1 -1
  73. data/rdoc/RubyXL/DataConsolidate.html +1 -1
  74. data/rdoc/RubyXL/DataConsolidationReference.html +1 -1
  75. data/rdoc/RubyXL/DataConsolidationReferences.html +2 -2
  76. data/rdoc/RubyXL/DataValidation.html +1 -1
  77. data/rdoc/RubyXL/DataValidations.html +1 -1
  78. data/rdoc/RubyXL/DateGroupItem.html +1 -1
  79. data/rdoc/RubyXL/DefinedName.html +1 -1
  80. data/rdoc/RubyXL/DefinedNames.html +2 -2
  81. data/rdoc/RubyXL/DocumentProperties.html +1 -1
  82. data/rdoc/RubyXL/DynamicFilter.html +1 -1
  83. data/rdoc/RubyXL/EmbeddedControl.html +1 -1
  84. data/rdoc/RubyXL/{EmbeddedControlContainer.html → EmbeddedControls.html} +5 -5
  85. data/rdoc/RubyXL/Extension.html +1 -1
  86. data/rdoc/RubyXL/ExtensionStorageArea.html +1 -1
  87. data/rdoc/RubyXL/ExternalReference.html +1 -1
  88. data/rdoc/RubyXL/ExternalReferences.html +2 -2
  89. data/rdoc/RubyXL/FieldItem.html +1 -1
  90. data/rdoc/RubyXL/FileRecoveryProperties.html +1 -1
  91. data/rdoc/RubyXL/FileSharing.html +1 -1
  92. data/rdoc/RubyXL/FileVersion.html +1 -1
  93. data/rdoc/RubyXL/Fill.html +1 -1
  94. data/rdoc/RubyXL/{FontContainer.html → Fills.html} +5 -5
  95. data/rdoc/RubyXL/FilterContainer.html +1 -1
  96. data/rdoc/RubyXL/FloatNode.html +1 -1
  97. data/rdoc/RubyXL/FloatValue.html +1 -1
  98. data/rdoc/RubyXL/Font.html +1 -1
  99. data/rdoc/RubyXL/FontScheme.html +1 -1
  100. data/rdoc/RubyXL/Fonts.html +105 -0
  101. data/rdoc/RubyXL/FormatScheme.html +1 -1
  102. data/rdoc/RubyXL/Formula.html +1 -1
  103. data/rdoc/RubyXL/FunctionGroup.html +1 -1
  104. data/rdoc/RubyXL/{CellWatchContainer.html → FunctionGroups.html} +5 -5
  105. data/rdoc/RubyXL/GenericStorage.html +1 -1
  106. data/rdoc/RubyXL/GradientFill.html +1 -1
  107. data/rdoc/RubyXL/HeaderFooterSettings.html +1 -1
  108. data/rdoc/RubyXL/Hyperlink.html +1 -1
  109. data/rdoc/RubyXL/Hyperlinks.html +105 -0
  110. data/rdoc/RubyXL/IconFilter.html +1 -1
  111. data/rdoc/RubyXL/IconSet.html +1 -1
  112. data/rdoc/RubyXL/IgnoredError.html +1 -1
  113. data/rdoc/RubyXL/IgnoredErrors.html +105 -0
  114. data/rdoc/RubyXL/IndexedColors.html +105 -0
  115. data/rdoc/RubyXL/InputCells.html +1 -1
  116. data/rdoc/RubyXL/IntegerNode.html +1 -1
  117. data/rdoc/RubyXL/IntegerValue.html +1 -1
  118. data/rdoc/RubyXL/LegacyCell.html +1 -1
  119. data/rdoc/RubyXL/LegacyWorkbook.html +25 -25
  120. data/rdoc/RubyXL/LegacyWorksheet.html +3 -29
  121. data/rdoc/RubyXL/{ChartsheetViewContainer.html → MRUColors.html} +5 -5
  122. data/rdoc/RubyXL/MergedCell.html +1 -1
  123. data/rdoc/RubyXL/MergedCells.html +2 -2
  124. data/rdoc/RubyXL/NumFmt.html +1 -1
  125. data/rdoc/RubyXL/NumberFormat.html +1 -1
  126. data/rdoc/RubyXL/{NumberFormatContainer.html → NumberFormats.html} +6 -6
  127. data/rdoc/RubyXL/OLEObject.html +1 -1
  128. data/rdoc/RubyXL/OLEObjects.html +2 -2
  129. data/rdoc/RubyXL/OLESize.html +1 -1
  130. data/rdoc/RubyXL/OOXMLContainerObject.html +105 -0
  131. data/rdoc/RubyXL/OOXMLObject.html +1 -758
  132. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +559 -0
  133. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +98 -0
  134. data/rdoc/RubyXL/OOXMLTopLevelObject.html +1 -1
  135. data/rdoc/RubyXL/OutlineProperties.html +1 -1
  136. data/rdoc/RubyXL/PageMargins.html +1 -1
  137. data/rdoc/RubyXL/PageSetup.html +1 -1
  138. data/rdoc/RubyXL/PageSetupProperties.html +1 -1
  139. data/rdoc/RubyXL/Pane.html +1 -1
  140. data/rdoc/RubyXL/Parser.html +23 -13
  141. data/rdoc/RubyXL/PatternFill.html +1 -1
  142. data/rdoc/RubyXL/PhoneticProperties.html +1 -1
  143. data/rdoc/RubyXL/PhoneticRun.html +1 -1
  144. data/rdoc/RubyXL/PivotArea.html +1 -1
  145. data/rdoc/RubyXL/PivotCache.html +1 -1
  146. data/rdoc/RubyXL/PivotCaches.html +2 -2
  147. data/rdoc/RubyXL/PivotReference.html +1 -1
  148. data/rdoc/RubyXL/{CellStyleContainer.html → PivotReferences.html} +5 -5
  149. data/rdoc/RubyXL/PivotTableSelection.html +1 -1
  150. data/rdoc/RubyXL/PrintOptions.html +1 -1
  151. data/rdoc/RubyXL/ProtectedRange.html +1 -1
  152. data/rdoc/RubyXL/ProtectedRanges.html +2 -2
  153. data/rdoc/RubyXL/Protection.html +1 -1
  154. data/rdoc/RubyXL/RID.html +1 -1
  155. data/rdoc/RubyXL/RawOOXML.html +1 -1
  156. data/rdoc/RubyXL/Reference.html +1 -1
  157. data/rdoc/RubyXL/Relationship.html +1 -1
  158. data/rdoc/RubyXL/RichText.html +1 -1
  159. data/rdoc/RubyXL/RichTextRun.html +1 -1
  160. data/rdoc/RubyXL/Row.html +1 -1
  161. data/rdoc/RubyXL/RunProperties.html +1 -1
  162. data/rdoc/RubyXL/Scenario.html +1 -1
  163. data/rdoc/RubyXL/Scenarios.html +105 -0
  164. data/rdoc/RubyXL/Selection.html +1 -1
  165. data/rdoc/RubyXL/SharedStringsTable.html +3 -3
  166. data/rdoc/RubyXL/Sheet.html +1 -1
  167. data/rdoc/RubyXL/SheetCalculationProperties.html +1 -1
  168. data/rdoc/RubyXL/SheetData.html +1 -1
  169. data/rdoc/RubyXL/Sheets.html +2 -2
  170. data/rdoc/RubyXL/SmartTagProperties.html +1 -1
  171. data/rdoc/RubyXL/SmartTagType.html +1 -1
  172. data/rdoc/RubyXL/SmartTagTypes.html +105 -0
  173. data/rdoc/RubyXL/SmartTags.html +105 -0
  174. data/rdoc/RubyXL/SortCondition.html +1 -1
  175. data/rdoc/RubyXL/SortState.html +1 -1
  176. data/rdoc/RubyXL/Sqref.html +1 -1
  177. data/rdoc/RubyXL/Stop.html +1 -1
  178. data/rdoc/RubyXL/StringNode.html +1 -1
  179. data/rdoc/RubyXL/StringValue.html +1 -1
  180. data/rdoc/RubyXL/Stylesheet.html +1 -1
  181. data/rdoc/RubyXL/TableParts.html +2 -2
  182. data/rdoc/RubyXL/TableStyle.html +1 -1
  183. data/rdoc/RubyXL/TableStyles.html +2 -2
  184. data/rdoc/RubyXL/Text.html +1 -1
  185. data/rdoc/RubyXL/Theme.html +1 -1
  186. data/rdoc/RubyXL/ThemeElements.html +1 -1
  187. data/rdoc/RubyXL/Top10.html +1 -1
  188. data/rdoc/RubyXL/Variant.html +1 -1
  189. data/rdoc/RubyXL/Vector.html +1 -1
  190. data/rdoc/RubyXL/VectorValue.html +1 -1
  191. data/rdoc/RubyXL/WebPublishObject.html +1 -1
  192. data/rdoc/RubyXL/{WebPublishObjectContainer.html → WebPublishObjects.html} +5 -5
  193. data/rdoc/RubyXL/WebPublishingItem.html +1 -1
  194. data/rdoc/RubyXL/{WebPublishingItemContainer.html → WebPublishingItems.html} +5 -5
  195. data/rdoc/RubyXL/WebPublishingProperties.html +1 -1
  196. data/rdoc/RubyXL/Workbook.html +1 -1
  197. data/rdoc/RubyXL/WorkbookProperties.html +1 -1
  198. data/rdoc/RubyXL/WorkbookProtection.html +1 -1
  199. data/rdoc/RubyXL/WorkbookRelationships.html +3 -3
  200. data/rdoc/RubyXL/WorkbookView.html +1 -1
  201. data/rdoc/RubyXL/WorkbookViews.html +2 -2
  202. data/rdoc/RubyXL/Worksheet.html +1 -1
  203. data/rdoc/RubyXL/WorksheetDimensions.html +1 -1
  204. data/rdoc/RubyXL/WorksheetFormatProperties.html +1 -1
  205. data/rdoc/RubyXL/WorksheetProperties.html +1 -1
  206. data/rdoc/RubyXL/WorksheetProtection.html +1 -1
  207. data/rdoc/RubyXL/WorksheetView.html +1 -1
  208. data/rdoc/RubyXL/WorksheetViews.html +2 -2
  209. data/rdoc/RubyXL/Writer.html +1 -1
  210. data/rdoc/RubyXL/Writer/ContentTypesWriter.html +1 -1
  211. data/rdoc/RubyXL/Writer/CoreWriter.html +1 -1
  212. data/rdoc/RubyXL/Writer/GenericWriter.html +1 -1
  213. data/rdoc/RubyXL/Writer/RootRelsWriter.html +1 -1
  214. data/rdoc/RubyXL/Writer/StylesWriter.html +1 -1
  215. data/rdoc/RubyXL/Writer/ThemeWriter.html +1 -1
  216. data/rdoc/RubyXL/Writer/WorkbookWriter.html +3 -3
  217. data/rdoc/RubyXL/XF.html +1 -1
  218. data/rdoc/created.rid +19 -20
  219. data/rdoc/index.html +4 -6
  220. data/rdoc/js/search_index.js +1 -1
  221. data/rdoc/table_of_contents.html +89 -132
  222. data/rubyXL.gemspec +30 -29
  223. data/spec/lib/parser_spec.rb +3 -1
  224. data/spec/lib/stylesheet_spec.rb +1 -1
  225. metadata +31 -30
  226. data/lib/rubyXL/writer/worksheet_writer.rb +0 -41
  227. data/rdoc/RubyXL/CellSmartTagContainer.html +0 -105
  228. data/rdoc/RubyXL/CustomPropertyContainer.html +0 -105
  229. data/rdoc/RubyXL/FunctionGroupContainer.html +0 -105
  230. data/rdoc/RubyXL/HyperlinkContainer.html +0 -105
  231. data/rdoc/RubyXL/IgnoredErrorContainer.html +0 -105
  232. data/rdoc/RubyXL/IndexedColorContainer.html +0 -105
  233. data/rdoc/RubyXL/MRUColorContainer.html +0 -105
  234. data/rdoc/RubyXL/PivotReferenceContainer.html +0 -105
  235. data/rdoc/RubyXL/ScenarioContainer.html +0 -105
  236. data/rdoc/RubyXL/SmartTagContainer.html +0 -105
  237. data/rdoc/RubyXL/SmartTagTypeContainer.html +0 -105
  238. data/rdoc/RubyXL/Writer/WorksheetWriter.html +0 -236
@@ -0,0 +1,559 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module RubyXL::OOXMLObjectClassMethods - rubyXL 2.3.0</title>
8
+
9
+ <link href="../fonts.css" rel="stylesheet">
10
+ <link href="../rdoc.css" rel="stylesheet">
11
+
12
+ <script type="text/javascript">
13
+ var rdoc_rel_prefix = "../";
14
+ </script>
15
+
16
+ <script src="../js/jquery.js"></script>
17
+ <script src="../js/navigation.js"></script>
18
+ <script src="../js/search_index.js"></script>
19
+ <script src="../js/search.js"></script>
20
+ <script src="../js/searcher.js"></script>
21
+ <script src="../js/darkfish.js"></script>
22
+
23
+
24
+ <body id="top" role="document" class="module">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../table_of_contents.html#pages">Pages</a>
34
+ <a href="../table_of_contents.html#classes">Classes</a>
35
+ <a href="../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+
61
+
62
+
63
+ <!-- Method Quickref -->
64
+ <div id="method-list-section" class="nav-section">
65
+ <h3>Methods</h3>
66
+
67
+ <ul class="link-list" role="directory">
68
+
69
+ <li ><a href="#method-i-define_attribute">#define_attribute</a>
70
+
71
+ <li ><a href="#method-i-define_child_node">#define_child_node</a>
72
+
73
+ <li ><a href="#method-i-define_element_name">#define_element_name</a>
74
+
75
+ <li ><a href="#method-i-obtain_class_variable">#obtain_class_variable</a>
76
+
77
+ <li ><a href="#method-i-parse">#parse</a>
78
+
79
+ <li ><a href="#method-i-set_countable">#set_countable</a>
80
+
81
+ </ul>
82
+ </div>
83
+
84
+ </div>
85
+ </nav>
86
+
87
+ <main role="main" aria-labelledby="module-RubyXL::OOXMLObjectClassMethods">
88
+ <h1 id="module-RubyXL::OOXMLObjectClassMethods" class="module">
89
+ module RubyXL::OOXMLObjectClassMethods
90
+ </h1>
91
+
92
+ <section class="description">
93
+
94
+ </section>
95
+
96
+
97
+
98
+
99
+ <section id="5Buntitled-5D" class="documentation-section">
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
110
+ <header>
111
+ <h3>Public Instance Methods</h3>
112
+ </header>
113
+
114
+
115
+ <div id="method-i-define_attribute" class="method-detail ">
116
+
117
+ <div class="method-heading">
118
+ <span class="method-name">define_attribute</span><span
119
+ class="method-args">(attr_name, attr_type, extra_params = {})</span>
120
+
121
+ <span class="method-click-advice">click to toggle source</span>
122
+
123
+ </div>
124
+
125
+
126
+ <div class="method-description">
127
+
128
+ <p>Defines an attribute of OOXML object.</p>
129
+
130
+ <h3 id="method-i-define_attribute-label-Parameters">Parameters<span><a href="#method-i-define_attribute-label-Parameters">&para;</a> <a href="#documentation">&uarr;</a></span></h3>
131
+ <ul><li>
132
+ <p><code>attribute_name</code> - Name of the element attribute as seen in the
133
+ source XML. Can be either <code>&quot;String&quot;</code> or
134
+ <code>:Symbol</code></p>
135
+ <ul><li>
136
+ <p>Special attibute name <code>'_'</code> (underscore) denotes the value of
137
+ the element rather than attribute.</p>
138
+ </li></ul>
139
+ </li><li>
140
+ <p><code>attribute_type</code> - Specifies the conversion type for the
141
+ attribute when parsing. Available options are:</p>
142
+ <ul><li>
143
+ <p><code>:int</code> - <code>Integer</code></p>
144
+ </li><li>
145
+ <p><code>:float</code> - <code>Float</code></p>
146
+ </li><li>
147
+ <p><code>:string</code> - <code>String</code> (no conversion)</p>
148
+ </li><li>
149
+ <p><code>:sqref</code> - <a href="Sqref.html">RubyXL::Sqref</a></p>
150
+ </li><li>
151
+ <p><code>:ref</code> - <a href="Reference.html">RubyXL::Reference</a></p>
152
+ </li><li>
153
+ <p><code>:bool</code> - <code>Boolean</code> ("1" and "true" convert to
154
+ <code>true</code>, others to <code>false</code>)</p>
155
+ </li><li>
156
+ <p>one of <code>simple_types</code> - <code>String</code>, plus the list of
157
+ acceptable values is saved for future validation (not used yet).</p>
158
+ </li></ul>
159
+ </li><li>
160
+ <p><code>extra_parameters</code> - Hash of optional parameters as follows:</p>
161
+ <ul><li>
162
+ <p><code>:accessor</code> - Name of the accessor for this attribute to be
163
+ defined on the object. If not provided, defaults to classidied
164
+ <code>attribute_name</code>.</p>
165
+ </li><li>
166
+ <p><code>:default</code> - Value this attribute defaults to if not explicitly
167
+ provided.</p>
168
+ </li><li>
169
+ <p><code>:required</code> - Whether this attribute is required when writing
170
+ XML. If the value of the attrinute is not explicitly provided,
171
+ <code>:default</code> is written instead.</p>
172
+ </li><li>
173
+ <p><code>:computed</code> - Do not store this attribute on <code>parse</code>,
174
+ but do call the object-provided read accessor on <code>write_xml</code>.</p>
175
+ </li></ul>
176
+ </li></ul>
177
+
178
+ <h4 id="method-i-define_attribute-label-Examples">Examples<span><a href="#method-i-define_attribute-label-Examples">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
179
+
180
+ <pre class="ruby"><span class="ruby-identifier">define_attribute</span>(:<span class="ruby-identifier">outline</span>, :<span class="ruby-identifier">bool</span>, :<span class="ruby-identifier">default</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>)
181
+ </pre>
182
+
183
+ <p>A <code>Boolean</code> attribute ‘outline’ with default value
184
+ <code>true</code> will be accessible by calling <code>obj.outline</code></p>
185
+
186
+ <pre>define_attribute(:uniqueCount, :int)</pre>
187
+
188
+ <p>An <code>Integer</code> attribute ‘uniqueCount’ accessible as
189
+ <code>obj.unique_count</code></p>
190
+
191
+ <pre class="ruby"><span class="ruby-identifier">define_attribute</span>(:<span class="ruby-identifier">_</span>, :<span class="ruby-identifier">string</span>, :<span class="ruby-identifier">accessor</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">expression</span>)
192
+ </pre>
193
+
194
+ <p>The value of the element will be accessible as a <code>String</code> by
195
+ calling <code>obj.expression</code></p>
196
+
197
+ <pre class="ruby"><span class="ruby-identifier">define_attribute</span>(:<span class="ruby-identifier">errorStyle</span>, <span class="ruby-node">%w{ stop warning information }</span>, :<span class="ruby-identifier">default</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'stop'</span>,)
198
+ </pre>
199
+
200
+ <p>A <code>String</code> attribute named ‘errorStyle’ will be accessible as
201
+ <code>obj.error_style</code>, valid values are
202
+ <code>&quot;stop&quot;</code>, <code>&quot;warning&quot;</code>,
203
+ <code>&quot;information&quot;</code></p>
204
+
205
+
206
+
207
+
208
+ <div class="method-source-code" id="define_attribute-source">
209
+ <pre><span class="ruby-comment"># File lib/rubyXL/objects/ooxml_object.rb, line 45</span>
210
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">define_attribute</span>(<span class="ruby-identifier">attr_name</span>, <span class="ruby-identifier">attr_type</span>, <span class="ruby-identifier">extra_params</span> = {})
211
+ <span class="ruby-identifier">attrs</span> = <span class="ruby-identifier">obtain_class_variable</span>(<span class="ruby-value">:@@ooxml_attributes</span>)
212
+ <span class="ruby-identifier">attr_hash</span> = <span class="ruby-identifier">extra_params</span>.<span class="ruby-identifier">merge</span>({ <span class="ruby-value">:attr_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">attr_type</span> })
213
+ <span class="ruby-identifier">attr_hash</span>[<span class="ruby-value">:accessor</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">accessorize</span>(<span class="ruby-identifier">attr_name</span>)
214
+ <span class="ruby-identifier">attrs</span>[<span class="ruby-identifier">attr_name</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">attr_hash</span>
215
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-value">:attr_accessor</span>, <span class="ruby-identifier">attr_hash</span>[<span class="ruby-value">:accessor</span>]) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">attr_hash</span>[<span class="ruby-value">:computed</span>]
216
+ <span class="ruby-keyword">end</span></pre>
217
+ </div>
218
+
219
+ </div>
220
+
221
+
222
+
223
+
224
+ </div>
225
+
226
+
227
+ <div id="method-i-define_child_node" class="method-detail ">
228
+
229
+ <div class="method-heading">
230
+ <span class="method-name">define_child_node</span><span
231
+ class="method-args">(klass, extra_params = {})</span>
232
+
233
+ <span class="method-click-advice">click to toggle source</span>
234
+
235
+ </div>
236
+
237
+
238
+ <div class="method-description">
239
+
240
+ <p>Defines a child node of OOXML object.</p>
241
+
242
+ <h3 id="method-i-define_child_node-label-Parameters">Parameters<span><a href="#method-i-define_child_node-label-Parameters">&para;</a> <a href="#documentation">&uarr;</a></span></h3>
243
+ <ul><li>
244
+ <p><code>klass</code> - Class (descendant of RubyXL::OOXMLObject) of the child
245
+ nodes. Child node objects will be produced by calling <code>parse</code>
246
+ method of that class.</p>
247
+ </li><li>
248
+ <p><code>extra_parameters</code> - Hash of optional parameters as follows:</p>
249
+ <ul><li>
250
+ <p><code>:accessor</code> - Name of the accessor for this attribute to be
251
+ defined on the object. If not provided, defaults to classidied
252
+ <code>attribute_name</code>.</p>
253
+ </li><li>
254
+ <p><code>:node_name</code> - Node name for the child node, in case it does not
255
+ match the one defined by the <code>klass</code>.</p>
256
+ </li><li>
257
+ <p><code>:collection</code> - Whether the child node should be treated as a
258
+ single node or a collection of nodes:</p>
259
+ <ul><li>
260
+ <p><code>false</code> (default) - child node is directly accessible through
261
+ the respective accessor;</p>
262
+ </li><li>
263
+ <p><code>true</code> - a collection of child nodes is accessed as
264
+ <code>Array</code> through the respective accessor;</p>
265
+ </li><li>
266
+ <p><code>:with_count</code> - same as <code>true</code>, but in addition, the
267
+ attribute <code>count</code> is defined on the current object, that will be
268
+ automatically set to the number of elements in the collection at the start
269
+ of <code>write_xml</code> call.</p>
270
+ </li></ul>
271
+ </li></ul>
272
+ </li></ul>
273
+
274
+ <h4 id="method-i-define_child_node-label-Examples">Examples<span><a href="#method-i-define_child_node-label-Examples">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
275
+
276
+ <pre>define_child_node(RubyXL::Alignment)</pre>
277
+
278
+ <p>Define a singular child node parsed by the RubyXL::BorderEdge.parse() and
279
+ accessed by the default <code>obj.alignment</code> accessor</p>
280
+
281
+ <pre class="ruby"><span class="ruby-identifier">define_child_node</span>(<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Hyperlink</span>, :<span class="ruby-identifier">colection</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span>, :<span class="ruby-identifier">accessor</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">hyperlinks</span>)
282
+ </pre>
283
+
284
+ <p>Define an array of nodes accessed by <code>obj.hyperlinks</code> accessor,
285
+ each of which will be parsed by the RubyXL::Hyperlink.parse()</p>
286
+
287
+ <pre class="ruby"><span class="ruby-identifier">define_child_node</span>(<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">BorderEdge</span>, :<span class="ruby-identifier">node_name</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">left</span>)
288
+ <span class="ruby-identifier">define_child_node</span>(<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">BorderEdge</span>, :<span class="ruby-identifier">node_name</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">right</span>)
289
+ </pre>
290
+
291
+ <p>Use class <a href="BorderEdge.html">RubyXL::BorderEdge</a> when parsing
292
+ both the elements <code>&lt;left ...&gt;</code> and <code>&lt;right
293
+ ...&gt;</code> elements.</p>
294
+
295
+ <pre class="ruby"><span class="ruby-identifier">define_child_node</span>(<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Font</span>, :<span class="ruby-identifier">collection</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">with_count</span>, :<span class="ruby-identifier">accessor</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">fonts</span>)
296
+ </pre>
297
+
298
+ <p>Upon writing of the object this was defined on, its <code>count</code>
299
+ attribute will be set to the count of nodes in <code>fonts</code> array</p>
300
+
301
+
302
+
303
+
304
+ <div class="method-source-code" id="define_child_node-source">
305
+ <pre><span class="ruby-comment"># File lib/rubyXL/objects/ooxml_object.rb, line 73</span>
306
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">define_child_node</span>(<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">extra_params</span> = {})
307
+ <span class="ruby-identifier">child_nodes</span> = <span class="ruby-identifier">obtain_class_variable</span>(<span class="ruby-value">:@@ooxml_child_nodes</span>)
308
+ <span class="ruby-identifier">child_node_name</span> = (<span class="ruby-identifier">extra_params</span>[<span class="ruby-value">:node_name</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">class_variable_get</span>(<span class="ruby-value">:@@ooxml_tag_name</span>)).<span class="ruby-identifier">to_s</span>
309
+ <span class="ruby-identifier">accessor</span> = (<span class="ruby-identifier">extra_params</span>[<span class="ruby-value">:accessor</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">accessorize</span>(<span class="ruby-identifier">child_node_name</span>)).<span class="ruby-identifier">to_sym</span>
310
+
311
+ <span class="ruby-identifier">child_nodes</span>[<span class="ruby-identifier">child_node_name</span>] = {
312
+ <span class="ruby-value">:class</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">klass</span>,
313
+ <span class="ruby-value">:is_array</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">extra_params</span>[<span class="ruby-value">:collection</span>],
314
+ <span class="ruby-value">:accessor</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">accessor</span>
315
+ }
316
+
317
+ <span class="ruby-identifier">define_count_attribute</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">extra_params</span>[<span class="ruby-value">:collection</span>] <span class="ruby-operator">==</span> <span class="ruby-value">:with_count</span>
318
+
319
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-value">:attr_accessor</span>, <span class="ruby-identifier">accessor</span>)
320
+ <span class="ruby-keyword">end</span></pre>
321
+ </div>
322
+
323
+ </div>
324
+
325
+
326
+
327
+
328
+ </div>
329
+
330
+
331
+ <div id="method-i-define_element_name" class="method-detail ">
332
+
333
+ <div class="method-heading">
334
+ <span class="method-name">define_element_name</span><span
335
+ class="method-args">(element_name)</span>
336
+
337
+ <span class="method-click-advice">click to toggle source</span>
338
+
339
+ </div>
340
+
341
+
342
+ <div class="method-description">
343
+
344
+ <p>Defines the name of the element that represents the current OOXML object.
345
+ Should only be used once per object. In case of different objects
346
+ represented by the same class in different parts of OOXML tree,
347
+ <code>:node_name</code> extra parameter can be used to override the
348
+ default element name.</p>
349
+
350
+ <h3 id="method-i-define_element_name-label-Parameters">Parameters<span><a href="#method-i-define_element_name-label-Parameters">&para;</a> <a href="#documentation">&uarr;</a></span></h3>
351
+ <ul><li>
352
+ <p><code>element_name</code></p>
353
+ </li></ul>
354
+
355
+ <h4 id="method-i-define_element_name-label-Examples">Examples<span><a href="#method-i-define_element_name-label-Examples">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
356
+
357
+ <pre>define_element_name 'externalReference'</pre>
358
+
359
+
360
+
361
+
362
+ <div class="method-source-code" id="define_element_name-source">
363
+ <pre><span class="ruby-comment"># File lib/rubyXL/objects/ooxml_object.rb, line 101</span>
364
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">define_element_name</span>(<span class="ruby-identifier">element_name</span>)
365
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class_variable_set</span>(<span class="ruby-value">:@@ooxml_tag_name</span>, <span class="ruby-identifier">element_name</span>)
366
+ <span class="ruby-keyword">end</span></pre>
367
+ </div>
368
+
369
+ </div>
370
+
371
+
372
+
373
+
374
+ </div>
375
+
376
+
377
+ <div id="method-i-obtain_class_variable" class="method-detail ">
378
+
379
+ <div class="method-heading">
380
+ <span class="method-name">obtain_class_variable</span><span
381
+ class="method-args">(var_name, default = {})</span>
382
+
383
+ <span class="method-click-advice">click to toggle source</span>
384
+
385
+ </div>
386
+
387
+
388
+ <div class="method-description">
389
+
390
+ <p>Get the value of a [sub]class variable if it exists, or create the
391
+ respective variable with the passed-in <code>default</code> (or +{}+, if
392
+ not specified)</p>
393
+
394
+ <p>Throughout this class, we are setting class variables through explicit
395
+ method calls rather than by directly addressing the name of the variable
396
+ because of context issues: addressing variable by name creates it in the
397
+ context of defining class, while calling the setter/getter method addresses
398
+ it in the context of descendant class, which is what we need.</p>
399
+
400
+
401
+
402
+
403
+ <div class="method-source-code" id="obtain_class_variable-source">
404
+ <pre><span class="ruby-comment"># File lib/rubyXL/objects/ooxml_object.rb, line 11</span>
405
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">obtain_class_variable</span>(<span class="ruby-identifier">var_name</span>, <span class="ruby-identifier">default</span> = {})
406
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">class_variable_defined?</span>(<span class="ruby-identifier">var_name</span>) <span class="ruby-keyword">then</span>
407
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class_variable_get</span>(<span class="ruby-identifier">var_name</span>)
408
+ <span class="ruby-keyword">else</span>
409
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class_variable_set</span>(<span class="ruby-identifier">var_name</span>, <span class="ruby-identifier">default</span>)
410
+ <span class="ruby-keyword">end</span>
411
+ <span class="ruby-keyword">end</span></pre>
412
+ </div>
413
+
414
+ </div>
415
+
416
+
417
+
418
+
419
+ </div>
420
+
421
+
422
+ <div id="method-i-parse" class="method-detail ">
423
+
424
+ <div class="method-heading">
425
+ <span class="method-name">parse</span><span
426
+ class="method-args">(node)</span>
427
+
428
+ <span class="method-click-advice">click to toggle source</span>
429
+
430
+ </div>
431
+
432
+
433
+ <div class="method-description">
434
+
435
+
436
+
437
+
438
+
439
+
440
+ <div class="method-source-code" id="parse-source">
441
+ <pre><span class="ruby-comment"># File lib/rubyXL/objects/ooxml_object.rb, line 111</span>
442
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">node</span>)
443
+ <span class="ruby-identifier">node</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">node</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">IO</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
444
+
445
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>) <span class="ruby-keyword">then</span>
446
+ <span class="ruby-comment"># @namespaces = node.namespaces
447
+ <span class="ruby-identifier">node</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">root</span>
448
+ <span class="ruby-comment"># ignorable_attr = node.attributes['Ignorable']
449
+ <span class="ruby-comment"># @ignorables &lt;&lt; ignorable_attr.value if ignorable_attr
450
+ <span class="ruby-keyword">end</span>
451
+
452
+ <span class="ruby-identifier">obj</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">new</span>
453
+
454
+ <span class="ruby-identifier">known_attributes</span> = <span class="ruby-identifier">obtain_class_variable</span>(<span class="ruby-value">:@@ooxml_attributes</span>)
455
+
456
+ <span class="ruby-identifier">content_params</span> = <span class="ruby-identifier">known_attributes</span>[<span class="ruby-string">'_'</span>]
457
+ <span class="ruby-identifier">process_attribute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">node</span>.<span class="ruby-identifier">text</span>, <span class="ruby-identifier">content_params</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">content_params</span>
458
+
459
+ <span class="ruby-identifier">node</span>.<span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">each_pair</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">attr_name</span>, <span class="ruby-identifier">attr</span><span class="ruby-operator">|</span>
460
+ <span class="ruby-identifier">attr_name</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">namespace</span> <span class="ruby-keyword">then</span> <span class="ruby-node">&quot;#{attr.namespace.prefix}:#{attr.name}&quot;</span>
461
+ <span class="ruby-keyword">else</span> <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">name</span>
462
+ <span class="ruby-keyword">end</span>
463
+
464
+ <span class="ruby-identifier">attr_params</span> = <span class="ruby-identifier">known_attributes</span>[<span class="ruby-identifier">attr_name</span>]
465
+
466
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">attr_params</span>.<span class="ruby-identifier">nil?</span>
467
+ <span class="ruby-comment"># raise &quot;Unknown attribute: #{attr_name}&quot; if attr_params.nil?
468
+ <span class="ruby-identifier">process_attribute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">attr</span>.<span class="ruby-identifier">value</span>, <span class="ruby-identifier">attr_params</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">attr_params</span>[<span class="ruby-value">:computed</span>]
469
+ }
470
+
471
+ <span class="ruby-identifier">known_child_nodes</span> = <span class="ruby-identifier">obtain_class_variable</span>(<span class="ruby-value">:@@ooxml_child_nodes</span>)
472
+
473
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">known_child_nodes</span>.<span class="ruby-identifier">empty?</span>
474
+ <span class="ruby-identifier">node</span>.<span class="ruby-identifier">element_children</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">child_node</span><span class="ruby-operator">|</span>
475
+
476
+ <span class="ruby-identifier">child_node_name</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">child_node</span>.<span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">prefix</span> <span class="ruby-keyword">then</span>
477
+ <span class="ruby-node">&quot;#{child_node.namespace.prefix}:#{child_node.name}&quot;</span>
478
+ <span class="ruby-keyword">else</span> <span class="ruby-identifier">child_node</span>.<span class="ruby-identifier">name</span>
479
+ <span class="ruby-keyword">end</span>
480
+
481
+ <span class="ruby-identifier">child_node_params</span> = <span class="ruby-identifier">known_child_nodes</span>[<span class="ruby-identifier">child_node_name</span>]
482
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unknown child node: #{child_node_name}&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">child_node_params</span>.<span class="ruby-identifier">nil?</span>
483
+ <span class="ruby-identifier">parsed_object</span> = <span class="ruby-identifier">child_node_params</span>[<span class="ruby-value">:class</span>].<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">child_node</span>)
484
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">child_node_params</span>[<span class="ruby-value">:is_array</span>] <span class="ruby-keyword">then</span>
485
+ <span class="ruby-identifier">index</span> = <span class="ruby-identifier">parsed_object</span>.<span class="ruby-identifier">index_in_collection</span>
486
+
487
+ <span class="ruby-identifier">collection</span> = <span class="ruby-keyword">if</span> (<span class="ruby-keyword">self</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">OOXMLContainerObject</span>) <span class="ruby-keyword">then</span> <span class="ruby-identifier">obj</span>
488
+ <span class="ruby-keyword">else</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">child_node_params</span>[<span class="ruby-value">:accessor</span>])
489
+ <span class="ruby-keyword">end</span>
490
+
491
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">index</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
492
+ <span class="ruby-identifier">collection</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">parsed_object</span>
493
+ <span class="ruby-keyword">else</span>
494
+ <span class="ruby-identifier">collection</span>[<span class="ruby-identifier">index</span>] = <span class="ruby-identifier">parsed_object</span>
495
+ <span class="ruby-keyword">end</span>
496
+ <span class="ruby-keyword">else</span>
497
+ <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{child_node_params[:accessor]}=&quot;</span>, <span class="ruby-identifier">parsed_object</span>)
498
+ <span class="ruby-keyword">end</span>
499
+ }
500
+ <span class="ruby-keyword">end</span>
501
+
502
+ <span class="ruby-identifier">obj</span>
503
+ <span class="ruby-keyword">end</span></pre>
504
+ </div>
505
+
506
+ </div>
507
+
508
+
509
+
510
+
511
+ </div>
512
+
513
+
514
+ <div id="method-i-set_countable" class="method-detail ">
515
+
516
+ <div class="method-heading">
517
+ <span class="method-name">set_countable</span><span
518
+ class="method-args">()</span>
519
+
520
+ <span class="method-click-advice">click to toggle source</span>
521
+
522
+ </div>
523
+
524
+
525
+ <div class="method-description">
526
+
527
+ <p>TODO# This method will eventually be obsoleted.</p>
528
+
529
+
530
+
531
+
532
+ <div class="method-source-code" id="set_countable-source">
533
+ <pre><span class="ruby-comment"># File lib/rubyXL/objects/ooxml_object.rb, line 106</span>
534
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">set_countable</span>
535
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class_variable_set</span>(<span class="ruby-value">:@@ooxml_countable</span>, <span class="ruby-keyword">true</span>)
536
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-value">:attr_accessor</span>, <span class="ruby-value">:count</span>)
537
+ <span class="ruby-keyword">end</span></pre>
538
+ </div>
539
+
540
+ </div>
541
+
542
+
543
+
544
+
545
+ </div>
546
+
547
+
548
+ </section>
549
+
550
+ </section>
551
+ </main>
552
+
553
+
554
+ <footer id="validator-badges" role="contentinfo">
555
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
556
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
557
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
558
+ </footer>
559
+