dbf 4.0.1 → 4.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +68 -54
  5. data/Guardfile +1 -1
  6. data/LICENSE +1 -1
  7. data/README.md +115 -20
  8. data/bin/dbf +1 -1
  9. data/dbf.gemspec +1 -0
  10. data/docs/CNAME +1 -0
  11. data/docs/DBF.html +200 -0
  12. data/docs/DBF/Column.html +947 -0
  13. data/docs/DBF/Column/LengthError.html +124 -0
  14. data/docs/DBF/Column/NameError.html +124 -0
  15. data/docs/DBF/ColumnType.html +115 -0
  16. data/docs/DBF/ColumnType/Base.html +389 -0
  17. data/docs/DBF/ColumnType/Boolean.html +238 -0
  18. data/docs/DBF/ColumnType/Currency.html +238 -0
  19. data/docs/DBF/ColumnType/Date.html +242 -0
  20. data/docs/DBF/ColumnType/DateTime.html +246 -0
  21. data/docs/DBF/ColumnType/Double.html +238 -0
  22. data/docs/DBF/ColumnType/Float.html +238 -0
  23. data/docs/DBF/ColumnType/General.html +238 -0
  24. data/docs/DBF/ColumnType/Memo.html +246 -0
  25. data/docs/DBF/ColumnType/Nil.html +238 -0
  26. data/docs/DBF/ColumnType/Number.html +242 -0
  27. data/docs/DBF/ColumnType/SignedLong.html +238 -0
  28. data/docs/DBF/ColumnType/String.html +240 -0
  29. data/docs/DBF/Database.html +126 -0
  30. data/docs/DBF/Database/Foxpro.html +653 -0
  31. data/docs/DBF/Database/Table.html +346 -0
  32. data/docs/DBF/FileNotFoundError.html +124 -0
  33. data/docs/DBF/Header.html +723 -0
  34. data/docs/DBF/Memo.html +117 -0
  35. data/docs/DBF/Memo/Base.html +485 -0
  36. data/docs/DBF/Memo/Dbase3.html +242 -0
  37. data/docs/DBF/Memo/Dbase4.html +230 -0
  38. data/docs/DBF/Memo/Foxpro.html +268 -0
  39. data/docs/DBF/NoColumnsDefined.html +124 -0
  40. data/docs/DBF/Record.html +773 -0
  41. data/docs/DBF/Schema.html +980 -0
  42. data/docs/DBF/Table.html +1571 -0
  43. data/docs/_index.html +415 -0
  44. data/docs/class_list.html +51 -0
  45. data/docs/css/common.css +1 -0
  46. data/docs/css/full_list.css +58 -0
  47. data/docs/css/style.css +497 -0
  48. data/docs/file.README.html +359 -0
  49. data/docs/file_list.html +56 -0
  50. data/docs/frames.html +17 -0
  51. data/docs/index.html +359 -0
  52. data/docs/js/app.js +314 -0
  53. data/docs/js/full_list.js +216 -0
  54. data/docs/js/jquery.js +4 -0
  55. data/docs/method_list.html +675 -0
  56. data/docs/top-level-namespace.html +110 -0
  57. data/lib/dbf/column.rb +5 -4
  58. data/lib/dbf/column_type.rb +29 -8
  59. data/lib/dbf/database/foxpro.rb +7 -2
  60. data/lib/dbf/header.rb +11 -3
  61. data/lib/dbf/record.rb +5 -5
  62. data/lib/dbf/schema.rb +4 -3
  63. data/lib/dbf/table.rb +32 -12
  64. data/lib/dbf/version.rb +1 -1
  65. data/spec/dbf/column_spec.rb +17 -17
  66. data/spec/dbf/{database_spec.rb → database/foxpro_spec.rb} +0 -0
  67. data/spec/dbf/file_formats_spec.rb +22 -6
  68. data/spec/dbf/record_spec.rb +2 -2
  69. data/spec/dbf/table_spec.rb +8 -0
  70. data/spec/fixtures/dbase_02.dbf +0 -0
  71. data/spec/fixtures/polygon.dbf +0 -0
  72. data/spec/spec_helper.rb +0 -2
  73. metadata +59 -12
  74. data/docs/supported_encodings.csv +0 -60
  75. data/docs/supported_types.markdown +0 -53
