dbf 4.1.3 → 4.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +63 -52
  5. data/LICENSE +1 -1
  6. data/README.md +109 -16
  7. data/docs/CNAME +1 -0
  8. data/docs/DBF.html +200 -0
  9. data/docs/DBF/Column.html +947 -0
  10. data/docs/DBF/Column/LengthError.html +124 -0
  11. data/docs/DBF/Column/NameError.html +124 -0
  12. data/docs/DBF/ColumnType.html +115 -0
  13. data/docs/DBF/ColumnType/Base.html +389 -0
  14. data/docs/DBF/ColumnType/Boolean.html +238 -0
  15. data/docs/DBF/ColumnType/Currency.html +238 -0
  16. data/docs/DBF/ColumnType/Date.html +242 -0
  17. data/docs/DBF/ColumnType/DateTime.html +246 -0
  18. data/docs/DBF/ColumnType/Double.html +238 -0
  19. data/docs/DBF/ColumnType/Float.html +238 -0
  20. data/docs/DBF/ColumnType/General.html +238 -0
  21. data/docs/DBF/ColumnType/Memo.html +246 -0
  22. data/docs/DBF/ColumnType/Nil.html +238 -0
  23. data/docs/DBF/ColumnType/Number.html +242 -0
  24. data/docs/DBF/ColumnType/SignedLong.html +238 -0
  25. data/docs/DBF/ColumnType/String.html +240 -0
  26. data/docs/DBF/Database.html +126 -0
  27. data/docs/DBF/Database/Foxpro.html +653 -0
  28. data/docs/DBF/Database/Table.html +346 -0
  29. data/docs/DBF/FileNotFoundError.html +124 -0
  30. data/docs/DBF/Header.html +723 -0
  31. data/docs/DBF/Memo.html +117 -0
  32. data/docs/DBF/Memo/Base.html +485 -0
  33. data/docs/DBF/Memo/Dbase3.html +242 -0
  34. data/docs/DBF/Memo/Dbase4.html +230 -0
  35. data/docs/DBF/Memo/Foxpro.html +268 -0
  36. data/docs/DBF/NoColumnsDefined.html +124 -0
  37. data/docs/DBF/Record.html +773 -0
  38. data/docs/DBF/Schema.html +980 -0
  39. data/docs/DBF/Table.html +1571 -0
  40. data/docs/_index.html +415 -0
  41. data/docs/class_list.html +51 -0
  42. data/docs/css/common.css +1 -0
  43. data/docs/css/full_list.css +58 -0
  44. data/docs/css/style.css +497 -0
  45. data/docs/file.README.html +359 -0
  46. data/docs/file_list.html +56 -0
  47. data/docs/frames.html +17 -0
  48. data/docs/index.html +359 -0
  49. data/docs/js/app.js +314 -0
  50. data/docs/js/full_list.js +216 -0
  51. data/docs/js/jquery.js +4 -0
  52. data/docs/method_list.html +675 -0
  53. data/docs/top-level-namespace.html +110 -0
  54. data/lib/dbf/column.rb +5 -4
  55. data/lib/dbf/column_type.rb +26 -0
  56. data/lib/dbf/database/foxpro.rb +7 -2
  57. data/lib/dbf/header.rb +11 -3
  58. data/lib/dbf/record.rb +5 -5
  59. data/lib/dbf/schema.rb +4 -3
  60. data/lib/dbf/table.rb +25 -11
  61. data/lib/dbf/version.rb +1 -1
  62. data/spec/dbf/file_formats_spec.rb +18 -0
  63. data/spec/fixtures/dbase_02.dbf +0 -0
  64. metadata +52 -6
  65. data/docs/supported_encodings.csv +0 -60
  66. data/docs/supported_types.markdown +0 -38
