X12 0.0.5 → 0.1.0
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.
- data/CHANGELOG +6 -1
- data/Rakefile +14 -3
- data/example/parse.rb +1 -0
- data/lib/X12.rb +2 -2
- data/lib/X12/Base.rb +5 -1
- data/lib/X12/Field.rb +18 -14
- data/lib/X12/Loop.rb +10 -6
- data/lib/X12/Parser.rb +31 -5
- data/lib/X12/Segment.rb +15 -2
- data/misc/997.d12 +8 -775
- data/misc/IEA.d12 +10 -0
- data/misc/ISA.d12 +24 -0
- data/misc/SE.d12 +12 -0
- data/misc/ST.d12 +7 -0
- data/misc/Tbl143.d12 +302 -0
- data/misc/Tbl479.d12 +238 -0
- data/misc/Tbl715.d12 +11 -0
- data/misc/Tbl716.d12 +27 -0
- data/misc/Tbl717.d12 +10 -0
- data/misc/Tbl718.d12 +29 -0
- data/misc/Tbl720.d12 +12 -0
- data/misc/Tbl723.d12 +14 -0
- data/misc/TblI01.d12 +11 -0
- data/misc/TblI03.d12 +6 -0
- data/misc/TblI05.d12 +42 -0
- data/misc/TblI10.d12 +5 -0
- data/misc/TblI11.d12 +18 -0
- data/misc/TblI13.d12 +6 -0
- data/misc/TblI14.d12 +7 -0
- data/test/tc_factory_997.rb +6 -6
- data/test/tc_parse_997.rb +4 -4
- metadata +23 -37
- data/doc/classes/X12.html +0 -174
- data/doc/classes/X12/Base.html +0 -677
- data/doc/classes/X12/Composite.html +0 -156
- data/doc/classes/X12/Empty.html +0 -186
- data/doc/classes/X12/Field.html +0 -339
- data/doc/classes/X12/Loop.html +0 -202
- data/doc/classes/X12/Parser.html +0 -306
- data/doc/classes/X12/Segment.html +0 -277
- data/doc/classes/X12/Table.html +0 -198
- data/doc/created.rid +0 -1
- data/doc/files/CHANGELOG.html +0 -108
- data/doc/files/README.html +0 -474
- data/doc/files/TODO.html +0 -95
- data/doc/files/lib/X12/Base_rb.html +0 -83
- data/doc/files/lib/X12/Composite_rb.html +0 -83
- data/doc/files/lib/X12/Empty_rb.html +0 -83
- data/doc/files/lib/X12/Field_rb.html +0 -83
- data/doc/files/lib/X12/Loop_rb.html +0 -83
- data/doc/files/lib/X12/Parser_rb.html +0 -83
- data/doc/files/lib/X12/Segment_rb.html +0 -83
- data/doc/files/lib/X12/Table_rb.html +0 -83
- data/doc/files/lib/X12_rb.html +0 -100
- data/doc/fr_class_index.html +0 -35
- data/doc/fr_file_index.html +0 -38
- data/doc/fr_method_index.html +0 -62
- data/doc/index.html +0 -27
- data/doc/rdoc-style.css +0 -208
- data/test/ts_x12.rb +0 -27
@@ -1,277 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: X12::Segment</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">X12::Segment</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/X12/Segment_rb.html">
|
59
|
-
lib/X12/Segment.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="Base.html">
|
69
|
-
Base
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
<div id="description">
|
84
|
-
<p>
|
85
|
-
$Id: Segment.rb 35 2008-11-13 18:33:44Z ikk $
|
86
|
-
</p>
|
87
|
-
<p>
|
88
|
-
Implements a segment containing fields or composites
|
89
|
-
</p>
|
90
|
-
|
91
|
-
</div>
|
92
|
-
|
93
|
-
|
94
|
-
</div>
|
95
|
-
|
96
|
-
<div id="method-list">
|
97
|
-
<h3 class="section-bar">Methods</h3>
|
98
|
-
|
99
|
-
<div class="name-list">
|
100
|
-
<a href="#M000004">find_field</a>
|
101
|
-
<a href="#M000001">parse</a>
|
102
|
-
<a href="#M000003">regexp</a>
|
103
|
-
<a href="#M000002">render</a>
|
104
|
-
</div>
|
105
|
-
</div>
|
106
|
-
|
107
|
-
</div>
|
108
|
-
|
109
|
-
|
110
|
-
<!-- if includes -->
|
111
|
-
|
112
|
-
<div id="section">
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
<!-- if method_list -->
|
122
|
-
<div id="methods">
|
123
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
124
|
-
|
125
|
-
<div id="method-M000004" class="method-detail">
|
126
|
-
<a name="M000004"></a>
|
127
|
-
|
128
|
-
<div class="method-heading">
|
129
|
-
<a href="#M000004" class="method-signature">
|
130
|
-
<span class="method-name">find_field</span><span class="method-args">(str)</span>
|
131
|
-
</a>
|
132
|
-
</div>
|
133
|
-
|
134
|
-
<div class="method-description">
|
135
|
-
<p>
|
136
|
-
Finds a field in the segment. Returns EMPTY if not found.
|
137
|
-
</p>
|
138
|
-
<p><a class="source-toggle" href="#"
|
139
|
-
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
140
|
-
<div class="method-source-code" id="M000004-source">
|
141
|
-
<pre>
|
142
|
-
<span class="ruby-comment cmt"># File lib/X12/Segment.rb, line 72</span>
|
143
|
-
72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_field</span>(<span class="ruby-identifier">str</span>)
|
144
|
-
73: <span class="ruby-comment cmt">#puts "Finding field [#{str}] in #{self.class} #{name}"</span>
|
145
|
-
74: <span class="ruby-comment cmt"># If there is such a field to begin with</span>
|
146
|
-
75: <span class="ruby-identifier">field_num</span> = <span class="ruby-keyword kw">nil</span>
|
147
|
-
76: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">each_index</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
148
|
-
77: <span class="ruby-identifier">field_num</span> = <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nodes</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">name</span>
|
149
|
-
78: }
|
150
|
-
79: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">EMPTY</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">field_num</span>.<span class="ruby-identifier">nil?</span>
|
151
|
-
80: <span class="ruby-comment cmt">#puts field_num</span>
|
152
|
-
81:
|
153
|
-
82: <span class="ruby-comment cmt"># Parse the segment if not parsed already</span>
|
154
|
-
83: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@fields</span>
|
155
|
-
84: <span class="ruby-ivar">@fields</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">chop</span>.<span class="ruby-identifier">split</span>(<span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-identifier">field_separator</span>)))
|
156
|
-
85: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">each_index</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nodes</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">content</span> = <span class="ruby-ivar">@fields</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>] }
|
157
|
-
86: <span class="ruby-keyword kw">end</span>
|
158
|
-
87: <span class="ruby-comment cmt">#puts self.nodes[field_num].inspect</span>
|
159
|
-
88: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nodes</span>[<span class="ruby-identifier">field_num</span>]
|
160
|
-
89: <span class="ruby-keyword kw">end</span>
|
161
|
-
</pre>
|
162
|
-
</div>
|
163
|
-
</div>
|
164
|
-
</div>
|
165
|
-
|
166
|
-
<div id="method-M000001" class="method-detail">
|
167
|
-
<a name="M000001"></a>
|
168
|
-
|
169
|
-
<div class="method-heading">
|
170
|
-
<a href="#M000001" class="method-signature">
|
171
|
-
<span class="method-name">parse</span><span class="method-args">(str)</span>
|
172
|
-
</a>
|
173
|
-
</div>
|
174
|
-
|
175
|
-
<div class="method-description">
|
176
|
-
<p>
|
177
|
-
Parses this segment out of a string, puts the match into value, returns the
|
178
|
-
rest of the string - nil if cannot <a href="Segment.html#M000001">parse</a>
|
179
|
-
</p>
|
180
|
-
<p><a class="source-toggle" href="#"
|
181
|
-
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
182
|
-
<div class="method-source-code" id="M000001-source">
|
183
|
-
<pre>
|
184
|
-
<span class="ruby-comment cmt"># File lib/X12/Segment.rb, line 34</span>
|
185
|
-
34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">str</span>)
|
186
|
-
35: <span class="ruby-identifier">s</span> = <span class="ruby-identifier">str</span>
|
187
|
-
36: <span class="ruby-comment cmt">#puts "Parsing segment #{name} from #{s} with regexp [#{regexp.source}]"</span>
|
188
|
-
37: <span class="ruby-identifier">m</span> = <span class="ruby-identifier">regexp</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">s</span>)
|
189
|
-
38: <span class="ruby-comment cmt">#puts "Matched #{m ? m[0] : 'nothing'}"</span>
|
190
|
-
39:
|
191
|
-
40: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">m</span>
|
192
|
-
41:
|
193
|
-
42: <span class="ruby-identifier">s</span> = <span class="ruby-identifier">m</span>.<span class="ruby-identifier">post_match</span>
|
194
|
-
43: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">parsed_str</span> = <span class="ruby-identifier">m</span>[<span class="ruby-value">0</span>]
|
195
|
-
44: <span class="ruby-identifier">s</span> = <span class="ruby-identifier">do_repeats</span>(<span class="ruby-identifier">s</span>)
|
196
|
-
45:
|
197
|
-
46: <span class="ruby-comment cmt">#puts "Parsed segment "+self.inspect</span>
|
198
|
-
47: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span>
|
199
|
-
48: <span class="ruby-keyword kw">end</span>
|
200
|
-
</pre>
|
201
|
-
</div>
|
202
|
-
</div>
|
203
|
-
</div>
|
204
|
-
|
205
|
-
<div id="method-M000003" class="method-detail">
|
206
|
-
<a name="M000003"></a>
|
207
|
-
|
208
|
-
<div class="method-heading">
|
209
|
-
<a href="#M000003" class="method-signature">
|
210
|
-
<span class="method-name">regexp</span><span class="method-args">()</span>
|
211
|
-
</a>
|
212
|
-
</div>
|
213
|
-
|
214
|
-
<div class="method-description">
|
215
|
-
<p>
|
216
|
-
Returns a <a href="Segment.html#M000003">regexp</a> that matches this
|
217
|
-
particular segment
|
218
|
-
</p>
|
219
|
-
<p><a class="source-toggle" href="#"
|
220
|
-
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
221
|
-
<div class="method-source-code" id="M000003-source">
|
222
|
-
<pre>
|
223
|
-
<span class="ruby-comment cmt"># File lib/X12/Segment.rb, line 67</span>
|
224
|
-
67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">regexp</span>
|
225
|
-
68: <span class="ruby-ivar">@regexp</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"^#{name}#{Regexp.escape(field_separator)}[^#{Regexp.escape(segment_separator)}]*#{Regexp.escape(segment_separator)}"</span>)
|
226
|
-
69: <span class="ruby-keyword kw">end</span>
|
227
|
-
</pre>
|
228
|
-
</div>
|
229
|
-
</div>
|
230
|
-
</div>
|
231
|
-
|
232
|
-
<div id="method-M000002" class="method-detail">
|
233
|
-
<a name="M000002"></a>
|
234
|
-
|
235
|
-
<div class="method-heading">
|
236
|
-
<a href="#M000002" class="method-signature">
|
237
|
-
<span class="method-name">render</span><span class="method-args">()</span>
|
238
|
-
</a>
|
239
|
-
</div>
|
240
|
-
|
241
|
-
<div class="method-description">
|
242
|
-
<p>
|
243
|
-
Render all components of this segment as string suitable for EDI
|
244
|
-
</p>
|
245
|
-
<p><a class="source-toggle" href="#"
|
246
|
-
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
247
|
-
<div class="method-source-code" id="M000002-source">
|
248
|
-
<pre>
|
249
|
-
<span class="ruby-comment cmt"># File lib/X12/Segment.rb, line 51</span>
|
250
|
-
51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
|
251
|
-
52: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value str">''</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">repeat_str</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
252
|
-
53: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">repeats</span>.<span class="ruby-identifier">begin</span> <span class="ruby-operator"><</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">and</span> <span class="ruby-operator">!</span><span class="ruby-identifier">i</span>.<span class="ruby-identifier">has_content?</span>
|
253
|
-
54: <span class="ruby-comment cmt"># Skip optional empty segments</span>
|
254
|
-
55: <span class="ruby-identifier">repeat_str</span>
|
255
|
-
56: <span class="ruby-keyword kw">else</span>
|
256
|
-
57: <span class="ruby-comment cmt"># Have to render no matter how empty</span>
|
257
|
-
58: <span class="ruby-identifier">repeat_str</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">name</span><span class="ruby-operator">+</span><span class="ruby-identifier">i</span>.<span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value str">''</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">nodes_str</span>, <span class="ruby-identifier">j</span><span class="ruby-operator">|</span>
|
258
|
-
59: <span class="ruby-identifier">field</span> = <span class="ruby-identifier">j</span>.<span class="ruby-identifier">render</span>
|
259
|
-
60: (<span class="ruby-identifier">j</span>.<span class="ruby-identifier">required</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">nodes_str</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">''</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">field</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">''</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">field_separator</span><span class="ruby-operator">+</span><span class="ruby-identifier">field</span><span class="ruby-operator">+</span><span class="ruby-identifier">nodes_str</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">nodes_str</span>
|
260
|
-
61: } <span class="ruby-operator">+</span> <span class="ruby-identifier">segment_separator</span>
|
261
|
-
62: <span class="ruby-keyword kw">end</span>
|
262
|
-
63: }
|
263
|
-
64: <span class="ruby-keyword kw">end</span>
|
264
|
-
</pre>
|
265
|
-
</div>
|
266
|
-
</div>
|
267
|
-
</div>
|
268
|
-
|
269
|
-
|
270
|
-
</div>
|
271
|
-
|
272
|
-
|
273
|
-
</div>
|
274
|
-
|
275
|
-
|
276
|
-
</body>
|
277
|
-
</html>
|
data/doc/classes/X12/Table.html
DELETED
@@ -1,198 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: X12::Table</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">X12::Table</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/X12/Table_rb.html">
|
59
|
-
lib/X12/Table.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Hash
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
<div id="description">
|
82
|
-
<p>
|
83
|
-
$Id: Table.rb 35 2008-11-13 18:33:44Z ikk $
|
84
|
-
</p>
|
85
|
-
<p>
|
86
|
-
This just a named hash to store validation tables.
|
87
|
-
</p>
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
<div id="method-list">
|
95
|
-
<h3 class="section-bar">Methods</h3>
|
96
|
-
|
97
|
-
<div class="name-list">
|
98
|
-
<a href="#M000013">inspect</a>
|
99
|
-
<a href="#M000012">new</a>
|
100
|
-
</div>
|
101
|
-
</div>
|
102
|
-
|
103
|
-
</div>
|
104
|
-
|
105
|
-
|
106
|
-
<!-- if includes -->
|
107
|
-
|
108
|
-
<div id="section">
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
<div id="attribute-list">
|
115
|
-
<h3 class="section-bar">Attributes</h3>
|
116
|
-
|
117
|
-
<div class="name-list">
|
118
|
-
<table>
|
119
|
-
<tr class="top-aligned-row context-row">
|
120
|
-
<td class="context-item-name">name</td>
|
121
|
-
<td class="context-item-value"> [R] </td>
|
122
|
-
<td class="context-item-desc"></td>
|
123
|
-
</tr>
|
124
|
-
</table>
|
125
|
-
</div>
|
126
|
-
</div>
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<!-- if method_list -->
|
131
|
-
<div id="methods">
|
132
|
-
<h3 class="section-bar">Public Class methods</h3>
|
133
|
-
|
134
|
-
<div id="method-M000012" class="method-detail">
|
135
|
-
<a name="M000012"></a>
|
136
|
-
|
137
|
-
<div class="method-heading">
|
138
|
-
<a href="#M000012" class="method-signature">
|
139
|
-
<span class="method-name">new</span><span class="method-args">(name, name_values)</span>
|
140
|
-
</a>
|
141
|
-
</div>
|
142
|
-
|
143
|
-
<div class="method-description">
|
144
|
-
<p>
|
145
|
-
Create a <a href="Table.html#M000012">new</a> table with given name and
|
146
|
-
hash content.
|
147
|
-
</p>
|
148
|
-
<p><a class="source-toggle" href="#"
|
149
|
-
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
150
|
-
<div class="method-source-code" id="M000012-source">
|
151
|
-
<pre>
|
152
|
-
<span class="ruby-comment cmt"># File lib/X12/Table.rb, line 34</span>
|
153
|
-
34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">name_values</span>)
|
154
|
-
35: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
155
|
-
36: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">name_values</span>)
|
156
|
-
37: <span class="ruby-keyword kw">end</span>
|
157
|
-
</pre>
|
158
|
-
</div>
|
159
|
-
</div>
|
160
|
-
</div>
|
161
|
-
|
162
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
163
|
-
|
164
|
-
<div id="method-M000013" class="method-detail">
|
165
|
-
<a name="M000013"></a>
|
166
|
-
|
167
|
-
<div class="method-heading">
|
168
|
-
<a href="#M000013" class="method-signature">
|
169
|
-
<span class="method-name">inspect</span><span class="method-args">()</span>
|
170
|
-
</a>
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<div class="method-description">
|
174
|
-
<p>
|
175
|
-
Return a printable string representing this table
|
176
|
-
</p>
|
177
|
-
<p><a class="source-toggle" href="#"
|
178
|
-
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
179
|
-
<div class="method-source-code" id="M000013-source">
|
180
|
-
<pre>
|
181
|
-
<span class="ruby-comment cmt"># File lib/X12/Table.rb, line 40</span>
|
182
|
-
40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
183
|
-
41: <span class="ruby-node">"Table #{name} -- #{super.inspect}"</span>
|
184
|
-
42: <span class="ruby-keyword kw">end</span>
|
185
|
-
</pre>
|
186
|
-
</div>
|
187
|
-
</div>
|
188
|
-
</div>
|
189
|
-
|
190
|
-
|
191
|
-
</div>
|
192
|
-
|
193
|
-
|
194
|
-
</div>
|
195
|
-
|
196
|
-
|
197
|
-
</body>
|
198
|
-
</html>
|