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,238 @@
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::ColumnType::Nil
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::ColumnType::Nil";
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 (N)</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="../ColumnType.html" title="DBF::ColumnType (module)">ColumnType</a></span></span>
41
+ &raquo;
42
+ <span class="title">Nil</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::ColumnType::Nil
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="Base.html" title="DBF::ColumnType::Base (class)">Base</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Base.html" title="DBF::ColumnType::Base (class)">Base</a></span></li>
78
+
79
+ <li class="next">DBF::ColumnType::Nil</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/column_type.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary</h2>
111
+
112
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="DBF::ColumnType::Base (class)">Base</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="Base.html#decimal-instance_method" title="DBF::ColumnType::Base#decimal (method)">#decimal</a></span>, <span class='object_link'><a href="Base.html#encoding-instance_method" title="DBF::ColumnType::Base#encoding (method)">#encoding</a></span></p>
114
+
115
+
116
+
117
+ <h2>
118
+ Instance Method Summary
119
+ <small><a href="#" class="summary_toggle">collapse</a></small>
120
+ </h2>
121
+
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#type_cast-instance_method" title="#type_cast (instance method)">#<strong>type_cast</strong>(_value) &#x21d2; Object </a>
128
+
129
+
130
+
131
+ </span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'></div></span>
142
+
143
+ </li>
144
+
145
+
146
+ </ul>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="DBF::ColumnType::Base (class)">Base</a></span></h3>
159
+ <p class="inherited"><span class='object_link'><a href="Base.html#initialize-instance_method" title="DBF::ColumnType::Base#initialize (method)">#initialize</a></span></p>
160
+ <div id="constructor_details" class="method_details_list">
161
+ <h2>Constructor Details</h2>
162
+
163
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Base.html#initialize-instance_method" title="DBF::ColumnType::Base#initialize (method)">DBF::ColumnType::Base</a></span></p>
164
+
165
+ </div>
166
+
167
+
168
+ <div id="instance_method_details" class="method_details_list">
169
+ <h2>Instance Method Details</h2>
170
+
171
+
172
+ <div class="method_details first">
173
+ <h3 class="signature first" id="type_cast-instance_method">
174
+
175
+ #<strong>type_cast</strong>(_value) &#x21d2; <tt>Object</tt>
176
+
177
+
178
+
179
+
180
+
181
+ </h3><div class="docstring">
182
+ <div class="discussion">
183
+
184
+
185
+ </div>
186
+ </div>
187
+ <div class="tags">
188
+ <p class="tag_title">Parameters:</p>
189
+ <ul class="param">
190
+
191
+ <li>
192
+
193
+ <span class='name'>_value</span>
194
+
195
+
196
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="DBF::ColumnType::String (class)">String</a></span></tt>)</span>
197
+
198
+
199
+
200
+ </li>
201
+
202
+ </ul>
203
+
204
+
205
+ </div><table class="source_code">
206
+ <tr>
207
+ <td>
208
+ <pre class="lines">
209
+
210
+
211
+ 17
212
+ 18
213
+ 19</pre>
214
+ </td>
215
+ <td>
216
+ <pre class="code"><span class="info file"># File 'lib/dbf/column_type.rb', line 17</span>
217
+
218
+ <span class='kw'>def</span> <span class='id identifier rubyid_type_cast'>type_cast</span><span class='lparen'>(</span><span class='id identifier rubyid__value'>_value</span><span class='rparen'>)</span>
219
+ <span class='kw'>nil</span>
220
+ <span class='kw'>end</span></pre>
221
+ </td>
222
+ </tr>
223
+ </table>
224
+ </div>
225
+
226
+ </div>
227
+
228
+ </div>
229
+
230
+ <div id="footer">
231
+ Generated on Sun Aug 8 16:19:08 2021 by
232
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
233
+ 0.9.26 (ruby-3.0.1).
234
+ </div>
235
+
236
+ </div>
237
+ </body>
238
+ </html>
@@ -0,0 +1,242 @@
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::ColumnType::Number
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::ColumnType::Number";
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 (N)</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="../ColumnType.html" title="DBF::ColumnType (module)">ColumnType</a></span></span>
41
+ &raquo;
42
+ <span class="title">Number</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::ColumnType::Number
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="Base.html" title="DBF::ColumnType::Base (class)">Base</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Base.html" title="DBF::ColumnType::Base (class)">Base</a></span></li>
78
+
79
+ <li class="next">DBF::ColumnType::Number</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/column_type.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary</h2>
111
+
112
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="DBF::ColumnType::Base (class)">Base</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="Base.html#decimal-instance_method" title="DBF::ColumnType::Base#decimal (method)">#decimal</a></span>, <span class='object_link'><a href="Base.html#encoding-instance_method" title="DBF::ColumnType::Base#encoding (method)">#encoding</a></span></p>
114
+
115
+
116
+
117
+ <h2>
118
+ Instance Method Summary
119
+ <small><a href="#" class="summary_toggle">collapse</a></small>
120
+ </h2>
121
+
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#type_cast-instance_method" title="#type_cast (instance method)">#<strong>type_cast</strong>(value) &#x21d2; Object </a>
128
+
129
+
130
+
131
+ </span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'></div></span>
142
+
143
+ </li>
144
+
145
+
146
+ </ul>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="DBF::ColumnType::Base (class)">Base</a></span></h3>
159
+ <p class="inherited"><span class='object_link'><a href="Base.html#initialize-instance_method" title="DBF::ColumnType::Base#initialize (method)">#initialize</a></span></p>
160
+ <div id="constructor_details" class="method_details_list">
161
+ <h2>Constructor Details</h2>
162
+
163
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Base.html#initialize-instance_method" title="DBF::ColumnType::Base#initialize (method)">DBF::ColumnType::Base</a></span></p>
164
+
165
+ </div>
166
+
167
+
168
+ <div id="instance_method_details" class="method_details_list">
169
+ <h2>Instance Method Details</h2>
170
+
171
+
172
+ <div class="method_details first">
173
+ <h3 class="signature first" id="type_cast-instance_method">
174
+
175
+ #<strong>type_cast</strong>(value) &#x21d2; <tt>Object</tt>
176
+
177
+
178
+
179
+
180
+
181
+ </h3><div class="docstring">
182
+ <div class="discussion">
183
+
184
+
185
+ </div>
186
+ </div>
187
+ <div class="tags">
188
+ <p class="tag_title">Parameters:</p>
189
+ <ul class="param">
190
+
191
+ <li>
192
+
193
+ <span class='name'>value</span>
194
+
195
+
196
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="DBF::ColumnType::String (class)">String</a></span></tt>)</span>
197
+
198
+
199
+
200
+ </li>
201
+
202
+ </ul>
203
+
204
+
205
+ </div><table class="source_code">
206
+ <tr>
207
+ <td>
208
+ <pre class="lines">
209
+
210
+
211
+ 25
212
+ 26
213
+ 27
214
+ 28
215
+ 29</pre>
216
+ </td>
217
+ <td>
218
+ <pre class="code"><span class="info file"># File 'lib/dbf/column_type.rb', line 25</span>
219
+
220
+ <span class='kw'>def</span> <span class='id identifier rubyid_type_cast'>type_cast</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
221
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
222
+
223
+ <span class='ivar'>@decimal</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span> <span class='op'>?</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>:</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span>
224
+ <span class='kw'>end</span></pre>
225
+ </td>
226
+ </tr>
227
+ </table>
228
+ </div>
229
+
230
+ </div>
231
+
232
+ </div>
233
+
234
+ <div id="footer">
235
+ Generated on Sun Aug 8 16:19:08 2021 by
236
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
237
+ 0.9.26 (ruby-3.0.1).
238
+ </div>
239
+
240
+ </div>
241
+ </body>
242
+ </html>