dbf 4.1.1 → 4.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +67 -53
  5. data/Guardfile +1 -1
  6. data/LICENSE +1 -1
  7. data/README.md +115 -20
  8. data/bin/dbf +3 -1
  9. data/docs/CNAME +1 -0
  10. data/docs/DBF.html +200 -0
  11. data/docs/DBF/Column.html +947 -0
  12. data/docs/DBF/Column/LengthError.html +124 -0
  13. data/docs/DBF/Column/NameError.html +124 -0
  14. data/docs/DBF/ColumnType.html +115 -0
  15. data/docs/DBF/ColumnType/Base.html +389 -0
  16. data/docs/DBF/ColumnType/Boolean.html +238 -0
  17. data/docs/DBF/ColumnType/Currency.html +238 -0
  18. data/docs/DBF/ColumnType/Date.html +242 -0
  19. data/docs/DBF/ColumnType/DateTime.html +246 -0
  20. data/docs/DBF/ColumnType/Double.html +238 -0
  21. data/docs/DBF/ColumnType/Float.html +238 -0
  22. data/docs/DBF/ColumnType/General.html +238 -0
  23. data/docs/DBF/ColumnType/Memo.html +246 -0
  24. data/docs/DBF/ColumnType/Nil.html +238 -0
  25. data/docs/DBF/ColumnType/Number.html +242 -0
  26. data/docs/DBF/ColumnType/SignedLong.html +238 -0
  27. data/docs/DBF/ColumnType/String.html +240 -0
  28. data/docs/DBF/Database.html +126 -0
  29. data/docs/DBF/Database/Foxpro.html +653 -0
  30. data/docs/DBF/Database/Table.html +346 -0
  31. data/docs/DBF/FileNotFoundError.html +124 -0
  32. data/docs/DBF/Header.html +723 -0
  33. data/docs/DBF/Memo.html +117 -0
  34. data/docs/DBF/Memo/Base.html +485 -0
  35. data/docs/DBF/Memo/Dbase3.html +242 -0
  36. data/docs/DBF/Memo/Dbase4.html +230 -0
  37. data/docs/DBF/Memo/Foxpro.html +268 -0
  38. data/docs/DBF/NoColumnsDefined.html +124 -0
  39. data/docs/DBF/Record.html +773 -0
  40. data/docs/DBF/Schema.html +980 -0
  41. data/docs/DBF/Table.html +1571 -0
  42. data/docs/_index.html +415 -0
  43. data/docs/class_list.html +51 -0
  44. data/docs/css/common.css +1 -0
  45. data/docs/css/full_list.css +58 -0
  46. data/docs/css/style.css +497 -0
  47. data/docs/file.README.html +359 -0
  48. data/docs/file_list.html +56 -0
  49. data/docs/frames.html +17 -0
  50. data/docs/index.html +359 -0
  51. data/docs/js/app.js +314 -0
  52. data/docs/js/full_list.js +216 -0
  53. data/docs/js/jquery.js +4 -0
  54. data/docs/method_list.html +675 -0
  55. data/docs/top-level-namespace.html +110 -0
  56. data/lib/dbf/column.rb +5 -4
  57. data/lib/dbf/column_type.rb +29 -8
  58. data/lib/dbf/database/foxpro.rb +7 -2
  59. data/lib/dbf/header.rb +11 -3
  60. data/lib/dbf/record.rb +5 -5
  61. data/lib/dbf/schema.rb +4 -3
  62. data/lib/dbf/table.rb +32 -12
  63. data/lib/dbf/version.rb +1 -1
  64. data/spec/dbf/column_spec.rb +17 -17
  65. data/spec/dbf/{database_spec.rb → database/foxpro_spec.rb} +0 -0
  66. data/spec/dbf/file_formats_spec.rb +22 -6
  67. data/spec/dbf/record_spec.rb +2 -2
  68. data/spec/dbf/table_spec.rb +8 -0
  69. data/spec/fixtures/dbase_02.dbf +0 -0
  70. data/spec/fixtures/polygon.dbf +0 -0
  71. data/spec/spec_helper.rb +0 -2
  72. metadata +57 -10
  73. data/docs/supported_encodings.csv +0 -60
  74. data/docs/supported_types.markdown +0 -53