@@ -0,0 +1,117 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: DBF::Memo
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "DBF::Memo";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (M)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../DBF.html" title="DBF (module)">DBF</a></span></span>
41
+ &raquo;
42
+ <span class="title">Memo</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: DBF::Memo
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/dbf/memo/base.rb<span class="defines">,<br />
82
+ lib/dbf/memo/dbase3.rb,<br /> lib/dbf/memo/dbase4.rb,<br /> lib/dbf/memo/foxpro.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Defined Under Namespace</h2>
89
+ <p class="children">
90
+
91
+
92
+
93
+
94
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Memo/Base.html" title="DBF::Memo::Base (class)">Base</a></span>, <span class='object_link'><a href="Memo/Dbase3.html" title="DBF::Memo::Dbase3 (class)">Dbase3</a></span>, <span class='object_link'><a href="Memo/Dbase4.html" title="DBF::Memo::Dbase4 (class)">Dbase4</a></span>, <span class='object_link'><a href="Memo/Foxpro.html" title="DBF::Memo::Foxpro (class)">Foxpro</a></span>
95
+
96
+
97
+ </p>
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ </div>
108
+
109
+ <div id="footer">
110
+ Generated on Sun Aug 8 16:19:08 2021 by
111
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
+ 0.9.26 (ruby-3.0.1).
113
+ </div>
114
+
115
+ </div>
116
+ </body>
117
+ </html>
@@ -0,0 +1,485 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: DBF::Memo::Base
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "DBF::Memo::Base";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (B)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../DBF.html" title="DBF (module)">DBF</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Memo.html" title="DBF::Memo (module)">Memo</a></span></span>
41
+ &raquo;
42
+ <span class="title">Base</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: DBF::Memo::Base
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">DBF::Memo::Base</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/dbf/memo/base.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <div id="subclasses">
103
+ <h2>Direct Known Subclasses</h2>
104
+ <p class="children"><span class='object_link'><a href="Dbase3.html" title="DBF::Memo::Dbase3 (class)">Dbase3</a></span>, <span class='object_link'><a href="Dbase4.html" title="DBF::Memo::Dbase4 (class)">Dbase4</a></span>, <span class='object_link'><a href="Foxpro.html" title="DBF::Memo::Foxpro (class)">Foxpro</a></span></p>
105
+ </div>
106
+
107
+
108
+ <h2>
109
+ Constant Summary
110
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
111
+ </h2>
112
+
113
+ <dl class="constants">
114
+
115
+ <dt id="BLOCK_HEADER_SIZE-constant" class="">BLOCK_HEADER_SIZE =
116
+
117
+ </dt>
118
+ <dd><pre class="code"><span class='int'>8</span></pre></dd>
119
+
120
+ <dt id="BLOCK_SIZE-constant" class="">BLOCK_SIZE =
121
+
122
+ </dt>
123
+ <dd><pre class="code"><span class='int'>512</span></pre></dd>
124
+
125
+ </dl>
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <h2>
136
+ Class Method Summary
137
+ <small><a href="#" class="summary_toggle">collapse</a></small>
138
+ </h2>
139
+
140
+ <ul class="summary">
141
+
142
+ <li class="public ">
143
+ <span class="summary_signature">
144
+
145
+ <a href="#open-class_method" title="open (class method)">.<strong>open</strong>(filename, version) &#x21d2; Object </a>
146
+
147
+
148
+
149
+ </span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'></div></span>
160
+
161
+ </li>
162
+
163
+
164
+ </ul>
165
+
166
+ <h2>
167
+ Instance Method Summary
168
+ <small><a href="#" class="summary_toggle">collapse</a></small>
169
+ </h2>
170
+
171
+ <ul class="summary">
172
+
173
+ <li class="public ">
174
+ <span class="summary_signature">
175
+
176
+ <a href="#close-instance_method" title="#close (instance method)">#<strong>close</strong> &#x21d2; Object </a>
177
+
178
+
179
+
180
+ </span>
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+ <span class="summary_desc"><div class='inline'></div></span>
191
+
192
+ </li>
193
+
194
+
195
+ <li class="public ">
196
+ <span class="summary_signature">
197
+
198
+ <a href="#closed%3F-instance_method" title="#closed? (instance method)">#<strong>closed?</strong> &#x21d2; Boolean </a>
199
+
200
+
201
+
202
+ </span>
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+ <span class="summary_desc"><div class='inline'></div></span>
213
+
214
+ </li>
215
+
216
+
217
+ <li class="public ">
218
+ <span class="summary_signature">
219
+
220
+ <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong>(start_block) &#x21d2; Object </a>
221
+
222
+
223
+
224
+ </span>
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+ <span class="summary_desc"><div class='inline'></div></span>
235
+
236
+ </li>
237
+
238
+
239
+ <li class="public ">
240
+ <span class="summary_signature">
241
+
242
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(data, version) &#x21d2; Base </a>
243
+
244
+
245
+
246
+ </span>
247
+
248
+
249
+ <span class="note title constructor">constructor</span>
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+ <span class="summary_desc"><div class='inline'>
259
+ <p>A new instance of Base.</p>
260
+ </div></span>
261
+
262
+ </li>
263
+
264
+
265
+ </ul>
266
+
267
+
268
+ <div id="constructor_details" class="method_details_list">
269
+ <h2>Constructor Details</h2>
270
+
271
+ <div class="method_details first">
272
+ <h3 class="signature first" id="initialize-instance_method">
273
+
274
+ #<strong>initialize</strong>(data, version) &#x21d2; <tt><span class='object_link'><a href="" title="DBF::Memo::Base (class)">Base</a></span></tt>
275
+
276
+
277
+
278
+
279
+
280
+ </h3><div class="docstring">
281
+ <div class="discussion">
282
+
283
+ <p>Returns a new instance of Base.</p>
284
+
285
+
286
+ </div>
287
+ </div>
288
+ <div class="tags">
289
+
290
+
291
+ </div><table class="source_code">
292
+ <tr>
293
+ <td>
294
+ <pre class="lines">
295
+
296
+
297
+ 11
298
+ 12
299
+ 13
300
+ 14</pre>
301
+ </td>
302
+ <td>
303
+ <pre class="code"><span class="info file"># File 'lib/dbf/memo/base.rb', line 11</span>
304
+
305
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='rparen'>)</span>
306
+ <span class='ivar'>@data</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span>
307
+ <span class='ivar'>@version</span> <span class='op'>=</span> <span class='id identifier rubyid_version'>version</span>
308
+ <span class='kw'>end</span></pre>
309
+ </td>
310
+ </tr>
311
+ </table>
312
+ </div>
313
+
314
+ </div>
315
+
316
+
317
+ <div id="class_method_details" class="method_details_list">
318
+ <h2>Class Method Details</h2>
319
+
320
+
321
+ <div class="method_details first">
322
+ <h3 class="signature first" id="open-class_method">
323
+
324
+ .<strong>open</strong>(filename, version) &#x21d2; <tt>Object</tt>
325
+
326
+
327
+
328
+
329
+
330
+ </h3><table class="source_code">
331
+ <tr>
332
+ <td>
333
+ <pre class="lines">
334
+
335
+
336
+ 7
337
+ 8
338
+ 9</pre>
339
+ </td>
340
+ <td>
341
+ <pre class="code"><span class="info file"># File 'lib/dbf/memo/base.rb', line 7</span>
342
+
343
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='rparen'>)</span>
344
+ <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>rb</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='rparen'>)</span>
345
+ <span class='kw'>end</span></pre>
346
+ </td>
347
+ </tr>
348
+ </table>
349
+ </div>
350
+
351
+ </div>
352
+
353
+ <div id="instance_method_details" class="method_details_list">
354
+ <h2>Instance Method Details</h2>
355
+
356
+
357
+ <div class="method_details first">
358
+ <h3 class="signature first" id="close-instance_method">
359
+
360
+ #<strong>close</strong> &#x21d2; <tt>Object</tt>
361
+
362
+
363
+
364
+
365
+
366
+ </h3><table class="source_code">
367
+ <tr>
368
+ <td>
369
+ <pre class="lines">
370
+
371
+
372
+ 22
373
+ 23
374
+ 24</pre>
375
+ </td>
376
+ <td>
377
+ <pre class="code"><span class="info file"># File 'lib/dbf/memo/base.rb', line 22</span>
378
+
379
+ <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span>
380
+ <span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span> <span class='op'>&amp;&amp;</span> <span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_closed?'>closed?</span>
381
+ <span class='kw'>end</span></pre>
382
+ </td>
383
+ </tr>
384
+ </table>
385
+ </div>
386
+
387
+ <div class="method_details ">
388
+ <h3 class="signature " id="closed?-instance_method">
389
+
390
+ #<strong>closed?</strong> &#x21d2; <tt>Boolean</tt>
391
+
392
+
393
+
394
+
395
+
396
+ </h3><div class="docstring">
397
+ <div class="discussion">
398
+
399
+
400
+ </div>
401
+ </div>
402
+ <div class="tags">
403
+
404
+ <p class="tag_title">Returns:</p>
405
+ <ul class="return">
406
+
407
+ <li>
408
+
409
+
410
+ <span class='type'>(<tt>Boolean</tt>)</span>
411
+
412
+
413
+
414
+ </li>
415
+
416
+ </ul>
417
+
418
+ </div><table class="source_code">
419
+ <tr>
420
+ <td>
421
+ <pre class="lines">
422
+
423
+
424
+ 26
425
+ 27
426
+ 28</pre>
427
+ </td>
428
+ <td>
429
+ <pre class="code"><span class="info file"># File 'lib/dbf/memo/base.rb', line 26</span>
430
+
431
+ <span class='kw'>def</span> <span class='id identifier rubyid_closed?'>closed?</span>
432
+ <span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_closed?'>closed?</span>
433
+ <span class='kw'>end</span></pre>
434
+ </td>
435
+ </tr>
436
+ </table>
437
+ </div>
438
+
439
+ <div class="method_details ">
440
+ <h3 class="signature " id="get-instance_method">
441
+
442
+ #<strong>get</strong>(start_block) &#x21d2; <tt>Object</tt>
443
+
444
+
445
+
446
+
447
+
448
+ </h3><table class="source_code">
449
+ <tr>
450
+ <td>
451
+ <pre class="lines">
452
+
453
+
454
+ 16
455
+ 17
456
+ 18
457
+ 19
458
+ 20</pre>
459
+ </td>
460
+ <td>
461
+ <pre class="code"><span class="info file"># File 'lib/dbf/memo/base.rb', line 16</span>
462
+
463
+ <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_start_block'>start_block</span><span class='rparen'>)</span>
464
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_start_block'>start_block</span> <span class='op'>&gt;</span> <span class='int'>0</span>
465
+
466
+ <span class='id identifier rubyid_build_memo'>build_memo</span> <span class='id identifier rubyid_start_block'>start_block</span>
467
+ <span class='kw'>end</span></pre>
468
+ </td>
469
+ </tr>
470
+ </table>
471
+ </div>
472
+
473
+ </div>
474
+
475
+ </div>
476
+
477
+ <div id="footer">
478
+ Generated on Sun Aug 8 16:19:08 2021 by
479
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
480
+ 0.9.26 (ruby-3.0.1).
481
+ </div>
482
+
483
+ </div>
484
+ </body>
485
+ </html>