workbook 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/.yardoc/checksums +18 -0
  2. data/.yardoc/object_types +3 -0
  3. data/.yardoc/objects/root.dat +0 -0
  4. data/.yardoc/proxy_types +0 -0
  5. data/Gemfile.lock +1 -1
  6. data/{readme.markdown → README.md} +36 -10
  7. data/doc/RubyXL.html +128 -0
  8. data/doc/RubyXL/Cell.html +202 -0
  9. data/doc/RubyXL/Workbook.html +447 -0
  10. data/doc/Workbook.html +130 -0
  11. data/doc/Workbook/Book.html +1484 -0
  12. data/doc/Workbook/Cell.html +1402 -0
  13. data/doc/Workbook/Format.html +654 -0
  14. data/doc/Workbook/Modules.html +117 -0
  15. data/doc/Workbook/Modules/RawObjectsStorage.html +508 -0
  16. data/doc/Workbook/Modules/TableDiffSort.html +620 -0
  17. data/doc/Workbook/Modules/TypeParser.html +1012 -0
  18. data/doc/Workbook/Readers.html +117 -0
  19. data/doc/Workbook/Readers/CsvReader.html +262 -0
  20. data/doc/Workbook/Readers/TxtReader.html +238 -0
  21. data/doc/Workbook/Readers/XlsReader.html +362 -0
  22. data/doc/Workbook/Readers/XlsShared.html +189 -0
  23. data/doc/Workbook/Readers/XlsxReader.html +295 -0
  24. data/doc/Workbook/Row.html +1939 -0
  25. data/doc/Workbook/Sheet.html +528 -0
  26. data/doc/Workbook/Table.html +883 -0
  27. data/doc/Workbook/Template.html +639 -0
  28. data/doc/Workbook/Writers.html +117 -0
  29. data/doc/Workbook/Writers/CsvTableWriter.html +175 -0
  30. data/doc/Workbook/Writers/XlsWriter.html +865 -0
  31. data/doc/_index.html +336 -0
  32. data/doc/class_list.html +53 -0
  33. data/doc/css/common.css +1 -0
  34. data/doc/css/full_list.css +57 -0
  35. data/doc/css/style.css +328 -0
  36. data/doc/file.README.html +236 -0
  37. data/doc/file_list.html +55 -0
  38. data/doc/frames.html +28 -0
  39. data/doc/index.html +236 -0
  40. data/doc/js/app.js +214 -0
  41. data/doc/js/full_list.js +173 -0
  42. data/doc/js/jquery.js +4 -0
  43. data/doc/method_list.html +972 -0
  44. data/doc/top-level-namespace.html +112 -0
  45. data/lib/workbook/book.rb +38 -29
  46. data/lib/workbook/cell.rb +25 -0
  47. data/lib/workbook/format.rb +9 -2
  48. data/lib/workbook/modules/raw_objects_storage.rb +5 -0
  49. data/lib/workbook/modules/table_diff_sort.rb +8 -6
  50. data/lib/workbook/modules/type_parser.rb +16 -3
  51. data/lib/workbook/readers/xls_reader.rb +1 -70
  52. data/lib/workbook/readers/xls_shared.rb +75 -0
  53. data/lib/workbook/row.rb +89 -17
  54. data/lib/workbook/sheet.rb +26 -0
  55. data/lib/workbook/table.rb +20 -1
  56. data/lib/workbook/template.rb +12 -11
  57. data/lib/workbook/writers/xls_writer.rb +19 -77
  58. data/test/test_modules_table_diff_sort.rb +19 -6
  59. data/test/test_row.rb +54 -0
  60. data/test/test_sheet.rb +8 -0
  61. data/test/test_table.rb +22 -3
  62. data/test/test_writers_xls_writer.rb +3 -0
  63. data/workbook.gemspec +1 -1
  64. metadata +46 -3