@@ -0,0 +1,268 @@
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::Foxpro
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::Foxpro";
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> &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">Foxpro</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::Foxpro
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::Memo::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::Memo::Base (class)">Base</a></span></li>
78
+
79
+ <li class="next">DBF::Memo::Foxpro</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/memo/foxpro.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+ <h2>
107
+ Constant Summary
108
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
109
+ </h2>
110
+
111
+ <dl class="constants">
112
+
113
+ <dt id="FPT_HEADER_SIZE-constant" class="">FPT_HEADER_SIZE =
114
+
115
+ </dt>
116
+ <dd><pre class="code"><span class='int'>512</span></pre></dd>
117
+
118
+ </dl>
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <h3 class="inherited">Constants inherited
126
+ from <span class='object_link'><a href="Base.html" title="DBF::Memo::Base (class)">Base</a></span></h3>
127
+ <p class="inherited"><span class='object_link'><a href="Base.html#BLOCK_HEADER_SIZE-constant" title="DBF::Memo::Base::BLOCK_HEADER_SIZE (constant)">Base::BLOCK_HEADER_SIZE</a></span>, <span class='object_link'><a href="Base.html#BLOCK_SIZE-constant" title="DBF::Memo::Base::BLOCK_SIZE (constant)">Base::BLOCK_SIZE</a></span></p>
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <h2>
135
+ Instance Method Summary
136
+ <small><a href="#" class="summary_toggle">collapse</a></small>
137
+ </h2>
138
+
139
+ <ul class="summary">
140
+
141
+ <li class="public ">
142
+ <span class="summary_signature">
143
+
144
+ <a href="#build_memo-instance_method" title="#build_memo (instance method)">#<strong>build_memo</strong>(start_block) &#x21d2; Object </a>
145
+
146
+
147
+
148
+ </span>
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'>
159
+ <p>:nodoc:.</p>
160
+ </div></span>
161
+
162
+ </li>
163
+
164
+
165
+ </ul>
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="DBF::Memo::Base (class)">Base</a></span></h3>
178
+ <p class="inherited"><span class='object_link'><a href="Base.html#close-instance_method" title="DBF::Memo::Base#close (method)">#close</a></span>, <span class='object_link'><a href="Base.html#closed%3F-instance_method" title="DBF::Memo::Base#closed? (method)">#closed?</a></span>, <span class='object_link'><a href="Base.html#get-instance_method" title="DBF::Memo::Base#get (method)">#get</a></span>, <span class='object_link'><a href="Base.html#initialize-instance_method" title="DBF::Memo::Base#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Base.html#open-class_method" title="DBF::Memo::Base.open (method)">open</a></span></p>
179
+ <div id="constructor_details" class="method_details_list">
180
+ <h2>Constructor Details</h2>
181
+
182
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Base.html#initialize-instance_method" title="DBF::Memo::Base#initialize (method)">DBF::Memo::Base</a></span></p>
183
+
184
+ </div>
185
+
186
+
187
+ <div id="instance_method_details" class="method_details_list">
188
+ <h2>Instance Method Details</h2>
189
+
190
+
191
+ <div class="method_details first">
192
+ <h3 class="signature first" id="build_memo-instance_method">
193
+
194
+ #<strong>build_memo</strong>(start_block) &#x21d2; <tt>Object</tt>
195
+
196
+
197
+
198
+
199
+
200
+ </h3><div class="docstring">
201
+ <div class="discussion">
202
+
203
+ <p>:nodoc:</p>
204
+
205
+
206
+ </div>
207
+ </div>
208
+ <div class="tags">
209
+
210
+
211
+ </div><table class="source_code">
212
+ <tr>
213
+ <td>
214
+ <pre class="lines">
215
+
216
+
217
+ 6
218
+ 7
219
+ 8
220
+ 9
221
+ 10
222
+ 11
223
+ 12
224
+ 13
225
+ 14
226
+ 15
227
+ 16
228
+ 17
229
+ 18
230
+ 19
231
+ 20</pre>
232
+ </td>
233
+ <td>
234
+ <pre class="code"><span class="info file"># File 'lib/dbf/memo/foxpro.rb', line 6</span>
235
+
236
+ <span class='kw'>def</span> <span class='id identifier rubyid_build_memo'>build_memo</span><span class='lparen'>(</span><span class='id identifier rubyid_start_block'>start_block</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
237
+ </span> <span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_seek'>seek</span> <span class='id identifier rubyid_offset'>offset</span><span class='lparen'>(</span><span class='id identifier rubyid_start_block'>start_block</span><span class='rparen'>)</span>
238
+
239
+ <span class='id identifier rubyid_memo_type'>memo_type</span><span class='comma'>,</span> <span class='id identifier rubyid_memo_size'>memo_size</span><span class='comma'>,</span> <span class='id identifier rubyid_memo_string'>memo_string</span> <span class='op'>=</span> <span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_block_size'>block_size</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_unpack'>unpack</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>NNa*</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
240
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_memo_type'>memo_type</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_memo_size'>memo_size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
241
+
242
+ <span class='kw'>if</span> <span class='id identifier rubyid_memo_size'>memo_size</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_block_content_size'>block_content_size</span>
243
+ <span class='id identifier rubyid_memo_string'>memo_string</span> <span class='op'>&lt;&lt;</span> <span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_content_size'>content_size</span><span class='lparen'>(</span><span class='id identifier rubyid_memo_size'>memo_size</span><span class='rparen'>)</span><span class='rparen'>)</span>
244
+ <span class='kw'>else</span>
245
+ <span class='id identifier rubyid_memo_string'>memo_string</span> <span class='op'>=</span> <span class='id identifier rubyid_memo_string'>memo_string</span><span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_memo_size'>memo_size</span><span class='rbracket'>]</span>
246
+ <span class='kw'>end</span>
247
+ <span class='id identifier rubyid_memo_string'>memo_string</span>
248
+ <span class='kw'>rescue</span> <span class='const'>StandardError</span>
249
+ <span class='kw'>nil</span>
250
+ <span class='kw'>end</span></pre>
251
+ </td>
252
+ </tr>
253
+ </table>
254
+ </div>
255
+
256
+ </div>
257
+
258
+ </div>
259
+
260
+ <div id="footer">
261
+ Generated on Sun Aug 8 16:19:08 2021 by
262
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
263
+ 0.9.26 (ruby-3.0.1).
264
+ </div>
265
+
266
+ </div>
267
+ </body>
268
+ </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::NoColumnsDefined
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::NoColumnsDefined";
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>
41
+ &raquo;
42
+ <span class="title">NoColumnsDefined</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::NoColumnsDefined
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::NoColumnsDefined</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>
@@ -0,0 +1,773 @@
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::Record
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::Record";
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 (R)</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">Record</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::Record
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::Record</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/record.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>An instance of DBF::Record represents a row in the DBF file</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <h2>
122
+ Instance Method Summary
123
+ <small><a href="#" class="summary_toggle">collapse</a></small>
124
+ </h2>
125
+
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#==-instance_method" title="#== (instance method)">#<strong>==</strong>(other) &#x21d2; Boolean </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'>
146
+ <p>Equality.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#[]-instance_method" title="#[] (instance method)">#<strong>[]</strong>(name) &#x21d2; Object </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'>
170
+ <p>Reads attributes by column name.</p>
171
+ </div></span>
172
+
173
+ </li>
174
+
175
+
176
+ <li class="public ">
177
+ <span class="summary_signature">
178
+
179
+ <a href="#attributes-instance_method" title="#attributes (instance method)">#<strong>attributes</strong> &#x21d2; Hash </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+ <span class="summary_desc"><div class='inline'>
194
+ <p>Record attributes.</p>
195
+ </div></span>
196
+
197
+ </li>
198
+
199
+
200
+ <li class="public ">
201
+ <span class="summary_signature">
202
+
203
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(data, columns, version, memo) &#x21d2; Record </a>
204
+
205
+
206
+
207
+ </span>
208
+
209
+
210
+ <span class="note title constructor">constructor</span>
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+ <span class="summary_desc"><div class='inline'>
220
+ <p>Initialize a new DBF::Record.</p>
221
+ </div></span>
222
+
223
+ </li>
224
+
225
+
226
+ <li class="public ">
227
+ <span class="summary_signature">
228
+
229
+ <a href="#match%3F-instance_method" title="#match? (instance method)">#<strong>match?</strong>(options) &#x21d2; Boolean </a>
230
+
231
+
232
+
233
+ </span>
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+ <span class="summary_desc"><div class='inline'>
244
+ <p>Do all search parameters match?.</p>
245
+ </div></span>
246
+
247
+ </li>
248
+
249
+
250
+ <li class="public ">
251
+ <span class="summary_signature">
252
+
253
+ <a href="#to_a-instance_method" title="#to_a (instance method)">#<strong>to_a</strong> &#x21d2; Array </a>
254
+
255
+
256
+
257
+ </span>
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+ <span class="summary_desc"><div class='inline'>
268
+ <p>Maps a row to an array of values.</p>
269
+ </div></span>
270
+
271
+ </li>
272
+
273
+
274
+ </ul>
275
+
276
+
277
+ <div id="constructor_details" class="method_details_list">
278
+ <h2>Constructor Details</h2>
279
+
280
+ <div class="method_details first">
281
+ <h3 class="signature first" id="initialize-instance_method">
282
+
283
+ #<strong>initialize</strong>(data, columns, version, memo) &#x21d2; <tt><span class='object_link'><a href="" title="DBF::Record (class)">Record</a></span></tt>
284
+
285
+
286
+
287
+
288
+
289
+ </h3><div class="docstring">
290
+ <div class="discussion">
291
+
292
+ <p>Initialize a new DBF::Record</p>
293
+
294
+
295
+ </div>
296
+ </div>
297
+ <div class="tags">
298
+ <p class="tag_title">Parameters:</p>
299
+ <ul class="param">
300
+
301
+ <li>
302
+
303
+ <span class='name'>data</span>
304
+
305
+
306
+ <span class='type'>(<tt>String</tt>, <tt>StringIO</tt>)</span>
307
+
308
+
309
+
310
+ &mdash;
311
+ <div class='inline'>
312
+ <p>data</p>
313
+ </div>
314
+
315
+ </li>
316
+
317
+ <li>
318
+
319
+ <span class='name'>columns</span>
320
+
321
+
322
+ <span class='type'>(<tt><span class='object_link'><a href="Column.html" title="DBF::Column (class)">Column</a></span></tt>)</span>
323
+
324
+
325
+
326
+ </li>
327
+
328
+ <li>
329
+
330
+ <span class='name'>version</span>
331
+
332
+
333
+ <span class='type'>(<tt>String</tt>)</span>
334
+
335
+
336
+
337
+ </li>
338
+
339
+ <li>
340
+
341
+ <span class='name'>memo</span>
342
+
343
+
344
+ <span class='type'>(<tt><span class='object_link'><a href="Memo.html" title="DBF::Memo (module)">DBF::Memo</a></span></tt>)</span>
345
+
346
+
347
+
348
+ </li>
349
+
350
+ </ul>
351
+
352
+
353
+ </div><table class="source_code">
354
+ <tr>
355
+ <td>
356
+ <pre class="lines">
357
+
358
+
359
+ 10
360
+ 11
361
+ 12
362
+ 13
363
+ 14
364
+ 15</pre>
365
+ </td>
366
+ <td>
367
+ <pre class="code"><span class="info file"># File 'lib/dbf/record.rb', line 10</span>
368
+
369
+ <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_columns'>columns</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='comma'>,</span> <span class='id identifier rubyid_memo'>memo</span><span class='rparen'>)</span>
370
+ <span class='ivar'>@data</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
371
+ <span class='ivar'>@columns</span> <span class='op'>=</span> <span class='id identifier rubyid_columns'>columns</span>
372
+ <span class='ivar'>@version</span> <span class='op'>=</span> <span class='id identifier rubyid_version'>version</span>
373
+ <span class='ivar'>@memo</span> <span class='op'>=</span> <span class='id identifier rubyid_memo'>memo</span>
374
+ <span class='kw'>end</span></pre>
375
+ </td>
376
+ </tr>
377
+ </table>
378
+ </div>
379
+
380
+ </div>
381
+ <div id="method_missing_details" class="method_details_list">
382
+ <h2>Dynamic Method Handling</h2>
383
+ <p class="notice this">
384
+ This class handles dynamic methods through the <tt>method_missing</tt> method
385
+
386
+ </p>
387
+
388
+ <div class="method_details first">
389
+ <h3 class="signature first" id="method_missing-instance_method">
390
+
391
+ #<strong>method_missing</strong>(method, *args) &#x21d2; <tt>Object</tt> <span class="extras">(private)</span>
392
+
393
+
394
+
395
+
396
+
397
+ </h3><div class="docstring">
398
+ <div class="discussion">
399
+
400
+ <p>:nodoc:</p>
401
+
402
+
403
+ </div>
404
+ </div>
405
+ <div class="tags">
406
+
407
+
408
+ </div><table class="source_code">
409
+ <tr>
410
+ <td>
411
+ <pre class="lines">
412
+
413
+
414
+ 90
415
+ 91
416
+ 92
417
+ 93
418
+ 94
419
+ 95
420
+ 96</pre>
421
+ </td>
422
+ <td>
423
+ <pre class="code"><span class="info file"># File 'lib/dbf/record.rb', line 90</span>
424
+
425
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
426
+ </span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='id identifier rubyid_underscored_column_names'>underscored_column_names</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span><span class='rparen'>)</span>
427
+ <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='ivar'>@columns</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span>
428
+ <span class='kw'>else</span>
429
+ <span class='kw'>super</span>
430
+ <span class='kw'>end</span>
431
+ <span class='kw'>end</span></pre>
432
+ </td>
433
+ </tr>
434
+ </table>
435
+ </div>
436
+
437
+ </div>
438
+
439
+
440
+ <div id="instance_method_details" class="method_details_list">
441
+ <h2>Instance Method Details</h2>
442
+
443
+
444
+ <div class="method_details first">
445
+ <h3 class="signature first" id="==-instance_method">
446
+
447
+ #<strong>==</strong>(other) &#x21d2; <tt>Boolean</tt>
448
+
449
+
450
+
451
+
452
+
453
+ </h3><div class="docstring">
454
+ <div class="discussion">
455
+
456
+ <p>Equality</p>
457
+
458
+
459
+ </div>
460
+ </div>
461
+ <div class="tags">
462
+ <p class="tag_title">Parameters:</p>
463
+ <ul class="param">
464
+
465
+ <li>
466
+
467
+ <span class='name'>other</span>
468
+
469
+
470
+ <span class='type'>(<tt><span class='object_link'><a href="" title="DBF::Record (class)">DBF::Record</a></span></tt>)</span>
471
+
472
+
473
+
474
+ </li>
475
+
476
+ </ul>
477
+
478
+ <p class="tag_title">Returns:</p>
479
+ <ul class="return">
480
+
481
+ <li>
482
+
483
+
484
+ <span class='type'>(<tt>Boolean</tt>)</span>
485
+
486
+
487
+
488
+ </li>
489
+
490
+ </ul>
491
+
492
+ </div><table class="source_code">
493
+ <tr>
494
+ <td>
495
+ <pre class="lines">
496
+
497
+
498
+ 21
499
+ 22
500
+ 23</pre>
501
+ </td>
502
+ <td>
503
+ <pre class="code"><span class="info file"># File 'lib/dbf/record.rb', line 21</span>
504
+
505
+ <span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
506
+ <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:attributes</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>==</span> <span class='id identifier rubyid_attributes'>attributes</span>
507
+ <span class='kw'>end</span></pre>
508
+ </td>
509
+ </tr>
510
+ </table>
511
+ </div>
512
+
513
+ <div class="method_details ">
514
+ <h3 class="signature " id="[]-instance_method">
515
+
516
+ #<strong>[]</strong>(name) &#x21d2; <tt>Object</tt>
517
+
518
+
519
+
520
+
521
+
522
+ </h3><div class="docstring">
523
+ <div class="discussion">
524
+
525
+ <p>Reads attributes by column name</p>
526
+
527
+
528
+ </div>
529
+ </div>
530
+ <div class="tags">
531
+ <p class="tag_title">Parameters:</p>
532
+ <ul class="param">
533
+
534
+ <li>
535
+
536
+ <span class='name'>name</span>
537
+
538
+
539
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
540
+
541
+
542
+
543
+ &mdash;
544
+ <div class='inline'>
545
+ <p>key</p>
546
+ </div>
547
+
548
+ </li>
549
+
550
+ </ul>
551
+
552
+
553
+ </div><table class="source_code">
554
+ <tr>
555
+ <td>
556
+ <pre class="lines">
557
+
558
+
559
+ 28
560
+ 29
561
+ 30
562
+ 31
563
+ 32
564
+ 33
565
+ 34
566
+ 35</pre>
567
+ </td>
568
+ <td>
569
+ <pre class="code"><span class="info file"># File 'lib/dbf/record.rb', line 28</span>
570
+
571
+ <span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
572
+ <span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
573
+ <span class='kw'>if</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
574
+ <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
575
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='id identifier rubyid_underscored_column_names'>underscored_column_names</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
576
+ <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='ivar'>@columns</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span>
577
+ <span class='kw'>end</span>
578
+ <span class='kw'>end</span></pre>
579
+ </td>
580
+ </tr>
581
+ </table>
582
+ </div>
583
+
584
+ <div class="method_details ">
585
+ <h3 class="signature " id="attributes-instance_method">
586
+
587
+ #<strong>attributes</strong> &#x21d2; <tt>Hash</tt>
588
+
589
+
590
+
591
+
592
+
593
+ </h3><div class="docstring">
594
+ <div class="discussion">
595
+
596
+ <p>Record attributes</p>
597
+
598
+
599
+ </div>
600
+ </div>
601
+ <div class="tags">
602
+
603
+ <p class="tag_title">Returns:</p>
604
+ <ul class="return">
605
+
606
+ <li>
607
+
608
+
609
+ <span class='type'>(<tt>Hash</tt>)</span>
610
+
611
+
612
+
613
+ </li>
614
+
615
+ </ul>
616
+
617
+ </div><table class="source_code">
618
+ <tr>
619
+ <td>
620
+ <pre class="lines">
621
+
622
+
623
+ 40
624
+ 41
625
+ 42</pre>
626
+ </td>
627
+ <td>
628
+ <pre class="code"><span class="info file"># File 'lib/dbf/record.rb', line 40</span>
629
+
630
+ <span class='kw'>def</span> <span class='id identifier rubyid_attributes'>attributes</span>
631
+ <span class='ivar'>@attributes</span> <span class='op'>||=</span> <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_attribute_map'>attribute_map</span><span class='rbracket'>]</span>
632
+ <span class='kw'>end</span></pre>
633
+ </td>
634
+ </tr>
635
+ </table>
636
+ </div>
637
+
638
+ <div class="method_details ">
639
+ <h3 class="signature " id="match?-instance_method">
640
+
641
+ #<strong>match?</strong>(options) &#x21d2; <tt>Boolean</tt>
642
+
643
+
644
+
645
+
646
+
647
+ </h3><div class="docstring">
648
+ <div class="discussion">
649
+
650
+ <p>Do all search parameters match?</p>
651
+
652
+
653
+ </div>
654
+ </div>
655
+ <div class="tags">
656
+ <p class="tag_title">Parameters:</p>
657
+ <ul class="param">
658
+
659
+ <li>
660
+
661
+ <span class='name'>options</span>
662
+
663
+
664
+ <span class='type'>(<tt>Hash</tt>)</span>
665
+
666
+
667
+
668
+ </li>
669
+
670
+ </ul>
671
+
672
+ <p class="tag_title">Returns:</p>
673
+ <ul class="return">
674
+
675
+ <li>
676
+
677
+
678
+ <span class='type'>(<tt>Boolean</tt>)</span>
679
+
680
+
681
+
682
+ </li>
683
+
684
+ </ul>
685
+
686
+ </div><table class="source_code">
687
+ <tr>
688
+ <td>
689
+ <pre class="lines">
690
+
691
+
692
+ 48
693
+ 49
694
+ 50</pre>
695
+ </td>
696
+ <td>
697
+ <pre class="code"><span class="info file"># File 'lib/dbf/record.rb', line 48</span>
698
+
699
+ <span class='kw'>def</span> <span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
700
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_value'>value</span> <span class='rbrace'>}</span>
701
+ <span class='kw'>end</span></pre>
702
+ </td>
703
+ </tr>
704
+ </table>
705
+ </div>
706
+
707
+ <div class="method_details ">
708
+ <h3 class="signature " id="to_a-instance_method">
709
+
710
+ #<strong>to_a</strong> &#x21d2; <tt>Array</tt>
711
+
712
+
713
+
714
+
715
+
716
+ </h3><div class="docstring">
717
+ <div class="discussion">
718
+
719
+ <p>Maps a row to an array of values</p>
720
+
721
+
722
+ </div>
723
+ </div>
724
+ <div class="tags">
725
+
726
+ <p class="tag_title">Returns:</p>
727
+ <ul class="return">
728
+
729
+ <li>
730
+
731
+
732
+ <span class='type'>(<tt>Array</tt>)</span>
733
+
734
+
735
+
736
+ </li>
737
+
738
+ </ul>
739
+
740
+ </div><table class="source_code">
741
+ <tr>
742
+ <td>
743
+ <pre class="lines">
744
+
745
+
746
+ 55
747
+ 56
748
+ 57</pre>
749
+ </td>
750
+ <td>
751
+ <pre class="code"><span class="info file"># File 'lib/dbf/record.rb', line 55</span>
752
+
753
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_a'>to_a</span>
754
+ <span class='ivar'>@columns</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_column'>column</span><span class='op'>|</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_column'>column</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
755
+ <span class='kw'>end</span></pre>
756
+ </td>
757
+ </tr>
758
+ </table>
759
+ </div>
760
+
761
+ </div>
762
+
763
+ </div>
764
+
765
+ <div id="footer">
766
+ Generated on Sun Aug 8 16:19:08 2021 by
767
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
768
+ 0.9.26 (ruby-3.0.1).
769
+ </div>
770
+
771
+ </div>
772
+ </body>
773
+ </html>