workbook 0.2.0 → 0.2.1

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 (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,117 @@
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
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">Readers</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
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/workbook/readers/txt_reader.rb<span class="defines">,<br />
83
+ lib/workbook/readers/csv_reader.rb,<br /> lib/workbook/readers/xls_reader.rb,<br /> lib/workbook/readers/xls_shared.rb,<br /> lib/workbook/readers/xlsx_reader.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Defined Under Namespace</h2>
90
+ <p class="children">
91
+
92
+
93
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Readers/CsvReader.html" title="Workbook::Readers::CsvReader (module)">CsvReader</a></span>, <span class='object_link'><a href="Readers/TxtReader.html" title="Workbook::Readers::TxtReader (module)">TxtReader</a></span>, <span class='object_link'><a href="Readers/XlsReader.html" title="Workbook::Readers::XlsReader (module)">XlsReader</a></span>, <span class='object_link'><a href="Readers/XlsShared.html" title="Workbook::Readers::XlsShared (module)">XlsShared</a></span>, <span class='object_link'><a href="Readers/XlsxReader.html" title="Workbook::Readers::XlsxReader (module)">XlsxReader</a></span>
94
+
95
+
96
+
97
+
98
+ </p>
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ </div>
109
+
110
+ <div id="footer">
111
+ Generated on Thu Jan 17 13:15:56 2013 by
112
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
113
+ 0.8.3 (ruby-1.8.7).
114
+ </div>
115
+
116
+ </body>
117
+ </html>
@@ -0,0 +1,262 @@
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::CsvReader
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 (C)</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">CsvReader</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::CsvReader
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/csv_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_csv-instance_method" title="#load_csv (instance method)">- (Object) <strong>load_csv</strong>(text) </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="#parse_csv-instance_method" title="#parse_csv (instance method)">- (Object) <strong>parse_csv</strong>(csv_raw) </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
+ </ul>
151
+
152
+
153
+
154
+
155
+ <div id="instance_method_details" class="method_details_list">
156
+ <h2>Instance Method Details</h2>
157
+
158
+
159
+ <div class="method_details first">
160
+ <h3 class="signature first" id="load_csv-instance_method">
161
+
162
+ - (<tt>Object</tt>) <strong>load_csv</strong>(text)
163
+
164
+
165
+
166
+
167
+
168
+ </h3><table class="source_code">
169
+ <tr>
170
+ <td>
171
+ <pre class="lines">
172
+
173
+
174
+ 6
175
+ 7
176
+ 8
177
+ 9</pre>
178
+ </td>
179
+ <td>
180
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/csv_reader.rb', line 6</span>
181
+
182
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_load_csv identifier id'>load_csv</span> <span class='rubyid_text identifier id'>text</span>
183
+ <span class='rubyid_csv identifier id'>csv</span> <span class='assign token'>=</span> <span class='rubyid_text identifier id'>text</span>
184
+ <span class='rubyid_parse_csv identifier id'>parse_csv</span> <span class='rubyid_csv identifier id'>csv</span>
185
+ <span class='rubyid_end end kw'>end</span>
186
+ </pre>
187
+ </td>
188
+ </tr>
189
+ </table>
190
+ </div>
191
+
192
+ <div class="method_details ">
193
+ <h3 class="signature " id="parse_csv-instance_method">
194
+
195
+ - (<tt>Object</tt>) <strong>parse_csv</strong>(csv_raw)
196
+
197
+
198
+
199
+
200
+
201
+ </h3><table class="source_code">
202
+ <tr>
203
+ <td>
204
+ <pre class="lines">
205
+
206
+
207
+ 11
208
+ 12
209
+ 13
210
+ 14
211
+ 15
212
+ 16
213
+ 17
214
+ 18
215
+ 19
216
+ 20
217
+ 21
218
+ 22
219
+ 23
220
+ 24
221
+ 25
222
+ 26
223
+ 27</pre>
224
+ </td>
225
+ <td>
226
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/csv_reader.rb', line 11</span>
227
+
228
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_parse_csv identifier id'>parse_csv</span> <span class='rubyid_csv_raw identifier id'>csv_raw</span>
229
+ <span class='rubyid_custom_date_converter identifier id'>custom_date_converter</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><span class='dot token'>.</span><span class='rubyid_string_optimistic_date_converter identifier id'>string_optimistic_date_converter</span>
230
+ <span class='rubyid_converters identifier id'>converters</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='symbol val'>:float</span><span class='comma token'>,</span><span class='symbol val'>:integer</span><span class='comma token'>,</span><span class='symbol val'>:date</span><span class='comma token'>,</span><span class='symbol val'>:date_time</span><span class='comma token'>,</span><span class='rubyid_custom_date_converter identifier id'>custom_date_converter</span><span class='rbrack token'>]</span>
231
+ <span class='rubyid_csv identifier id'>csv</span><span class='assign token'>=</span><span class='rubyid_nil nil kw'>nil</span>
232
+ <span class='rubyid_begin begin kw'>begin</span>
233
+ <span class='rubyid_csv identifier id'>csv</span> <span class='assign token'>=</span> <span class='rubyid_FasterCSV constant id'>FasterCSV</span><span class='dot token'>.</span><span class='rubyid_parse identifier id'>parse</span><span class='lparen token'>(</span><span class='rubyid_csv_raw identifier id'>csv_raw</span><span class='comma token'>,</span><span class='lbrace token'>{</span><span class='symbol val'>:converters=</span><span class='gt op'>&gt;</span><span class='rubyid_converters identifier id'>converters</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
234
+ <span class='rubyid_rescue rescue kw'>rescue</span>
235
+ <span class='comment val'># we're going to have another shot at it...</span>
236
+ <span class='rubyid_end end kw'>end</span>
237
+
238
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_csv identifier id'>csv</span><span class='eq op'>==</span><span class='rubyid_nil nil kw'>nil</span> <span class='rubyid_or or kw'>or</span> <span class='rubyid_csv identifier id'>csv</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_count identifier id'>count</span> <span class='eq op'>==</span> <span class='integer val'>1</span>
239
+ <span class='rubyid_csv_excel identifier id'>csv_excel</span> <span class='assign token'>=</span> <span class='rubyid_FasterCSV constant id'>FasterCSV</span><span class='dot token'>.</span><span class='rubyid_parse identifier id'>parse</span><span class='lparen token'>(</span><span class='rubyid_csv_raw identifier id'>csv_raw</span><span class='comma token'>,</span><span class='lbrace token'>{</span><span class='symbol val'>:converters=</span><span class='gt op'>&gt;</span><span class='rubyid_converters identifier id'>converters</span><span class='comma token'>,</span><span class='symbol val'>:col_sep=</span><span class='gt op'>&gt;</span><span class='string val'>';'</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
240
+ <span class='rubyid_csv identifier id'>csv</span> <span class='assign token'>=</span> <span class='rubyid_csv_excel identifier id'>csv_excel</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_csv_excel identifier id'>csv_excel</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_count identifier id'>count</span> <span class='gt op'>&gt;</span> <span class='integer val'>1</span>
241
+ <span class='rubyid_end end kw'>end</span>
242
+
243
+ <span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='assign token'>=</span><span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Sheet constant id'>Sheet</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_csv identifier id'>csv</span><span class='comma token'>,</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rubyid_has_contents? fid id'>has_contents?</span>
244
+ <span class='rubyid_end end kw'>end</span>
245
+ </pre>
246
+ </td>
247
+ </tr>
248
+ </table>
249
+ </div>
250
+
251
+ </div>
252
+
253
+ </div>
254
+
255
+ <div id="footer">
256
+ Generated on Thu Jan 17 13:15:56 2013 by
257
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
258
+ 0.8.3 (ruby-1.8.7).
259
+ </div>
260
+
261
+ </body>
262
+ </html>
@@ -0,0 +1,238 @@
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::TxtReader
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 (T)</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">TxtReader</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::TxtReader
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/txt_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_txt-instance_method" title="#load_txt (instance method)">- (Object) <strong>load_txt</strong>(text) </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="#parse_txt-instance_method" title="#parse_txt (instance method)">- (Object) <strong>parse_txt</strong>(csv_raw) </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
+ </ul>
151
+
152
+
153
+
154
+
155
+ <div id="instance_method_details" class="method_details_list">
156
+ <h2>Instance Method Details</h2>
157
+
158
+
159
+ <div class="method_details first">
160
+ <h3 class="signature first" id="load_txt-instance_method">
161
+
162
+ - (<tt>Object</tt>) <strong>load_txt</strong>(text)
163
+
164
+
165
+
166
+
167
+
168
+ </h3><table class="source_code">
169
+ <tr>
170
+ <td>
171
+ <pre class="lines">
172
+
173
+
174
+ 5
175
+ 6
176
+ 7
177
+ 8</pre>
178
+ </td>
179
+ <td>
180
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/txt_reader.rb', line 5</span>
181
+
182
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_load_txt identifier id'>load_txt</span> <span class='rubyid_text identifier id'>text</span>
183
+ <span class='rubyid_csv identifier id'>csv</span> <span class='assign token'>=</span> <span class='rubyid_text identifier id'>text</span>
184
+ <span class='rubyid_parse_txt identifier id'>parse_txt</span> <span class='rubyid_csv identifier id'>csv</span>
185
+ <span class='rubyid_end end kw'>end</span>
186
+ </pre>
187
+ </td>
188
+ </tr>
189
+ </table>
190
+ </div>
191
+
192
+ <div class="method_details ">
193
+ <h3 class="signature " id="parse_txt-instance_method">
194
+
195
+ - (<tt>Object</tt>) <strong>parse_txt</strong>(csv_raw)
196
+
197
+
198
+
199
+
200
+
201
+ </h3><table class="source_code">
202
+ <tr>
203
+ <td>
204
+ <pre class="lines">
205
+
206
+
207
+ 10
208
+ 11
209
+ 12
210
+ 13
211
+ 14</pre>
212
+ </td>
213
+ <td>
214
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/txt_reader.rb', line 10</span>
215
+
216
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_parse_txt identifier id'>parse_txt</span> <span class='rubyid_csv_raw identifier id'>csv_raw</span>
217
+ <span class='rubyid_csv identifier id'>csv</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
218
+ <span class='rubyid_csv_raw identifier id'>csv_raw</span><span class='dot token'>.</span><span class='rubyid_split identifier id'>split</span><span class='lparen token'>(</span><span class='string val'>&quot;\n&quot;</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_l identifier id'>l</span><span class='bitor op'>|</span> <span class='rubyid_csv identifier id'>csv</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_FasterCSV constant id'>FasterCSV</span><span class='dot token'>.</span><span class='rubyid_parse_line identifier id'>parse_line</span><span class='lparen token'>(</span><span class='rubyid_l identifier id'>l</span><span class='comma token'>,</span><span class='lbrace token'>{</span><span class='symbol val'>:col_sep=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;\t&quot;</span><span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='semicolon token'>;</span><span class='rubyid_nil nil kw'>nil</span><span class='rbrace token'>}</span>
219
+ <span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='assign token'>=</span><span class='rubyid_Workbook constant id'>Workbook</span><span class='colon2 op'>::</span><span class='rubyid_Sheet constant id'>Sheet</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_csv identifier id'>csv</span><span class='comma token'>,</span><span class='rubyid_self self kw'>self</span><span class='comma token'>,</span><span class='lbrace token'>{</span><span class='symbol val'>:parse_cells_on_batch_creation=</span><span class='gt op'>&gt;</span><span class='rubyid_true true kw'>true</span><span class='comma token'>,</span> <span class='symbol val'>:cell_parse_options=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:detect_date=</span><span class='gt op'>&gt;</span><span class='rubyid_true true kw'>true</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rubyid_has_contents? fid id'>has_contents?</span>
220
+ <span class='rubyid_end end kw'>end</span>
221
+ </pre>
222
+ </td>
223
+ </tr>
224
+ </table>
225
+ </div>
226
+
227
+ </div>
228
+
229
+ </div>
230
+
231
+ <div id="footer">
232
+ Generated on Thu Jan 17 13:15:56 2013 by
233
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
234
+ 0.8.3 (ruby-1.8.7).
235
+ </div>
236
+
237
+ </body>
238
+ </html>