@@ -0,0 +1,295 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Workbook::Readers::XlsxReader
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (X)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Workbook.html" title="Workbook (module)">Workbook</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Readers.html" title="Workbook::Readers (module)">Readers</a></span></span>
36
+ &raquo;
37
+ <span class="title">XlsxReader</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Workbook::Readers::XlsxReader
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ <dt class="r1">Included in:</dt>
81
+ <dd class="r1"><span class='object_link'><a href="../Book.html" title="Workbook::Book (class)">Book</a></span></dd>
82
+
83
+
84
+
85
+ <dt class="r2 last">Defined in:</dt>
86
+ <dd class="r2 last">lib/workbook/readers/xlsx_reader.rb</dd>
87
+
88
+ </dl>
89
+ <div class="clear"></div>
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <h2>
100
+ Instance Method Summary
101
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
102
+ </h2>
103
+
104
+ <ul class="summary">
105
+
106
+ <li class="public ">
107
+ <span class="summary_signature">
108
+
109
+ <a href="#load_xlsx-instance_method" title="#load_xlsx (instance method)">- (Object) <strong>load_xlsx</strong>(file_obj) </a>
110
+
111
+
112
+
113
+ </span>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <span class="summary_desc"><div class='inline'></div></span>
124
+
125
+ </li>
126
+
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#ms_formatting_to_strftime-instance_method" title="#ms_formatting_to_strftime (instance method)">- (Object) <strong>ms_formatting_to_strftime</strong>(ms_nr_format) </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'></div></span>
146
+
147
+ </li>
148
+
149
+
150
+ <li class="public ">
151
+ <span class="summary_signature">
152
+
153
+ <a href="#parse_xlsx-instance_method" title="#parse_xlsx (instance method)">- (Object) <strong>parse_xlsx</strong>(xlsx_spreadsheet = template.raws[RubyXL::Workbook], options = {}) </a>
154
+
155
+
156
+
157
+ </span>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <span class="summary_desc"><div class='inline'></div></span>
168
+
169
+ </li>
170
+
171
+
172
+ </ul>
173
+
174
+
175
+
176
+
177
+ <div id="instance_method_details" class="method_details_list">
178
+ <h2>Instance Method Details</h2>
179
+
180
+
181
+ <div class="method_details first">
182
+ <h3 class="signature first" id="load_xlsx-instance_method">
183
+
184
+ - (<tt>Object</tt>) <strong>load_xlsx</strong>(file_obj)
185
+
186
+
187
+
188
+
189
+
190
+ </h3><table class="source_code">
191
+ <tr>
192
+ <td>
193
+ <pre class="lines">
194
+
195
+
196
+ 130
197
+ 131
198
+ 132
199
+ 133
200
+ 134
201
+ 135</pre>
202
+ </td>
203
+ <td>
204
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/xlsx_reader.rb', line 130</span>
205
+
206
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_load_xlsx identifier id'>load_xlsx</span> <span class='rubyid_file_obj identifier id'>file_obj</span>
207
+ <span class='rubyid_file_obj identifier id'>file_obj</span> <span class='assign token'>=</span> <span class='rubyid_file_obj identifier id'>file_obj</span><span class='dot token'>.</span><span class='rubyid_path identifier id'>path</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_file_obj identifier id'>file_obj</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_File constant id'>File</span>
208
+ <span class='rubyid_sp identifier id'>sp</span> <span class='assign token'>=</span> <span class='rubyid_RubyXL constant id'>RubyXL</span><span class='colon2 op'>::</span><span class='rubyid_Parser constant id'>Parser</span><span class='dot token'>.</span><span class='rubyid_parse identifier id'>parse</span><span class='lparen token'>(</span><span class='rubyid_file_obj identifier id'>file_obj</span><span class='rparen token'>)</span>
209
+ <span class='rubyid_template identifier id'>template</span><span class='dot token'>.</span><span class='rubyid_add_raw identifier id'>add_raw</span> <span class='rubyid_sp identifier id'>sp</span>
210
+ <span class='rubyid_parse_xlsx identifier id'>parse_xlsx</span> <span class='rubyid_sp identifier id'>sp</span>
211
+ <span class='rubyid_end end kw'>end</span>
212
+ </pre>
213
+ </td>
214
+ </tr>
215
+ </table>
216
+ </div>
217
+
218
+ <div class="method_details ">
219
+ <h3 class="signature " id="ms_formatting_to_strftime-instance_method">
220
+
221
+ - (<tt>Object</tt>) <strong>ms_formatting_to_strftime</strong>(ms_nr_format)
222
+
223
+
224
+
225
+
226
+
227
+ </h3><table class="source_code">
228
+ <tr>
229
+ <td>
230
+ <pre class="lines">
231
+
232
+
233
+ 174
234
+ 175
235
+ 176
236
+ 177
237
+ 178
238
+ 179
239
+ 180</pre>
240
+ </td>
241
+ <td>
242
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/xlsx_reader.rb', line 174</span>
243
+
244
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_ms_formatting_to_strftime identifier id'>ms_formatting_to_strftime</span> <span class='rubyid_ms_nr_format identifier id'>ms_nr_format</span>
245
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_ms_nr_format identifier id'>ms_nr_format</span>
246
+ <span class='rubyid_ms_nr_format identifier id'>ms_nr_format</span> <span class='assign token'>=</span> <span class='rubyid_ms_nr_format identifier id'>ms_nr_format</span><span class='dot token'>.</span><span class='rubyid_downcase identifier id'>downcase</span>
247
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_nil nil kw'>nil</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_ms_nr_format identifier id'>ms_nr_format</span> <span class='eq op'>==</span> <span class='string val'>'general'</span>
248
+ <span class='rubyid_ms_nr_format identifier id'>ms_nr_format</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'yyyy'</span><span class='comma token'>,</span><span class='string val'>'%Y'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'dddd'</span><span class='comma token'>,</span><span class='string val'>'%A'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'mmmm'</span><span class='comma token'>,</span><span class='string val'>'%B'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'ddd'</span><span class='comma token'>,</span><span class='string val'>'%a'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'mmm'</span><span class='comma token'>,</span><span class='string val'>'%b'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'yy'</span><span class='comma token'>,</span><span class='string val'>'%y'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'dd'</span><span class='comma token'>,</span><span class='string val'>'%d'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'mm'</span><span class='comma token'>,</span><span class='string val'>'%m'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'y'</span><span class='comma token'>,</span><span class='string val'>'%y'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'%%y'</span><span class='comma token'>,</span><span class='string val'>'%y'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'d'</span><span class='comma token'>,</span><span class='string val'>'%e'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'%%e'</span><span class='comma token'>,</span><span class='string val'>'%d'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'m'</span><span class='comma token'>,</span><span class='string val'>'%m'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'%%m'</span><span class='comma token'>,</span><span class='string val'>'%m'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>';@'</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>'\\'</span><span class='comma token'>,</span><span class='string val'>''</span><span class='rparen token'>)</span>
249
+ <span class='rubyid_end end kw'>end</span>
250
+ <span class='rubyid_end end kw'>end</span>
251
+ </pre>
252
+ </td>
253
+ </tr>
254
+ </table>
255
+ </div>
256
+
257
+ <div class="method_details ">
258
+ <h3 class="signature " id="parse_xlsx-instance_method">
259
+
260
+ - (<tt>Object</tt>) <strong>parse_xlsx</strong>(xlsx_spreadsheet = template.raws[RubyXL::Workbook], options = {})
261
+
262
+
263
+
264
+
265
+
266
+ </h3><table class="source_code">
267
+ <tr>
268
+ <td>
269
+ <pre class="lines">
270
+
271
+
272
+ 137</pre>
273
+ </td>
274
+ <td>
275
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/xlsx_reader.rb', line 137</span>
276
+
277
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_parse_xlsx identifier id'>parse_xlsx</span> <span class='rubyid_xlsx_spreadsheet identifier id'>xlsx_spreadsheet</span><span class='assign token'>=</span><span class='rubyid_template identifier id'>template</span><span class='dot token'>.</span><span class='rubyid_raws identifier id'>raws</span><span class='lbrack token'>[</span><span class='rubyid_RubyXL constant id'>RubyXL</span><span class='colon2 op'>::</span><span class='rubyid_Workbook constant id'>Workbook</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='rubyid_options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span>
278
+ </pre>
279
+ </td>
280
+ </tr>
281
+ </table>
282
+ </div>
283
+
284
+ </div>
285
+
286
+ </div>
287
+
288
+ <div id="footer">
289
+ Generated on Thu Jan 17 13:15:57 2013 by
290
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
291
+ 0.8.3 (ruby-1.8.7).
292
+ </div>
293
+
294
+ </body>
295
+ </html>
@@ -0,0 +1,1939 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Workbook::Row
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (R)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Workbook.html" title="Workbook (module)">Workbook</a></span></span>
36
+ &raquo;
37
+ <span class="title">Row</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Workbook::Row
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Array</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Array</li>
82
+
83
+ <li class="next">Workbook::Row</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/workbook/row.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
109
+ <ul class="summary">
110
+
111
+ <li class="public ">
112
+ <span class="summary_signature">
113
+
114
+ <a href="#format-instance_method" title="#format (instance method)">- (Object) <strong>format</strong> </a>
115
+
116
+
117
+
118
+ </span>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ <span class="summary_desc"><div class='inline'>
132
+ <p>Returns the value of attribute format.</p>
133
+ </div></span>
134
+
135
+ </li>
136
+
137
+
138
+ </ul>
139
+
140
+
141
+
142
+
143
+
144
+ <h2>
145
+ Instance Method Summary
146
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
147
+ </h2>
148
+
149
+ <ul class="summary">
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#%3C%3D%3E-instance_method" title="#&lt;=&gt; (instance method)">- (Workbook::Row) <strong>&lt;=&gt;</strong>(other) </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+ <span class="summary_desc"><div class='inline'>
169
+ <p>Compares one row wiht another.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#%5B%5D-instance_method" title="#[] (instance method)">- (Workbook::Cell<sup>?</sup>) <strong>[]</strong>(index_or_hash) </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ <span class="summary_desc"><div class='inline'>
193
+ <p>Overrides normal Array’s []-function with support for symbols that
194
+ identify a column based on the header-values.</p>
195
+ </div></span>
196
+
197
+ </li>
198
+
199
+
200
+ <li class="public ">
201
+ <span class="summary_signature">
202
+
203
+ <a href="#%5B%5D%3D-instance_method" title="#[]= (instance method)">- (Workbook::Cell<sup>?</sup>) <strong>[]=</strong>(index_or_hash, value) </a>
204
+
205
+
206
+
207
+ </span>
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+ <span class="summary_desc"><div class='inline'>
218
+ <p>Overrides normal Array’s []=-function with support for symbols that
219
+ identify a column based on the header-values.</p>
220
+ </div></span>
221
+
222
+ </li>
223
+
224
+
225
+ <li class="public ">
226
+ <span class="summary_signature">
227
+
228
+ <a href="#clone-instance_method" title="#clone (instance method)">- (Workbook::Row) <strong>clone</strong> </a>
229
+
230
+
231
+
232
+ </span>
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+ <span class="summary_desc"><div class='inline'>
243
+ <p>clone the row with together with the cells.</p>
244
+ </div></span>
245
+
246
+ </li>
247
+
248
+
249
+ <li class="public ">
250
+ <span class="summary_signature">
251
+
252
+ <a href="#compact-instance_method" title="#compact (instance method)">- (Object) <strong>compact</strong> </a>
253
+
254
+
255
+
256
+ </span>
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'>
267
+ <p>Compact detaches the row from the table.</p>
268
+ </div></span>
269
+
270
+ </li>
271
+
272
+
273
+ <li class="public ">
274
+ <span class="summary_signature">
275
+
276
+ <a href="#find_cells_by_background_color-instance_method" title="#find_cells_by_background_color (instance method)">- (Array&lt;Symbol&gt;, Workbook::Row&lt;Workbook::Cell&gt;) <strong>find_cells_by_background_color</strong>(color = :any, options = {}) </a>
277
+
278
+
279
+
280
+ </span>
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <span class="summary_desc"><div class='inline'>
291
+ <p>Returns an array of cells allows you to find cells by a given color,
292
+ normally a string containing a hex.</p>
293
+ </div></span>
294
+
295
+ </li>
296
+
297
+
298
+ <li class="public ">
299
+ <span class="summary_signature">
300
+
301
+ <a href="#first%3F-instance_method" title="#first? (instance method)">- (Boolean, NilClass) <strong>first?</strong> </a>
302
+
303
+
304
+
305
+ </span>
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+ <span class="summary_desc"><div class='inline'>
316
+ <p>Is this the first row in the table.</p>
317
+ </div></span>
318
+
319
+ </li>
320
+
321
+
322
+ <li class="public ">
323
+ <span class="summary_signature">
324
+
325
+ <a href="#header%3F-instance_method" title="#header? (instance method)">- (Boolean) <strong>header?</strong> </a>
326
+
327
+
328
+
329
+ </span>
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+ <span class="summary_desc"><div class='inline'>
340
+ <p>Returns true when the row belongs to a table and it is the header row
341
+ (typically the first row).</p>
342
+ </div></span>
343
+
344
+ </li>
345
+
346
+
347
+ <li class="public ">
348
+ <span class="summary_signature">
349
+
350
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Row) <strong>initialize</strong>(cells = [], table = nil, options = {}) </a>
351
+
352
+
353
+
354
+ </span>
355
+
356
+
357
+ <span class="note title constructor">constructor</span>
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+ <span class="summary_desc"><div class='inline'>
367
+ <p>Initialize a new row.</p>
368
+ </div></span>
369
+
370
+ </li>
371
+
372
+
373
+ <li class="public ">
374
+ <span class="summary_signature">
375
+
376
+ <a href="#key-instance_method" title="#key (instance method)">- (Workbook::Cell) <strong>key</strong> </a>
377
+
378
+
379
+
380
+ </span>
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+ <span class="summary_desc"><div class='inline'>
391
+ <p>The first cell of the row is considered to be the key.</p>
392
+ </div></span>
393
+
394
+ </li>
395
+
396
+
397
+ <li class="public ">
398
+ <span class="summary_signature">
399
+
400
+ <a href="#placeholder%3F-instance_method" title="#placeholder? (instance method)">- (Boolean) <strong>placeholder?</strong> </a>
401
+
402
+
403
+
404
+ </span>
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+ <span class="summary_desc"><div class='inline'>
415
+ <p>An internal function used in diffs.</p>
416
+ </div></span>
417
+
418
+ </li>
419
+
420
+
421
+ <li class="public ">
422
+ <span class="summary_signature">
423
+
424
+ <a href="#set_table-instance_method" title="#set_table (instance method)">- (Object) <strong>set_table</strong>(t) </a>
425
+
426
+
427
+
428
+ </span>
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+ <span class="summary_desc"><div class='inline'>
439
+ <p>Set reference to the table this row belongs to without adding the row to
440
+ the table.</p>
441
+ </div></span>
442
+
443
+ </li>
444
+
445
+
446
+ <li class="public ">
447
+ <span class="summary_signature">
448
+
449
+ <a href="#table-instance_method" title="#table (instance method)">- (Workbook::Table) <strong>table</strong> </a>
450
+
451
+
452
+
453
+ </span>
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+ <span class="summary_desc"><div class='inline'>
464
+ <p>Returns the table this row belongs to.</p>
465
+ </div></span>
466
+
467
+ </li>
468
+
469
+
470
+ <li class="public ">
471
+ <span class="summary_signature">
472
+
473
+ <a href="#table%3D-instance_method" title="#table= (instance method)">- (Object) <strong>table=</strong>(t) </a>
474
+
475
+
476
+
477
+ </span>
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+ <span class="summary_desc"><div class='inline'>
488
+ <p>Set reference to the table this row belongs to and add the row to this
489
+ table.</p>
490
+ </div></span>
491
+
492
+ </li>
493
+
494
+
495
+ <li class="public ">
496
+ <span class="summary_signature">
497
+
498
+ <a href="#table_header_keys-instance_method" title="#table_header_keys (instance method)">- (Object) <strong>table_header_keys</strong> </a>
499
+
500
+
501
+
502
+ </span>
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+ <span class="summary_desc"><div class='inline'></div></span>
513
+
514
+ </li>
515
+
516
+
517
+ <li class="public ">
518
+ <span class="summary_signature">
519
+
520
+ <a href="#to_a-instance_method" title="#to_a (instance method)">- (Array&lt;Workbook::Cell&gt;) <strong>to_a</strong> </a>
521
+
522
+
523
+
524
+ </span>
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+ <span class="summary_desc"><div class='inline'>
535
+ <p>Converts the row to an array of Workbook::Cell’s.</p>
536
+ </div></span>
537
+
538
+ </li>
539
+
540
+
541
+ <li class="public ">
542
+ <span class="summary_signature">
543
+
544
+ <a href="#to_hash-instance_method" title="#to_hash (instance method)">- (Hash) <strong>to_hash</strong> </a>
545
+
546
+
547
+
548
+ </span>
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+ <span class="summary_desc"><div class='inline'>
559
+ <p>Returns a hash representation of this row.</p>
560
+ </div></span>
561
+
562
+ </li>
563
+
564
+
565
+ <li class="public ">
566
+ <span class="summary_signature">
567
+
568
+ <a href="#to_symbols-instance_method" title="#to_symbols (instance method)">- (Array&lt;Symbol&gt;) <strong>to_symbols</strong> </a>
569
+
570
+
571
+
572
+ </span>
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+ <span class="summary_desc"><div class='inline'>
583
+ <p>Converts a row to an array of symbol representations of the row content,
584
+ see also: Workbook::Cell#to_sym.</p>
585
+ </div></span>
586
+
587
+ </li>
588
+
589
+
590
+ </ul>
591
+
592
+
593
+
594
+ <div id="constructor_details" class="method_details_list">
595
+ <h2>Constructor Details</h2>
596
+
597
+ <div class="method_details first">
598
+ <h3 class="signature first" id="initialize-instance_method">
599
+
600
+ - (<tt><span class='object_link'><a href="" title="Workbook::Row (class)">Row</a></span></tt>) <strong>initialize</strong>(cells = [], table = nil, options = {})
601
+
602
+
603
+
604
+
605
+
606
+ </h3><div class="docstring">
607
+ <div class="discussion">
608
+
609
+ <p>Initialize a new row</p>
610
+
611
+
612
+ </div>
613
+ </div>
614
+ <div class="tags">
615
+ <p class="tag_title">Parameters:</p>
616
+ <ul class="param">
617
+
618
+ <li>
619
+
620
+ <span class='name'>cells</span>
621
+
622
+
623
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Row (class)">Workbook::Row</a></span></tt>, <tt>Array&lt;<span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span>&gt;</tt>, <tt>Array</tt>)</span>
624
+
625
+
626
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
627
+
628
+
629
+ &mdash;
630
+ <div class='inline'>
631
+ <p>list of cells to initialize the row with, default is empty</p>
632
+ </div>
633
+
634
+ </li>
635
+
636
+ <li>
637
+
638
+ <span class='name'>table</span>
639
+
640
+
641
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="Workbook::Table (class)">Workbook::Table</a></span></tt>)</span>
642
+
643
+
644
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
645
+
646
+
647
+ &mdash;
648
+ <div class='inline'>
649
+ <p>a row normally belongs to a table, reference it here</p>
650
+ </div>
651
+
652
+ </li>
653
+
654
+ <li>
655
+
656
+ <span class='name'>options</span>
657
+
658
+
659
+ <span class='type'>(<tt>Hash</tt>)</span>
660
+
661
+
662
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
663
+
664
+
665
+ &mdash;
666
+ <div class='inline'>
667
+ <p>Supprted options: parse_cells_on_batch_creation (parse cell values during
668
+ row-initalization, default: false), cell_parse_options (default {}, see
669
+ Workbook::Modules::TypeParser)</p>
670
+ </div>
671
+
672
+ </li>
673
+
674
+ </ul>
675
+
676
+
677
+ </div><table class="source_code">
678
+ <tr>
679
+ <td>
680
+ <pre class="lines">
681
+
682
+
683
+ 12</pre>
684
+ </td>
685
+ <td>
686
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 12</span>
687
+
688
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span> <span class='rubyid_cells identifier id'>cells</span><span class='assign token'>=</span><span class='lbrack token'>[</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='rubyid_table identifier id'>table</span><span class='assign token'>=</span><span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span>
689
+ </pre>
690
+ </td>
691
+ </tr>
692
+ </table>
693
+ </div>
694
+
695
+ </div>
696
+
697
+ <div id="instance_attr_details" class="attr_details">
698
+ <h2>Instance Attribute Details</h2>
699
+
700
+
701
+ <span id="format=-instance_method"></span>
702
+ <div class="method_details first">
703
+ <h3 class="signature first" id="format-instance_method">
704
+
705
+ - (<tt>Object</tt>) <strong>format</strong>
706
+
707
+
708
+
709
+
710
+
711
+ </h3><div class="docstring">
712
+ <div class="discussion">
713
+
714
+ <p>Returns the value of attribute format</p>
715
+
716
+
717
+ </div>
718
+ </div>
719
+ <div class="tags">
720
+
721
+
722
+ </div><table class="source_code">
723
+ <tr>
724
+ <td>
725
+ <pre class="lines">
726
+
727
+
728
+ 5
729
+ 6
730
+ 7</pre>
731
+ </td>
732
+ <td>
733
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 5</span>
734
+
735
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_format identifier id'>format</span>
736
+ <span class='rubyid_@format ivar id'>@format</span>
737
+ <span class='rubyid_end end kw'>end</span>
738
+ </pre>
739
+ </td>
740
+ </tr>
741
+ </table>
742
+ </div>
743
+
744
+ </div>
745
+
746
+
747
+ <div id="instance_method_details" class="method_details_list">
748
+ <h2>Instance Method Details</h2>
749
+
750
+
751
+ <div class="method_details first">
752
+ <h3 class="signature first" id="<=>-instance_method">
753
+
754
+ - (<tt><span class='object_link'><a href="" title="Workbook::Row (class)">Workbook::Row</a></span></tt>) <strong>&lt;=&gt;</strong>(other)
755
+
756
+
757
+
758
+
759
+
760
+ </h3><div class="docstring">
761
+ <div class="discussion">
762
+
763
+ <p>Compares one row wiht another</p>
764
+
765
+
766
+ </div>
767
+ </div>
768
+ <div class="tags">
769
+ <p class="tag_title">Parameters:</p>
770
+ <ul class="param">
771
+
772
+ <li>
773
+
774
+ <span class='name'>other</span>
775
+
776
+
777
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Row (class)">Workbook::Row</a></span></tt>)</span>
778
+
779
+
780
+
781
+ &mdash;
782
+ <div class='inline'>
783
+ <p>row to compare against</p>
784
+ </div>
785
+
786
+ </li>
787
+
788
+ </ul>
789
+
790
+ <p class="tag_title">Returns:</p>
791
+ <ul class="return">
792
+
793
+ <li>
794
+
795
+
796
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Row (class)">Workbook::Row</a></span></tt>)</span>
797
+
798
+
799
+
800
+ &mdash;
801
+ <div class='inline'>
802
+ <p>a row with the diff result.</p>
803
+ </div>
804
+
805
+ </li>
806
+
807
+ </ul>
808
+
809
+ </div><table class="source_code">
810
+ <tr>
811
+ <td>
812
+ <pre class="lines">
813
+
814
+
815
+ 168
816
+ 169
817
+ 170
818
+ 171
819
+ 172
820
+ 173</pre>
821
+ </td>
822
+ <td>
823
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 168</span>
824
+
825
+ <span class='rubyid_def def kw'>def</span> <span class='cmp op'>&lt;=&gt;</span> <span class='rubyid_other identifier id'>other</span>
826
+ <span class='rubyid_a identifier id'>a</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_header? fid id'>header?</span> <span class='integer val'>? </span><span class='integer val'>0</span> <span class='colon op'>:</span> <span class='integer val'>1</span>
827
+ <span class='rubyid_b identifier id'>b</span> <span class='assign token'>=</span> <span class='rubyid_other identifier id'>other</span><span class='dot token'>.</span><span class='rubyid_header? fid id'>header?</span> <span class='integer val'>? </span><span class='integer val'>0</span> <span class='colon op'>:</span> <span class='integer val'>1</span>
828
+ <span class='rubyid_return return kw'>return</span> <span class='lparen token'>(</span><span class='rubyid_a identifier id'>a</span> <span class='cmp op'>&lt;=&gt;</span> <span class='rubyid_b identifier id'>b</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_a identifier id'>a</span><span class='eq op'>==</span><span class='integer val'>0</span> <span class='rubyid_or or kw'>or</span> <span class='rubyid_b identifier id'>b</span><span class='eq op'>==</span><span class='integer val'>0</span><span class='rparen token'>)</span>
829
+ <span class='rubyid_compare_without_header identifier id'>compare_without_header</span> <span class='rubyid_other identifier id'>other</span>
830
+ <span class='rubyid_end end kw'>end</span>
831
+ </pre>
832
+ </td>
833
+ </tr>
834
+ </table>
835
+ </div>
836
+
837
+ <div class="method_details ">
838
+ <h3 class="signature " id="[]-instance_method">
839
+
840
+ - (<tt><span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span></tt><sup>?</sup>) <strong>[]</strong>(index_or_hash)
841
+
842
+
843
+
844
+
845
+
846
+ </h3><div class="docstring">
847
+ <div class="discussion">
848
+
849
+ <p>Overrides normal Array’s []-function with support for symbols that
850
+ identify a column based on the header-values</p>
851
+
852
+
853
+ </div>
854
+ </div>
855
+ <div class="tags">
856
+
857
+ <div class="examples">
858
+ <p class="tag_title">Examples:</p>
859
+
860
+
861
+ <p class="example_title"><div class='inline'>
862
+ <p>Lookup using fixnum or header value encoded as symbol</p>
863
+ </div></p>
864
+
865
+ <pre class="example code"><span class='rubyid_row identifier id'>row</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span> <span class='comment val'>#=&gt; &lt;Cell value=&quot;a&quot;&gt;</span>
866
+ <span class='rubyid_row identifier id'>row</span><span class='lbrack token'>[</span><span class='symbol val'>:a</span><span class='rbrack token'>]</span> <span class='comment val'>#=&gt; &lt;Cell value=&quot;a&quot;&gt;</span>
867
+ </pre>
868
+
869
+ </div>
870
+ <p class="tag_title">Parameters:</p>
871
+ <ul class="param">
872
+
873
+ <li>
874
+
875
+ <span class='name'>index_or_hash</span>
876
+
877
+
878
+ <span class='type'>(<tt>Fixnum</tt>, <tt>Symbol</tt>)</span>
879
+
880
+
881
+
882
+ </li>
883
+
884
+ </ul>
885
+
886
+ <p class="tag_title">Returns:</p>
887
+ <ul class="return">
888
+
889
+ <li>
890
+
891
+
892
+ <span class='type'>(<tt><span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span></tt>, <tt>nil</tt>)</span>
893
+
894
+
895
+
896
+ </li>
897
+
898
+ </ul>
899
+
900
+ </div><table class="source_code">
901
+ <tr>
902
+ <td>
903
+ <pre class="lines">
904
+
905
+
906
+ 67
907
+ 68
908
+ 69
909
+ 70
910
+ 71
911
+ 72
912
+ 73
913
+ 74
914
+ 75
915
+ 76
916
+ 77
917
+ 78
918
+ 79
919
+ 80</pre>
920
+ </td>
921
+ <td>
922
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 67</span>
923
+
924
+ <span class='rubyid_def def kw'>def</span> <span class='aref op'>[]</span><span class='lparen token'>(</span><span class='rubyid_index_or_hash identifier id'>index_or_hash</span><span class='rparen token'>)</span>
925
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_index_or_hash identifier id'>index_or_hash</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Symbol constant id'>Symbol</span>
926
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
927
+ <span class='rubyid_begin begin kw'>begin</span>
928
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_to_hash identifier id'>to_hash</span><span class='lbrack token'>[</span><span class='rubyid_index_or_hash identifier id'>index_or_hash</span><span class='rbrack token'>]</span>
929
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='rubyid_NoMethodError constant id'>NoMethodError</span>
930
+ <span class='rubyid_end end kw'>end</span>
931
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_rv identifier id'>rv</span>
932
+ <span class='rubyid_else else kw'>else</span>
933
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_index_or_hash identifier id'>index_or_hash</span>
934
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_to_a identifier id'>to_a</span><span class='lbrack token'>[</span><span class='rubyid_index_or_hash identifier id'>index_or_hash</span><span class='rbrack token'>]</span>
935
+ <span class='rubyid_end end kw'>end</span>
936
+ <span class='rubyid_end end kw'>end</span>
937
+ <span class='rubyid_end end kw'>end</span>
938
+ </pre>
939
+ </td>
940
+ </tr>
941
+ </table>
942
+ </div>
943
+
944
+ <div class="method_details ">
945
+ <h3 class="signature " id="[]=-instance_method">
946
+
947
+ - (<tt><span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span></tt><sup>?</sup>) <strong>[]=</strong>(index_or_hash, value)
948
+
949
+
950
+
951
+
952
+
953
+ </h3><div class="docstring">
954
+ <div class="discussion">
955
+
956
+ <p>Overrides normal Array’s []=-function with support for symbols that
957
+ identify a column based on the header-values</p>
958
+
959
+
960
+ </div>
961
+ </div>
962
+ <div class="tags">
963
+
964
+ <div class="examples">
965
+ <p class="tag_title">Examples:</p>
966
+
967
+
968
+ <p class="example_title"><div class='inline'>
969
+ <p>Lookup using fixnum or header value encoded as symbol</p>
970
+ </div></p>
971
+
972
+ <pre class="example code"><span class='rubyid_row identifier id'>row</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span> <span class='comment val'>#=&gt; &lt;Cell value=&quot;a&quot;&gt;</span>
973
+ <span class='rubyid_row identifier id'>row</span><span class='lbrack token'>[</span><span class='symbol val'>:a</span><span class='rbrack token'>]</span> <span class='comment val'>#=&gt; &lt;Cell value=&quot;a&quot;&gt;</span>
974
+ </pre>
975
+
976
+ </div>
977
+ <p class="tag_title">Parameters:</p>
978
+ <ul class="param">
979
+
980
+ <li>
981
+
982
+ <span class='name'>index_or_hash</span>
983
+
984
+
985
+ <span class='type'>(<tt>Fixnum</tt>, <tt>Symbol</tt>)</span>
986
+
987
+
988
+
989
+ </li>
990
+
991
+ <li>
992
+
993
+ <span class='name'>value</span>
994
+
995
+
996
+ <span class='type'>(<tt>String</tt>, <tt>Fixnum</tt>, <tt>NilClass</tt>, <tt>Date</tt>, <tt>DateTime</tt>, <tt>Time</tt>, <tt>Float</tt>)</span>
997
+
998
+
999
+
1000
+ </li>
1001
+
1002
+ </ul>
1003
+
1004
+ <p class="tag_title">Returns:</p>
1005
+ <ul class="return">
1006
+
1007
+ <li>
1008
+
1009
+
1010
+ <span class='type'>(<tt><span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span></tt>, <tt>nil</tt>)</span>
1011
+
1012
+
1013
+
1014
+ </li>
1015
+
1016
+ </ul>
1017
+
1018
+ </div><table class="source_code">
1019
+ <tr>
1020
+ <td>
1021
+ <pre class="lines">
1022
+
1023
+
1024
+ 91
1025
+ 92
1026
+ 93
1027
+ 94
1028
+ 95
1029
+ 96
1030
+ 97
1031
+ 98
1032
+ 99
1033
+ 100
1034
+ 101
1035
+ 102
1036
+ 103
1037
+ 104
1038
+ 105
1039
+ 106
1040
+ 107
1041
+ 108</pre>
1042
+ </td>
1043
+ <td>
1044
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 91</span>
1045
+
1046
+ <span class='rubyid_def def kw'>def</span> <span class='aset op'>[]=</span> <span class='lparen token'>(</span><span class='rubyid_index_or_hash identifier id'>index_or_hash</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
1047
+ <span class='rubyid_index identifier id'>index</span> <span class='assign token'>=</span> <span class='rubyid_index_or_hash identifier id'>index_or_hash</span>
1048
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_index_or_hash identifier id'>index_or_hash</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Symbol constant id'>Symbol</span>
1049
+ <span class='rubyid_index identifier id'>index</span> <span class='assign token'>=</span> <span class='rubyid_table_header_keys identifier id'>table_header_keys</span><span class='dot token'>.</span><span class='rubyid_index identifier id'>index</span><span class='lparen token'>(</span><span class='rubyid_index_or_hash identifier id'>index_or_hash</span><span class='rparen token'>)</span>
1050
+ <span class='rubyid_end end kw'>end</span>
1051
+
1052
+ <span class='rubyid_value_celled identifier id'>value_celled</span> <span class='assign token'>=</span> <span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Cell constant id'>Cell</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
1053
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_value identifier id'>value</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Cell constant id'>Cell</span>
1054
+ <span class='rubyid_value_celled identifier id'>value_celled</span> <span class='assign token'>=</span> <span class='rubyid_value identifier id'>value</span>
1055
+ <span class='rubyid_else else kw'>else</span>
1056
+ <span class='rubyid_current_cell identifier id'>current_cell</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='rubyid_index identifier id'>index</span><span class='rbrack token'>]</span>
1057
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_current_cell identifier id'>current_cell</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Cell constant id'>Cell</span>
1058
+ <span class='rubyid_value_celled identifier id'>value_celled</span> <span class='assign token'>=</span> <span class='rubyid_current_cell identifier id'>current_cell</span>
1059
+ <span class='rubyid_end end kw'>end</span>
1060
+ <span class='rubyid_value_celled identifier id'>value_celled</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='assign token'>=</span><span class='lparen token'>(</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span>
1061
+ <span class='rubyid_end end kw'>end</span>
1062
+ <span class='rubyid_super super kw'>super</span><span class='lparen token'>(</span><span class='rubyid_index identifier id'>index</span><span class='comma token'>,</span><span class='rubyid_value_celled identifier id'>value_celled</span><span class='rparen token'>)</span>
1063
+ <span class='rubyid_end end kw'>end</span>
1064
+ </pre>
1065
+ </td>
1066
+ </tr>
1067
+ </table>
1068
+ </div>
1069
+
1070
+ <div class="method_details ">
1071
+ <h3 class="signature " id="clone-instance_method">
1072
+
1073
+ - (<tt><span class='object_link'><a href="" title="Workbook::Row (class)">Workbook::Row</a></span></tt>) <strong>clone</strong>
1074
+
1075
+
1076
+
1077
+
1078
+
1079
+ </h3><div class="docstring">
1080
+ <div class="discussion">
1081
+
1082
+ <p>clone the row with together with the cells</p>
1083
+
1084
+
1085
+ </div>
1086
+ </div>
1087
+ <div class="tags">
1088
+
1089
+ <p class="tag_title">Returns:</p>
1090
+ <ul class="return">
1091
+
1092
+ <li>
1093
+
1094
+
1095
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Workbook::Row (class)">Workbook::Row</a></span></tt>)</span>
1096
+
1097
+
1098
+
1099
+ &mdash;
1100
+ <div class='inline'>
1101
+ <p>a cloned copy of self with cells</p>
1102
+ </div>
1103
+
1104
+ </li>
1105
+
1106
+ </ul>
1107
+
1108
+ </div><table class="source_code">
1109
+ <tr>
1110
+ <td>
1111
+ <pre class="lines">
1112
+
1113
+
1114
+ 191
1115
+ 192
1116
+ 193</pre>
1117
+ </td>
1118
+ <td>
1119
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 191</span>
1120
+
1121
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_clone identifier id'>clone</span>
1122
+ <span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Row constant id'>Row</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_to_a identifier id'>to_a</span><span class='dot token'>.</span><span class='rubyid_collect identifier id'>collect</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_c identifier id'>c</span><span class='bitor op'>|</span> <span class='rubyid_c identifier id'>c</span><span class='dot token'>.</span><span class='rubyid_clone identifier id'>clone</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
1123
+ <span class='rubyid_end end kw'>end</span>
1124
+ </pre>
1125
+ </td>
1126
+ </tr>
1127
+ </table>
1128
+ </div>
1129
+
1130
+ <div class="method_details ">
1131
+ <h3 class="signature " id="compact-instance_method">
1132
+
1133
+ - (<tt>Object</tt>) <strong>compact</strong>
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+ </h3><div class="docstring">
1140
+ <div class="discussion">
1141
+
1142
+ <p>Compact detaches the row from the table</p>
1143
+
1144
+
1145
+ </div>
1146
+ </div>
1147
+ <div class="tags">
1148
+
1149
+
1150
+ </div><table class="source_code">
1151
+ <tr>
1152
+ <td>
1153
+ <pre class="lines">
1154
+
1155
+
1156
+ 183
1157
+ 184
1158
+ 185
1159
+ 186</pre>
1160
+ </td>
1161
+ <td>
1162
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 183</span>
1163
+
1164
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_compact identifier id'>compact</span>
1165
+ <span class='rubyid_r identifier id'>r</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_clone identifier id'>clone</span>
1166
+ <span class='rubyid_r identifier id'>r</span> <span class='assign token'>=</span> <span class='rubyid_r identifier id'>r</span><span class='dot token'>.</span><span class='rubyid_collect identifier id'>collect</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_c identifier id'>c</span><span class='bitor op'>|</span> <span class='rubyid_c identifier id'>c</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_c identifier id'>c</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='rubyid_compact identifier id'>compact</span>
1167
+ <span class='rubyid_end end kw'>end</span>
1168
+ </pre>
1169
+ </td>
1170
+ </tr>
1171
+ </table>
1172
+ </div>
1173
+
1174
+ <div class="method_details ">
1175
+ <h3 class="signature " id="find_cells_by_background_color-instance_method">
1176
+
1177
+ - (<tt>Array&lt;Symbol&gt;</tt>, <tt><span class='object_link'><a href="" title="Workbook::Row (class)">Workbook::Row</a></span>&lt;<span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span>&gt;</tt>) <strong>find_cells_by_background_color</strong>(color = :any, options = {})
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+ </h3><div class="docstring">
1184
+ <div class="discussion">
1185
+
1186
+ <p>Returns an array of cells allows you to find cells by a given color,
1187
+ normally a string containing a hex</p>
1188
+
1189
+
1190
+ </div>
1191
+ </div>
1192
+ <div class="tags">
1193
+ <p class="tag_title">Parameters:</p>
1194
+ <ul class="param">
1195
+
1196
+ <li>
1197
+
1198
+ <span class='name'>color</span>
1199
+
1200
+
1201
+ <span class='type'>(<tt>String</tt>)</span>
1202
+
1203
+
1204
+ <em class="default">(defaults to: <tt>:any</tt>)</em>
1205
+
1206
+
1207
+ &mdash;
1208
+ <div class='inline'>
1209
+ <p>a CSS-style hex-string</p>
1210
+ </div>
1211
+
1212
+ </li>
1213
+
1214
+ <li>
1215
+
1216
+ <span class='name'>options</span>
1217
+
1218
+
1219
+ <span class='type'>(<tt>Hash</tt>)</span>
1220
+
1221
+
1222
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1223
+
1224
+
1225
+ &mdash;
1226
+ <div class='inline'>
1227
+ <p>Option :hash_keys (default true) returns row as an array of symbols</p>
1228
+ </div>
1229
+
1230
+ </li>
1231
+
1232
+ </ul>
1233
+
1234
+ <p class="tag_title">Returns:</p>
1235
+ <ul class="return">
1236
+
1237
+ <li>
1238
+
1239
+
1240
+ <span class='type'>(<tt>Array&lt;Symbol&gt;</tt>, <tt><span class='object_link'><a href="" title="Workbook::Row (class)">Workbook::Row</a></span>&lt;<span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span>&gt;</tt>)</span>
1241
+
1242
+
1243
+
1244
+ </li>
1245
+
1246
+ </ul>
1247
+
1248
+ </div><table class="source_code">
1249
+ <tr>
1250
+ <td>
1251
+ <pre class="lines">
1252
+
1253
+
1254
+ 115</pre>
1255
+ </td>
1256
+ <td>
1257
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 115</span>
1258
+
1259
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_find_cells_by_background_color identifier id'>find_cells_by_background_color</span> <span class='rubyid_color identifier id'>color</span><span class='assign token'>=</span><span class='symbol val'>:any</span><span class='comma token'>,</span> <span class='rubyid_options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span>
1260
+ </pre>
1261
+ </td>
1262
+ </tr>
1263
+ </table>
1264
+ </div>
1265
+
1266
+ <div class="method_details ">
1267
+ <h3 class="signature " id="first?-instance_method">
1268
+
1269
+ - (<tt>Boolean</tt>, <tt>NilClass</tt>) <strong>first?</strong>
1270
+
1271
+
1272
+
1273
+
1274
+
1275
+ </h3><div class="docstring">
1276
+ <div class="discussion">
1277
+
1278
+ <p>Is this the first row in the table</p>
1279
+
1280
+
1281
+ </div>
1282
+ </div>
1283
+ <div class="tags">
1284
+
1285
+ <p class="tag_title">Returns:</p>
1286
+ <ul class="return">
1287
+
1288
+ <li>
1289
+
1290
+
1291
+ <span class='type'>(<tt>Boolean</tt>, <tt>NilClass</tt>)</span>
1292
+
1293
+
1294
+
1295
+ &mdash;
1296
+ <div class='inline'>
1297
+ <p>returns nil if it doesn’t belong to a table, false when it isn’t the
1298
+ first row of a table and true when it is.</p>
1299
+ </div>
1300
+
1301
+ </li>
1302
+
1303
+ </ul>
1304
+
1305
+ </div><table class="source_code">
1306
+ <tr>
1307
+ <td>
1308
+ <pre class="lines">
1309
+
1310
+
1311
+ 132
1312
+ 133
1313
+ 134</pre>
1314
+ </td>
1315
+ <td>
1316
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 132</span>
1317
+
1318
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_first? fid id'>first?</span>
1319
+ <span class='rubyid_table identifier id'>table</span> <span class='neq op'>!=</span> <span class='rubyid_nil nil kw'>nil</span> <span class='rubyid_and and kw'>and</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_object_id identifier id'>object_id</span> <span class='eq op'>==</span> <span class='rubyid_table identifier id'>table</span><span class='dot token'>.</span><span class='rubyid_first identifier id'>first</span><span class='dot token'>.</span><span class='rubyid_object_id identifier id'>object_id</span>
1320
+ <span class='rubyid_end end kw'>end</span>
1321
+ </pre>
1322
+ </td>
1323
+ </tr>
1324
+ </table>
1325
+ </div>
1326
+
1327
+ <div class="method_details ">
1328
+ <h3 class="signature " id="header?-instance_method">
1329
+
1330
+ - (<tt>Boolean</tt>) <strong>header?</strong>
1331
+
1332
+
1333
+
1334
+
1335
+
1336
+ </h3><div class="docstring">
1337
+ <div class="discussion">
1338
+
1339
+ <p>Returns true when the row belongs to a table and it is the header row
1340
+ (typically the first row)</p>
1341
+
1342
+
1343
+ </div>
1344
+ </div>
1345
+ <div class="tags">
1346
+
1347
+ <p class="tag_title">Returns:</p>
1348
+ <ul class="return">
1349
+
1350
+ <li>
1351
+
1352
+
1353
+ <span class='type'>(<tt>Boolean</tt>)</span>
1354
+
1355
+
1356
+
1357
+ </li>
1358
+
1359
+ </ul>
1360
+
1361
+ </div><table class="source_code">
1362
+ <tr>
1363
+ <td>
1364
+ <pre class="lines">
1365
+
1366
+
1367
+ 125
1368
+ 126
1369
+ 127</pre>
1370
+ </td>
1371
+ <td>
1372
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 125</span>
1373
+
1374
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_header? fid id'>header?</span>
1375
+ <span class='rubyid_table identifier id'>table</span> <span class='neq op'>!=</span> <span class='rubyid_nil nil kw'>nil</span> <span class='rubyid_and and kw'>and</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_object_id identifier id'>object_id</span> <span class='eq op'>==</span> <span class='rubyid_table identifier id'>table</span><span class='dot token'>.</span><span class='rubyid_header identifier id'>header</span><span class='dot token'>.</span><span class='rubyid_object_id identifier id'>object_id</span>
1376
+ <span class='rubyid_end end kw'>end</span>
1377
+ </pre>
1378
+ </td>
1379
+ </tr>
1380
+ </table>
1381
+ </div>
1382
+
1383
+ <div class="method_details ">
1384
+ <h3 class="signature " id="key-instance_method">
1385
+
1386
+ - (<tt><span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span></tt>) <strong>key</strong>
1387
+
1388
+
1389
+
1390
+
1391
+
1392
+ </h3><div class="docstring">
1393
+ <div class="discussion">
1394
+
1395
+ <p>The first cell of the row is considered to be the key</p>
1396
+
1397
+
1398
+ </div>
1399
+ </div>
1400
+ <div class="tags">
1401
+
1402
+ <p class="tag_title">Returns:</p>
1403
+ <ul class="return">
1404
+
1405
+ <li>
1406
+
1407
+
1408
+ <span class='type'>(<tt><span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span></tt>)</span>
1409
+
1410
+
1411
+
1412
+ &mdash;
1413
+ <div class='inline'>
1414
+ <p>the key cell</p>
1415
+ </div>
1416
+
1417
+ </li>
1418
+
1419
+ </ul>
1420
+
1421
+ </div><table class="source_code">
1422
+ <tr>
1423
+ <td>
1424
+ <pre class="lines">
1425
+
1426
+
1427
+ 178
1428
+ 179
1429
+ 180</pre>
1430
+ </td>
1431
+ <td>
1432
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 178</span>
1433
+
1434
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_key identifier id'>key</span>
1435
+ <span class='rubyid_first identifier id'>first</span>
1436
+ <span class='rubyid_end end kw'>end</span>
1437
+ </pre>
1438
+ </td>
1439
+ </tr>
1440
+ </table>
1441
+ </div>
1442
+
1443
+ <div class="method_details ">
1444
+ <h3 class="signature " id="placeholder?-instance_method">
1445
+
1446
+ - (<tt>Boolean</tt>) <strong>placeholder?</strong>
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+ </h3><div class="docstring">
1453
+ <div class="discussion">
1454
+
1455
+ <p>An internal function used in diffs</p>
1456
+
1457
+
1458
+ </div>
1459
+ </div>
1460
+ <div class="tags">
1461
+
1462
+ <p class="tag_title">Returns:</p>
1463
+ <ul class="return">
1464
+
1465
+ <li>
1466
+
1467
+
1468
+ <span class='type'>(<tt>Boolean</tt>)</span>
1469
+
1470
+
1471
+
1472
+ &mdash;
1473
+ <div class='inline'>
1474
+ <p>returns true when this row is not an actual row, but a placeholder row to
1475
+ ‘compare’ against</p>
1476
+ </div>
1477
+
1478
+ </li>
1479
+
1480
+ </ul>
1481
+
1482
+ </div><table class="source_code">
1483
+ <tr>
1484
+ <td>
1485
+ <pre class="lines">
1486
+
1487
+
1488
+ 30
1489
+ 31
1490
+ 32</pre>
1491
+ </td>
1492
+ <td>
1493
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 30</span>
1494
+
1495
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_placeholder? fid id'>placeholder?</span>
1496
+ <span class='rubyid_placeholder identifier id'>placeholder</span> <span class='integer val'>? </span><span class='rubyid_true true kw'>true</span> <span class='colon op'>:</span> <span class='rubyid_false false kw'>false</span>
1497
+ <span class='rubyid_end end kw'>end</span>
1498
+ </pre>
1499
+ </td>
1500
+ </tr>
1501
+ </table>
1502
+ </div>
1503
+
1504
+ <div class="method_details ">
1505
+ <h3 class="signature " id="set_table-instance_method">
1506
+
1507
+ - (<tt>Object</tt>) <strong>set_table</strong>(t)
1508
+
1509
+
1510
+
1511
+
1512
+
1513
+ </h3><div class="docstring">
1514
+ <div class="discussion">
1515
+
1516
+ <p>Set reference to the table this row belongs to without adding the row to
1517
+ the table</p>
1518
+
1519
+
1520
+ </div>
1521
+ </div>
1522
+ <div class="tags">
1523
+ <p class="tag_title">Parameters:</p>
1524
+ <ul class="param">
1525
+
1526
+ <li>
1527
+
1528
+ <span class='name'>t</span>
1529
+
1530
+
1531
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="Workbook::Table (class)">Workbook::Table</a></span></tt>)</span>
1532
+
1533
+
1534
+
1535
+ &mdash;
1536
+ <div class='inline'>
1537
+ <p>the table this row belongs to</p>
1538
+ </div>
1539
+
1540
+ </li>
1541
+
1542
+ </ul>
1543
+
1544
+
1545
+ </div><table class="source_code">
1546
+ <tr>
1547
+ <td>
1548
+ <pre class="lines">
1549
+
1550
+
1551
+ 44
1552
+ 45
1553
+ 46</pre>
1554
+ </td>
1555
+ <td>
1556
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 44</span>
1557
+
1558
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_set_table identifier id'>set_table</span><span class='lparen token'>(</span><span class='rubyid_t identifier id'>t</span><span class='rparen token'>)</span>
1559
+ <span class='rubyid_@table ivar id'>@table</span> <span class='assign token'>=</span> <span class='rubyid_t identifier id'>t</span>
1560
+ <span class='rubyid_end end kw'>end</span>
1561
+ </pre>
1562
+ </td>
1563
+ </tr>
1564
+ </table>
1565
+ </div>
1566
+
1567
+ <div class="method_details ">
1568
+ <h3 class="signature " id="table-instance_method">
1569
+
1570
+ - (<tt><span class='object_link'><a href="Table.html" title="Workbook::Table (class)">Workbook::Table</a></span></tt>) <strong>table</strong>
1571
+
1572
+
1573
+
1574
+
1575
+
1576
+ </h3><div class="docstring">
1577
+ <div class="discussion">
1578
+
1579
+ <p>Returns the table this row belongs to</p>
1580
+
1581
+
1582
+ </div>
1583
+ </div>
1584
+ <div class="tags">
1585
+
1586
+ <p class="tag_title">Returns:</p>
1587
+ <ul class="return">
1588
+
1589
+ <li>
1590
+
1591
+
1592
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="Workbook::Table (class)">Workbook::Table</a></span></tt>)</span>
1593
+
1594
+
1595
+
1596
+ &mdash;
1597
+ <div class='inline'>
1598
+ <p>the table this row belongs to</p>
1599
+ </div>
1600
+
1601
+ </li>
1602
+
1603
+ </ul>
1604
+
1605
+ </div><table class="source_code">
1606
+ <tr>
1607
+ <td>
1608
+ <pre class="lines">
1609
+
1610
+
1611
+ 37
1612
+ 38
1613
+ 39</pre>
1614
+ </td>
1615
+ <td>
1616
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 37</span>
1617
+
1618
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_table identifier id'>table</span>
1619
+ <span class='rubyid_@table ivar id'>@table</span>
1620
+ <span class='rubyid_end end kw'>end</span>
1621
+ </pre>
1622
+ </td>
1623
+ </tr>
1624
+ </table>
1625
+ </div>
1626
+
1627
+ <div class="method_details ">
1628
+ <h3 class="signature " id="table=-instance_method">
1629
+
1630
+ - (<tt>Object</tt>) <strong>table=</strong>(t)
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+ </h3><div class="docstring">
1637
+ <div class="discussion">
1638
+
1639
+ <p>Set reference to the table this row belongs to and add the row to this
1640
+ table</p>
1641
+
1642
+
1643
+ </div>
1644
+ </div>
1645
+ <div class="tags">
1646
+ <p class="tag_title">Parameters:</p>
1647
+ <ul class="param">
1648
+
1649
+ <li>
1650
+
1651
+ <span class='name'>t</span>
1652
+
1653
+
1654
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="Workbook::Table (class)">Workbook::Table</a></span></tt>)</span>
1655
+
1656
+
1657
+
1658
+ &mdash;
1659
+ <div class='inline'>
1660
+ <p>the table this row belongs to</p>
1661
+ </div>
1662
+
1663
+ </li>
1664
+
1665
+ </ul>
1666
+
1667
+ <p class="tag_title">Raises:</p>
1668
+ <ul class="raise">
1669
+
1670
+ <li>
1671
+
1672
+
1673
+ <span class='type'>(<tt>ArgumentError</tt>)</span>
1674
+
1675
+
1676
+
1677
+ </li>
1678
+
1679
+ </ul>
1680
+
1681
+ </div><table class="source_code">
1682
+ <tr>
1683
+ <td>
1684
+ <pre class="lines">
1685
+
1686
+
1687
+ 51
1688
+ 52
1689
+ 53
1690
+ 54
1691
+ 55
1692
+ 56
1693
+ 57</pre>
1694
+ </td>
1695
+ <td>
1696
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 51</span>
1697
+
1698
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_table= identifier id'>table=</span> <span class='rubyid_t identifier id'>t</span>
1699
+ <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='dstring node'>&quot;table should be a Workbook::Table (you passed a #{t.class})&quot;</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_t identifier id'>t</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Table constant id'>Table</span><span class='rparen token'>)</span> <span class='rubyid_or or kw'>or</span> <span class='rubyid_t identifier id'>t</span> <span class='eq op'>==</span> <span class='rubyid_nil nil kw'>nil</span>
1700
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_t identifier id'>t</span>
1701
+ <span class='rubyid_@table ivar id'>@table</span> <span class='assign token'>=</span> <span class='rubyid_t identifier id'>t</span>
1702
+ <span class='rubyid_table identifier id'>table</span><span class='dot token'>.</span><span class='rubyid_push identifier id'>push</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span> <span class='comment val'>#unless table.index(self) and self.placeholder?</span>
1703
+ <span class='rubyid_end end kw'>end</span>
1704
+ <span class='rubyid_end end kw'>end</span>
1705
+ </pre>
1706
+ </td>
1707
+ </tr>
1708
+ </table>
1709
+ </div>
1710
+
1711
+ <div class="method_details ">
1712
+ <h3 class="signature " id="table_header_keys-instance_method">
1713
+
1714
+ - (<tt>Object</tt>) <strong>table_header_keys</strong>
1715
+
1716
+
1717
+
1718
+
1719
+
1720
+ </h3><table class="source_code">
1721
+ <tr>
1722
+ <td>
1723
+ <pre class="lines">
1724
+
1725
+
1726
+ 148
1727
+ 149
1728
+ 150</pre>
1729
+ </td>
1730
+ <td>
1731
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 148</span>
1732
+
1733
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_table_header_keys identifier id'>table_header_keys</span>
1734
+ <span class='rubyid_table identifier id'>table</span><span class='dot token'>.</span><span class='rubyid_header identifier id'>header</span><span class='dot token'>.</span><span class='rubyid_to_symbols identifier id'>to_symbols</span>
1735
+ <span class='rubyid_end end kw'>end</span>
1736
+ </pre>
1737
+ </td>
1738
+ </tr>
1739
+ </table>
1740
+ </div>
1741
+
1742
+ <div class="method_details ">
1743
+ <h3 class="signature " id="to_a-instance_method">
1744
+
1745
+ - (<tt>Array&lt;<span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span>&gt;</tt>) <strong>to_a</strong>
1746
+
1747
+
1748
+
1749
+
1750
+
1751
+ </h3><div class="docstring">
1752
+ <div class="discussion">
1753
+
1754
+ <p>Converts the row to an array of Workbook::Cell’s</p>
1755
+
1756
+
1757
+ </div>
1758
+ </div>
1759
+ <div class="tags">
1760
+
1761
+ <p class="tag_title">Returns:</p>
1762
+ <ul class="return">
1763
+
1764
+ <li>
1765
+
1766
+
1767
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="Cell.html" title="Workbook::Cell (class)">Workbook::Cell</a></span>&gt;</tt>)</span>
1768
+
1769
+
1770
+
1771
+ &mdash;
1772
+ <div class='inline'>
1773
+ <p>returns row as an array of symbols</p>
1774
+ </div>
1775
+
1776
+ </li>
1777
+
1778
+ </ul>
1779
+
1780
+ </div><table class="source_code">
1781
+ <tr>
1782
+ <td>
1783
+ <pre class="lines">
1784
+
1785
+
1786
+ 144
1787
+ 145
1788
+ 146</pre>
1789
+ </td>
1790
+ <td>
1791
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 144</span>
1792
+
1793
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_to_a identifier id'>to_a</span>
1794
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_collect identifier id'>collect</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_c identifier id'>c</span><span class='bitor op'>|</span> <span class='rubyid_c identifier id'>c</span><span class='rbrace token'>}</span>
1795
+ <span class='rubyid_end end kw'>end</span>
1796
+ </pre>
1797
+ </td>
1798
+ </tr>
1799
+ </table>
1800
+ </div>
1801
+
1802
+ <div class="method_details ">
1803
+ <h3 class="signature " id="to_hash-instance_method">
1804
+
1805
+ - (<tt>Hash</tt>) <strong>to_hash</strong>
1806
+
1807
+
1808
+
1809
+
1810
+
1811
+ </h3><div class="docstring">
1812
+ <div class="discussion">
1813
+
1814
+ <p>Returns a hash representation of this row</p>
1815
+
1816
+
1817
+ </div>
1818
+ </div>
1819
+ <div class="tags">
1820
+
1821
+ <p class="tag_title">Returns:</p>
1822
+ <ul class="return">
1823
+
1824
+ <li>
1825
+
1826
+
1827
+ <span class='type'>(<tt>Hash</tt>)</span>
1828
+
1829
+
1830
+
1831
+ </li>
1832
+
1833
+ </ul>
1834
+
1835
+ </div><table class="source_code">
1836
+ <tr>
1837
+ <td>
1838
+ <pre class="lines">
1839
+
1840
+
1841
+ 155
1842
+ 156
1843
+ 157
1844
+ 158
1845
+ 159
1846
+ 160
1847
+ 161
1848
+ 162</pre>
1849
+ </td>
1850
+ <td>
1851
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 155</span>
1852
+
1853
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_to_hash identifier id'>to_hash</span>
1854
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_@hash ivar id'>@hash</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_@hash ivar id'>@hash</span>
1855
+ <span class='rubyid_keys identifier id'>keys</span> <span class='assign token'>=</span> <span class='rubyid_table_header_keys identifier id'>table_header_keys</span>
1856
+ <span class='rubyid_values identifier id'>values</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span>
1857
+ <span class='rubyid_@hash ivar id'>@hash</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span>
1858
+ <span class='rubyid_keys identifier id'>keys</span><span class='dot token'>.</span><span class='rubyid_each_with_index identifier id'>each_with_index</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span><span class='rubyid_i identifier id'>i</span><span class='bitor op'>|</span> <span class='rubyid_@hash ivar id'>@hash</span><span class='lbrack token'>[</span><span class='rubyid_k identifier id'>k</span><span class='rbrack token'>]</span><span class='assign token'>=</span><span class='rubyid_values identifier id'>values</span><span class='lbrack token'>[</span><span class='rubyid_i identifier id'>i</span><span class='rbrack token'>]</span><span class='rbrace token'>}</span>
1859
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_@hash ivar id'>@hash</span>
1860
+ <span class='rubyid_end end kw'>end</span>
1861
+ </pre>
1862
+ </td>
1863
+ </tr>
1864
+ </table>
1865
+ </div>
1866
+
1867
+ <div class="method_details ">
1868
+ <h3 class="signature " id="to_symbols-instance_method">
1869
+
1870
+ - (<tt>Array&lt;Symbol&gt;</tt>) <strong>to_symbols</strong>
1871
+
1872
+
1873
+
1874
+
1875
+
1876
+ </h3><div class="docstring">
1877
+ <div class="discussion">
1878
+
1879
+ <p>Converts a row to an array of symbol representations of the row content,
1880
+ see also: Workbook::Cell#to_sym</p>
1881
+
1882
+
1883
+ </div>
1884
+ </div>
1885
+ <div class="tags">
1886
+
1887
+ <p class="tag_title">Returns:</p>
1888
+ <ul class="return">
1889
+
1890
+ <li>
1891
+
1892
+
1893
+ <span class='type'>(<tt>Array&lt;Symbol&gt;</tt>)</span>
1894
+
1895
+
1896
+
1897
+ &mdash;
1898
+ <div class='inline'>
1899
+ <p>returns row as an array of symbols</p>
1900
+ </div>
1901
+
1902
+ </li>
1903
+
1904
+ </ul>
1905
+
1906
+ </div><table class="source_code">
1907
+ <tr>
1908
+ <td>
1909
+ <pre class="lines">
1910
+
1911
+
1912
+ 138
1913
+ 139
1914
+ 140</pre>
1915
+ </td>
1916
+ <td>
1917
+ <pre class="code"><span class="info file"># File 'lib/workbook/row.rb', line 138</span>
1918
+
1919
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_to_symbols identifier id'>to_symbols</span>
1920
+ <span class='rubyid_collect identifier id'>collect</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_c identifier id'>c</span><span class='bitor op'>|</span> <span class='rubyid_c identifier id'>c</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span><span class='rbrace token'>}</span>
1921
+ <span class='rubyid_end end kw'>end</span>
1922
+ </pre>
1923
+ </td>
1924
+ </tr>
1925
+ </table>
1926
+ </div>
1927
+
1928
+ </div>
1929
+
1930
+ </div>
1931
+
1932
+ <div id="footer">
1933
+ Generated on Thu Jan 17 13:16:01 2013 by
1934
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1935
+ 0.8.3 (ruby-1.8.7).
1936
+ </div>
1937
+
1938
+ </body>
1939
+ </html>