@@ -0,0 +1,346 @@
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::Database::Table
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::Database::Table";
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 (T)</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="../Database.html" title="DBF::Database (module)">Database</a></span></span>
41
+ &raquo;
42
+ <span class="title">Table</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::Database::Table
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="../Table.html" title="DBF::Table (class)">Table</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../Table.html" title="DBF::Table (class)">Table</a></span></li>
78
+
79
+ <li class="next">DBF::Database::Table</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/dbf/database/foxpro.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+ <h2>Constant Summary</h2>
108
+
109
+ <h3 class="inherited">Constants inherited
110
+ from <span class='object_link'><a href="../Table.html" title="DBF::Table (class)">Table</a></span></h3>
111
+ <p class="inherited"><span class='object_link'><a href="../Table.html#DBASE2_HEADER_SIZE-constant" title="DBF::Table::DBASE2_HEADER_SIZE (constant)">Table::DBASE2_HEADER_SIZE</a></span>, <span class='object_link'><a href="../Table.html#DBASE3_HEADER_SIZE-constant" title="DBF::Table::DBASE3_HEADER_SIZE (constant)">Table::DBASE3_HEADER_SIZE</a></span>, <span class='object_link'><a href="../Table.html#FOXPRO_VERSIONS-constant" title="DBF::Table::FOXPRO_VERSIONS (constant)">Table::FOXPRO_VERSIONS</a></span>, <span class='object_link'><a href="../Table.html#VERSIONS-constant" title="DBF::Table::VERSIONS (constant)">Table::VERSIONS</a></span></p>
112
+
113
+
114
+
115
+ <h3 class="inherited">Constants included
116
+ from <span class='object_link'><a href="../Schema.html" title="DBF::Schema (module)">Schema</a></span></h3>
117
+ <p class="inherited"><span class='object_link'><a href="../Schema.html#FORMATS-constant" title="DBF::Schema::FORMATS (constant)">Schema::FORMATS</a></span>, <span class='object_link'><a href="../Schema.html#OTHER_DATA_TYPES-constant" title="DBF::Schema::OTHER_DATA_TYPES (constant)">Schema::OTHER_DATA_TYPES</a></span></p>
118
+
119
+
120
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
121
+ <ul class="summary">
122
+
123
+ <li class="public ">
124
+ <span class="summary_signature">
125
+
126
+ <a href="#long_names-instance_method" title="#long_names (instance method)">#<strong>long_names</strong> &#x21d2; Object </a>
127
+
128
+
129
+
130
+ </span>
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <span class="summary_desc"><div class='inline'>
144
+ <p>Returns the value of attribute long_names.</p>
145
+ </div></span>
146
+
147
+ </li>
148
+
149
+
150
+ </ul>
151
+
152
+
153
+
154
+
155
+
156
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Table.html" title="DBF::Table (class)">Table</a></span></h3>
157
+ <p class="inherited"><span class='object_link'><a href="../Table.html#encoding-instance_method" title="DBF::Table#encoding (method)">#encoding</a></span>, <span class='object_link'><a href="../Table.html#name-instance_method" title="DBF::Table#name (method)">#name</a></span></p>
158
+
159
+
160
+
161
+ <h2>
162
+ Instance Method Summary
163
+ <small><a href="#" class="summary_toggle">collapse</a></small>
164
+ </h2>
165
+
166
+ <ul class="summary">
167
+
168
+ <li class="public ">
169
+ <span class="summary_signature">
170
+
171
+ <a href="#build_columns-instance_method" title="#build_columns (instance method)">#<strong>build_columns</strong> &#x21d2; Object </a>
172
+
173
+
174
+
175
+ </span>
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <span class="summary_desc"><div class='inline'>
186
+ <p>:nodoc:.</p>
187
+ </div></span>
188
+
189
+ </li>
190
+
191
+
192
+ </ul>
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Table.html" title="DBF::Table (class)">Table</a></span></h3>
205
+ <p class="inherited"><span class='object_link'><a href="../Table.html#close-instance_method" title="DBF::Table#close (method)">#close</a></span>, <span class='object_link'><a href="../Table.html#closed%3F-instance_method" title="DBF::Table#closed? (method)">#closed?</a></span>, <span class='object_link'><a href="../Table.html#column_names-instance_method" title="DBF::Table#column_names (method)">#column_names</a></span>, <span class='object_link'><a href="../Table.html#columns-instance_method" title="DBF::Table#columns (method)">#columns</a></span>, <span class='object_link'><a href="../Table.html#each-instance_method" title="DBF::Table#each (method)">#each</a></span>, <span class='object_link'><a href="../Table.html#filename-instance_method" title="DBF::Table#filename (method)">#filename</a></span>, <span class='object_link'><a href="../Table.html#find-instance_method" title="DBF::Table#find (method)">#find</a></span>, <span class='object_link'><a href="../Table.html#has_memo_file%3F-instance_method" title="DBF::Table#has_memo_file? (method)">#has_memo_file?</a></span>, <span class='object_link'><a href="../Table.html#initialize-instance_method" title="DBF::Table#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Table.html#record-instance_method" title="DBF::Table#record (method)">#record</a></span>, <span class='object_link'><a href="../Table.html#to_csv-instance_method" title="DBF::Table#to_csv (method)">#to_csv</a></span>, <span class='object_link'><a href="../Table.html#version_description-instance_method" title="DBF::Table#version_description (method)">#version_description</a></span></p>
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="../Schema.html" title="DBF::Schema (module)">Schema</a></span></h3>
217
+ <p class="inherited"><span class='object_link'><a href="../Schema.html#activerecord_schema-instance_method" title="DBF::Schema#activerecord_schema (method)">#activerecord_schema</a></span>, <span class='object_link'><a href="../Schema.html#activerecord_schema_definition-instance_method" title="DBF::Schema#activerecord_schema_definition (method)">#activerecord_schema_definition</a></span>, <span class='object_link'><a href="../Schema.html#json_schema-instance_method" title="DBF::Schema#json_schema (method)">#json_schema</a></span>, <span class='object_link'><a href="../Schema.html#number_data_type-instance_method" title="DBF::Schema#number_data_type (method)">#number_data_type</a></span>, <span class='object_link'><a href="../Schema.html#schema-instance_method" title="DBF::Schema#schema (method)">#schema</a></span>, <span class='object_link'><a href="../Schema.html#schema_data_type-instance_method" title="DBF::Schema#schema_data_type (method)">#schema_data_type</a></span>, <span class='object_link'><a href="../Schema.html#schema_name-instance_method" title="DBF::Schema#schema_name (method)">#schema_name</a></span>, <span class='object_link'><a href="../Schema.html#sequel_schema-instance_method" title="DBF::Schema#sequel_schema (method)">#sequel_schema</a></span>, <span class='object_link'><a href="../Schema.html#sequel_schema_definition-instance_method" title="DBF::Schema#sequel_schema_definition (method)">#sequel_schema_definition</a></span>, <span class='object_link'><a href="../Schema.html#string_data_format-instance_method" title="DBF::Schema#string_data_format (method)">#string_data_format</a></span></p>
218
+
219
+ <div id="constructor_details" class="method_details_list">
220
+ <h2>Constructor Details</h2>
221
+
222
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="../Table.html#initialize-instance_method" title="DBF::Table#initialize (method)">DBF::Table</a></span></p>
223
+
224
+ </div>
225
+
226
+ <div id="instance_attr_details" class="attr_details">
227
+ <h2>Instance Attribute Details</h2>
228
+
229
+
230
+ <span id="long_names=-instance_method"></span>
231
+ <div class="method_details first">
232
+ <h3 class="signature first" id="long_names-instance_method">
233
+
234
+ #<strong>long_names</strong> &#x21d2; <tt>Object</tt>
235
+
236
+
237
+
238
+
239
+
240
+ </h3><div class="docstring">
241
+ <div class="discussion">
242
+
243
+ <p>Returns the value of attribute long_names.</p>
244
+
245
+
246
+ </div>
247
+ </div>
248
+ <div class="tags">
249
+
250
+
251
+ </div><table class="source_code">
252
+ <tr>
253
+ <td>
254
+ <pre class="lines">
255
+
256
+
257
+ 113
258
+ 114
259
+ 115</pre>
260
+ </td>
261
+ <td>
262
+ <pre class="code"><span class="info file"># File 'lib/dbf/database/foxpro.rb', line 113</span>
263
+
264
+ <span class='kw'>def</span> <span class='id identifier rubyid_long_names'>long_names</span>
265
+ <span class='ivar'>@long_names</span>
266
+ <span class='kw'>end</span></pre>
267
+ </td>
268
+ </tr>
269
+ </table>
270
+ </div>
271
+
272
+ </div>
273
+
274
+
275
+ <div id="instance_method_details" class="method_details_list">
276
+ <h2>Instance Method Details</h2>
277
+
278
+
279
+ <div class="method_details first">
280
+ <h3 class="signature first" id="build_columns-instance_method">
281
+
282
+ #<strong>build_columns</strong> &#x21d2; <tt>Object</tt>
283
+
284
+
285
+
286
+
287
+
288
+ </h3><div class="docstring">
289
+ <div class="discussion">
290
+
291
+ <p>:nodoc:</p>
292
+
293
+
294
+ </div>
295
+ </div>
296
+ <div class="tags">
297
+
298
+
299
+ </div><table class="source_code">
300
+ <tr>
301
+ <td>
302
+ <pre class="lines">
303
+
304
+
305
+ 115
306
+ 116
307
+ 117
308
+ 118
309
+ 119
310
+ 120
311
+ 121
312
+ 122
313
+ 123
314
+ 124</pre>
315
+ </td>
316
+ <td>
317
+ <pre class="code"><span class="info file"># File 'lib/dbf/database/foxpro.rb', line 115</span>
318
+
319
+ <span class='kw'>def</span> <span class='id identifier rubyid_build_columns'>build_columns</span> <span class='comment'># :nodoc:
320
+ </span> <span class='id identifier rubyid_columns'>columns</span> <span class='op'>=</span> <span class='kw'>super</span>
321
+
322
+ <span class='comment'># modify the column definitions to use the long names as the
323
+ </span> <span class='comment'># columnname property is readonly, recreate the column definitions
324
+ </span> <span class='id identifier rubyid_columns'>columns</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_column'>column</span><span class='op'>|</span>
325
+ <span class='id identifier rubyid_long_name'>long_name</span> <span class='op'>=</span> <span class='id identifier rubyid_long_names'>long_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_columns'>columns</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_column'>column</span><span class='rparen'>)</span><span class='rbracket'>]</span>
326
+ <span class='const'><span class='object_link'><a href="../Column.html" title="DBF::Column (class)">Column</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Column.html#initialize-instance_method" title="DBF::Column#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_long_name'>long_name</span><span class='comma'>,</span> <span class='id identifier rubyid_column'>column</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_column'>column</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='comma'>,</span> <span class='id identifier rubyid_column'>column</span><span class='period'>.</span><span class='id identifier rubyid_decimal'>decimal</span><span class='rparen'>)</span>
327
+ <span class='kw'>end</span>
328
+ <span class='kw'>end</span></pre>
329
+ </td>
330
+ </tr>
331
+ </table>
332
+ </div>
333
+
334
+ </div>
335
+
336
+ </div>
337
+
338
+ <div id="footer">
339
+ Generated on Sun Aug 8 16:19:08 2021 by
340
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
341
+ 0.9.26 (ruby-3.0.1).
342
+ </div>
343
+
344
+ </div>
345
+ </body>
346
+ </html>
@@ -0,0 +1,124 @@
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
+ Exception: DBF::FileNotFoundError
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::FileNotFoundError";
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 (F)</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">FileNotFoundError</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>Exception: DBF::FileNotFoundError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">StandardError</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next">DBF::FileNotFoundError</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/dbf/table.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ </div>
115
+
116
+ <div id="footer">
117
+ Generated on Sun Aug 8 16:19:08 2021 by
118
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
+ 0.9.26 (ruby-3.0.1).
120
+ </div>
121
+
122
+ </div>
123
+ </body>
124
+ </html>