binaryparse 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/binaryparse.gemspec +17 -17
  2. data/examples/pms_input_2_test.rb +70 -0
  3. data/lib/blocker.rb +1 -1
  4. metadata +3 -66
  5. data/doc/binaryparse.chm +0 -0
  6. data/doc/bphelp.zip +0 -0
  7. data/doc/classes/BinaryBlocker/BitFieldEncoder.html +0 -328
  8. data/doc/classes/BinaryBlocker/Blocker.html +0 -168
  9. data/doc/classes/BinaryBlocker/CountedArrayEncoder.html +0 -347
  10. data/doc/classes/BinaryBlocker/Encoder.html +0 -526
  11. data/doc/classes/BinaryBlocker/FixedArrayEncoder.html +0 -278
  12. data/doc/classes/BinaryBlocker/FixedStringEncoder.html +0 -177
  13. data/doc/classes/BinaryBlocker/FixedUTF16StringEncoder.html +0 -229
  14. data/doc/classes/BinaryBlocker/GroupEncoder.html +0 -650
  15. data/doc/classes/BinaryBlocker/ListOfEncoder.html +0 -343
  16. data/doc/classes/BinaryBlocker/OneOfEncoder.html +0 -306
  17. data/doc/classes/BinaryBlocker/PackedDateEncoder.html +0 -220
  18. data/doc/classes/BinaryBlocker/PackedDateTimeEncoder.html +0 -220
  19. data/doc/classes/BinaryBlocker/PackedNumberEncoder.html +0 -231
  20. data/doc/classes/BinaryBlocker/SimpleEncoder.html +0 -284
  21. data/doc/classes/BinaryBlocker.html +0 -329
  22. data/doc/classes/BufferedIO.html +0 -324
  23. data/doc/classes/TestBlocker/BBDate.html +0 -120
  24. data/doc/classes/TestBlocker/BBList.html +0 -120
  25. data/doc/classes/TestBlocker/BBPacked.html +0 -120
  26. data/doc/classes/TestBlocker/BBString.html +0 -120
  27. data/doc/classes/TestBlocker/BBSub1.html +0 -120
  28. data/doc/classes/TestBlocker/BBSub2.html +0 -120
  29. data/doc/classes/TestBlocker/BBTest1.html +0 -120
  30. data/doc/classes/TestBlocker/BBTest2.html +0 -120
  31. data/doc/classes/TestBlocker/BBTest3.html +0 -120
  32. data/doc/classes/TestBlocker/BBTest4.html +0 -120
  33. data/doc/classes/TestBlocker/BBTest5.html +0 -120
  34. data/doc/classes/TestBlocker/BBTest6.html +0 -120
  35. data/doc/classes/TestBlocker/BBTest7.html +0 -120
  36. data/doc/classes/TestBlocker/BBTime.html +0 -120
  37. data/doc/classes/TestBlocker/BBUTF16.html +0 -120
  38. data/doc/classes/TestBlocker/ItemA.html +0 -120
  39. data/doc/classes/TestBlocker/ItemB.html +0 -120
  40. data/doc/classes/TestBlocker.html +0 -802
  41. data/doc/contents.hhc +0 -670
  42. data/doc/created.rid +0 -1
  43. data/doc/dot/f_0.dot +0 -208
  44. data/doc/dot/f_0.png +0 -0
  45. data/doc/dot/f_1.dot +0 -23
  46. data/doc/dot/f_1.png +0 -0
  47. data/doc/dot/f_2.dot +0 -32
  48. data/doc/dot/f_2.png +0 -0
  49. data/doc/dot/m_0_0.dot +0 -208
  50. data/doc/dot/m_0_0.png +0 -0
  51. data/doc/files/lib/blocker_rb.html +0 -144
  52. data/doc/files/lib/buffered_io_rb.html +0 -115
  53. data/doc/files/test/test_blocker_rb.html +0 -116
  54. data/doc/fr_class_index.html +0 -60
  55. data/doc/fr_file_index.html +0 -29
  56. data/doc/fr_method_index.html +0 -135
  57. data/doc/index.hhk +0 -599
  58. data/doc/index.html +0 -24
  59. data/doc/rdoc-style.css +0 -208
  60. data/doc/rdoc.hhp +0 -15
@@ -1,526 +0,0 @@
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: BinaryBlocker::Encoder</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">BinaryBlocker::Encoder</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/blocker_rb.html">
59
- lib/blocker.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
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
- <div id="diagram">
81
- <map id="map" name="map">
82
- <area shape="rect" coords="252,146,351,194" href="GroupEncoder.html" alt="GroupEncoder" />
83
- <area shape="rect" coords="27,242,123,290" href="ListOfEncoder.html" alt="ListOfEncoder" />
84
- <area shape="rect" coords="147,242,219,290" href="Blocker.html" alt="Blocker" />
85
- <area shape="rect" coords="243,242,360,290" href="FixedArrayEncoder.html" alt="FixedArrayEncoder" />
86
- <area shape="rect" coords="384,242,517,290" href="CountedArrayEncoder.html" alt="CountedArrayEncoder" />
87
- <area shape="rect" coords="683,50,755,98" href="Encoder.html" alt="Encoder" />
88
- <area shape="rect" coords="605,146,707,194" href="SimpleEncoder.html" alt="SimpleEncoder" />
89
- <area shape="rect" coords="731,146,835,194" href="BitFieldEncoder.html" alt="BitFieldEncoder" />
90
- <area shape="rect" coords="859,146,960,194" href="OneOfEncoder.html" alt="OneOfEncoder" />
91
- <area shape="rect" coords="541,242,683,290" href="PackedNumberEncoder.html" alt="PackedNumberEncoder" />
92
- <area shape="rect" coords="469,338,595,386" href="PackedDateEncoder.html" alt="PackedDateEncoder" />
93
- <area shape="rect" coords="619,338,765,386" href="PackedDateTimeEncoder.html" alt="PackedDateTimeEncoder" />
94
- <area shape="rect" coords="707,242,827,290" href="FixedStringEncoder.html" alt="FixedStringEncoder" />
95
- <area shape="rect" coords="851,242,1005,290" href="FixedUTF16StringEncoder.html" alt="FixedUTF16StringEncoder" />
96
- <area shape="rect" coords="16,16,1016,396" href="../BinaryBlocker.html" alt="BinaryBlocker" />
97
- </map>
98
- <img src="../../dot/m_0_0.png" usemap="#map" border="0" alt="Module: BinaryBlocker" />
99
- </div>
100
-
101
- <div id="description">
102
- <p>
103
- This is the base class for all the various encoders. It supports a variety
104
- of options (as Symbols in a Hash):
105
- </p>
106
- <table>
107
- <tr><td valign="top">pre_block:</td><td>passed the value before being blocked
108
-
109
- </td></tr>
110
- <tr><td valign="top">post_block:</td><td>passed the blocked value before returned
111
-
112
- </td></tr>
113
- <tr><td valign="top">pre_deblock:</td><td>passed the io before attempting to deblock it (hard to imagine why you
114
- would need this but I was compelled by orthaganality)
115
-
116
- </td></tr>
117
- <tr><td valign="top">post_deblock:</td><td>passed the deblocked value before being stored internally
118
-
119
- </td></tr>
120
- <tr><td valign="top">get_filter:</td><td>more info
121
-
122
- </td></tr>
123
- <tr><td valign="top">set_filter:</td><td>all done
124
-
125
- </td></tr>
126
- </table>
127
- <p>
128
- It also supports either a string or io parameter which will be used to
129
- initialize the class
130
- </p>
131
-
132
- </div>
133
-
134
-
135
- </div>
136
-
137
- <div id="method-list">
138
- <h3 class="section-bar">Methods</h3>
139
-
140
- <div class="name-list">
141
- <a href="#M000100">block</a>&nbsp;&nbsp;
142
- <a href="#M000101">deblock</a>&nbsp;&nbsp;
143
- <a href="#M000106">initialize_data</a>&nbsp;&nbsp;
144
- <a href="#M000105">initialize_options</a>&nbsp;&nbsp;
145
- <a href="#M000108">internal_block</a>&nbsp;&nbsp;
146
- <a href="#M000109">internal_deblock</a>&nbsp;&nbsp;
147
- <a href="#M000099">new</a>&nbsp;&nbsp;
148
- <a href="#M000102">valid?</a>&nbsp;&nbsp;
149
- <a href="#M000103">value</a>&nbsp;&nbsp;
150
- <a href="#M000104">value=</a>&nbsp;&nbsp;
151
- <a href="#M000107">with_guarded_io_pos</a>&nbsp;&nbsp;
152
- </div>
153
- </div>
154
-
155
- </div>
156
-
157
-
158
- <!-- if includes -->
159
-
160
- <div id="section">
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
- <!-- if method_list -->
170
- <div id="methods">
171
- <h3 class="section-bar">Public Class methods</h3>
172
-
173
- <div id="method-M000099" class="method-detail">
174
- <a name="M000099"></a>
175
-
176
- <div class="method-heading">
177
- <a href="#M000099" class="method-signature">
178
- <span class="method-name">new</span><span class="method-args">(*opts)</span>
179
- </a>
180
- </div>
181
-
182
- <div class="method-description">
183
- <p>
184
- Parameters: (io | buf, options_hash)
185
- </p>
186
- <p>
187
- Options (lambda):
188
- </p>
189
- <table>
190
- <tr><td valign="top">pre_block:</td><td>passed the value before being blocked
191
-
192
- </td></tr>
193
- <tr><td valign="top">post_block:</td><td>passed the blocked value before returned
194
-
195
- </td></tr>
196
- <tr><td valign="top">pre_deblock:</td><td>passed the io before attempting to deblock it (hard to imagine why you
197
- would need this but I was compelled by orthaganality)
198
-
199
- </td></tr>
200
- <tr><td valign="top">post_deblock:</td><td>passed the deblocked value before being stored internally
201
-
202
- </td></tr>
203
- <tr><td valign="top">get_filter:</td><td>more info
204
-
205
- </td></tr>
206
- <tr><td valign="top">set_filter:</td><td>all done
207
-
208
- </td></tr>
209
- </table>
210
- <p><a class="source-toggle" href="#"
211
- onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
212
- <div class="method-source-code" id="M000099-source">
213
- <pre>
214
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 108</span>
215
- 108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
216
- 109: <span class="ruby-identifier">initialize_options</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
217
- 110: <span class="ruby-identifier">initialize_data</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
218
- 111: <span class="ruby-keyword kw">end</span>
219
- </pre>
220
- </div>
221
- </div>
222
- </div>
223
-
224
- <h3 class="section-bar">Public Instance methods</h3>
225
-
226
- <div id="method-M000100" class="method-detail">
227
- <a name="M000100"></a>
228
-
229
- <div class="method-heading">
230
- <a href="#M000100" class="method-signature">
231
- <span class="method-name">block</span><span class="method-args">(io=nil)</span>
232
- </a>
233
- </div>
234
-
235
- <div class="method-description">
236
- <p><a class="source-toggle" href="#"
237
- onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
238
- <div class="method-source-code" id="M000100-source">
239
- <pre>
240
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 114</span>
241
- 114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">block</span>(<span class="ruby-identifier">io</span>=<span class="ruby-keyword kw">nil</span>)
242
- 115: <span class="ruby-identifier">val</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@pre_block</span>
243
- 116: <span class="ruby-ivar">@pre_block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">value</span>)
244
- 117: <span class="ruby-keyword kw">else</span>
245
- 118: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">value</span>
246
- 119: <span class="ruby-keyword kw">end</span>
247
- 120: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">internal_block</span>(<span class="ruby-identifier">val</span>)
248
- 121: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@post_block</span>
249
- 122: <span class="ruby-identifier">result</span> = <span class="ruby-ivar">@post_block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">result</span>)
250
- 123: <span class="ruby-keyword kw">end</span>
251
- 124: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">result</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">io</span>
252
- 125: <span class="ruby-identifier">result</span>
253
- 126: <span class="ruby-keyword kw">end</span>
254
- </pre>
255
- </div>
256
- </div>
257
- </div>
258
-
259
- <div id="method-M000101" class="method-detail">
260
- <a name="M000101"></a>
261
-
262
- <div class="method-heading">
263
- <a href="#M000101" class="method-signature">
264
- <span class="method-name">deblock</span><span class="method-args">(io)</span>
265
- </a>
266
- </div>
267
-
268
- <div class="method-description">
269
- <p>
270
- This routine takes an io and will parse the stream on success it returns
271
- the object, on failure it returns a nil
272
- </p>
273
- <p><a class="source-toggle" href="#"
274
- onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
275
- <div class="method-source-code" id="M000101-source">
276
- <pre>
277
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 131</span>
278
- 131: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deblock</span>(<span class="ruby-identifier">io</span>)
279
- 132: <span class="ruby-identifier">with_guarded_io_pos</span>(<span class="ruby-identifier">io</span>) <span class="ruby-keyword kw">do</span>
280
- 133: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@pre_deblock</span>
281
- 134: <span class="ruby-comment cmt"># does this serve any real purpose? other</span>
282
- 135: <span class="ruby-comment cmt"># than making me feel good and orthoginal</span>
283
- 136: <span class="ruby-identifier">io</span> = <span class="ruby-ivar">@pre_deblock</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">io</span>)
284
- 137: <span class="ruby-keyword kw">end</span>
285
- 138: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">internal_deblock</span>(<span class="ruby-identifier">io</span>)
286
- 139: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@post_deblock</span>
287
- 140: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">value</span> = <span class="ruby-ivar">@post_deblock</span>.<span class="ruby-identifier">call</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">value</span>)
288
- 141: <span class="ruby-keyword kw">end</span>
289
- 142: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">value</span>
290
- 143: <span class="ruby-keyword kw">end</span>
291
- 144: <span class="ruby-keyword kw">end</span>
292
- </pre>
293
- </div>
294
- </div>
295
- </div>
296
-
297
- <h3 class="section-bar">Protected Instance methods</h3>
298
-
299
- <div id="method-M000106" class="method-detail">
300
- <a name="M000106"></a>
301
-
302
- <div class="method-heading">
303
- <a href="#M000106" class="method-signature">
304
- <span class="method-name">initialize_data</span><span class="method-args">(*opts)</span>
305
- </a>
306
- </div>
307
-
308
- <div class="method-description">
309
- <p><a class="source-toggle" href="#"
310
- onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
311
- <div class="method-source-code" id="M000106-source">
312
- <pre>
313
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 184</span>
314
- 184: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_data</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
315
- 185: <span class="ruby-identifier">data</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-identifier">o</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_hash</span> }
316
- 186: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_str</span>
317
- 187: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Unable to parse block&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">deblock</span>(<span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">data</span>))
318
- 188: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:read</span>
319
- 189: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Unable to parse block&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">deblock</span>(<span class="ruby-identifier">data</span>)
320
- 190: <span class="ruby-keyword kw">end</span>
321
- 191: <span class="ruby-keyword kw">end</span>
322
- </pre>
323
- </div>
324
- </div>
325
- </div>
326
-
327
- <div id="method-M000105" class="method-detail">
328
- <a name="M000105"></a>
329
-
330
- <div class="method-heading">
331
- <a href="#M000105" class="method-signature">
332
- <span class="method-name">initialize_options</span><span class="method-args">(*opts)</span>
333
- </a>
334
- </div>
335
-
336
- <div class="method-description">
337
- <p><a class="source-toggle" href="#"
338
- onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
339
- <div class="method-source-code" id="M000105-source">
340
- <pre>
341
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 168</span>
342
- 168: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_options</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
343
- 169: <span class="ruby-ivar">@opts</span> <span class="ruby-operator">||=</span> {}
344
- 170: <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_hash</span> }
345
- 171: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>
346
- 172: <span class="ruby-ivar">@opts</span> = <span class="ruby-ivar">@opts</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>)
347
- 173: <span class="ruby-ivar">@pre_block</span> = <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:pre_block</span>]
348
- 174: <span class="ruby-ivar">@pre_deblock</span> = <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:pre_deblock</span>]
349
- 175:
350
- 176: <span class="ruby-ivar">@get_filter</span> = <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:get_filter</span>]
351
- 177: <span class="ruby-ivar">@set_filter</span> = <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:set_filter</span>]
352
- 178:
353
- 179: <span class="ruby-ivar">@post_block</span> = <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:post_block</span>]
354
- 180: <span class="ruby-ivar">@post_deblock</span> = <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:post_deblock</span>]
355
- 181: <span class="ruby-keyword kw">end</span>
356
- 182: <span class="ruby-keyword kw">end</span>
357
- </pre>
358
- </div>
359
- </div>
360
- </div>
361
-
362
- <div id="method-M000108" class="method-detail">
363
- <a name="M000108"></a>
364
-
365
- <div class="method-heading">
366
- <a href="#M000108" class="method-signature">
367
- <span class="method-name">internal_block</span><span class="method-args">(value)</span>
368
- </a>
369
- </div>
370
-
371
- <div class="method-description">
372
- <p><a class="source-toggle" href="#"
373
- onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
374
- <div class="method-source-code" id="M000108-source">
375
- <pre>
376
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 201</span>
377
- 201: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">internal_block</span>(<span class="ruby-identifier">value</span>)
378
- 202: <span class="ruby-identifier">value</span>
379
- 203: <span class="ruby-keyword kw">end</span>
380
- </pre>
381
- </div>
382
- </div>
383
- </div>
384
-
385
- <div id="method-M000109" class="method-detail">
386
- <a name="M000109"></a>
387
-
388
- <div class="method-heading">
389
- <a href="#M000109" class="method-signature">
390
- <span class="method-name">internal_deblock</span><span class="method-args">(io)</span>
391
- </a>
392
- </div>
393
-
394
- <div class="method-description">
395
- <p><a class="source-toggle" href="#"
396
- onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
397
- <div class="method-source-code" id="M000109-source">
398
- <pre>
399
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 205</span>
400
- 205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">internal_deblock</span>(<span class="ruby-identifier">io</span>)
401
- 206: <span class="ruby-value str">''</span>
402
- 207: <span class="ruby-keyword kw">end</span>
403
- </pre>
404
- </div>
405
- </div>
406
- </div>
407
-
408
- <div id="method-M000102" class="method-detail">
409
- <a name="M000102"></a>
410
-
411
- <div class="method-heading">
412
- <a href="#M000102" class="method-signature">
413
- <span class="method-name">valid?</span><span class="method-args">()</span>
414
- </a>
415
- </div>
416
-
417
- <div class="method-description">
418
- <p>
419
- Override valid? to allow check constraints on a particular record type, on
420
- failure
421
- </p>
422
- <p><a class="source-toggle" href="#"
423
- onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
424
- <div class="method-source-code" id="M000102-source">
425
- <pre>
426
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 150</span>
427
- 150: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>
428
- 151: <span class="ruby-keyword kw">true</span>
429
- 152: <span class="ruby-keyword kw">end</span>
430
- </pre>
431
- </div>
432
- </div>
433
- </div>
434
-
435
- <div id="method-M000103" class="method-detail">
436
- <a name="M000103"></a>
437
-
438
- <div class="method-heading">
439
- <a href="#M000103" class="method-signature">
440
- <span class="method-name">value</span><span class="method-args">()</span>
441
- </a>
442
- </div>
443
-
444
- <div class="method-description">
445
- <p><a class="source-toggle" href="#"
446
- onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
447
- <div class="method-source-code" id="M000103-source">
448
- <pre>
449
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 154</span>
450
- 154: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">value</span>
451
- 155: <span class="ruby-identifier">v</span> = <span class="ruby-ivar">@value</span>
452
- 156: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@get_filter</span>
453
- 157: <span class="ruby-ivar">@get_filter</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">v</span>)
454
- 158: <span class="ruby-keyword kw">else</span>
455
- 159: <span class="ruby-identifier">v</span>
456
- 160: <span class="ruby-keyword kw">end</span>
457
- 161: <span class="ruby-keyword kw">end</span>
458
- </pre>
459
- </div>
460
- </div>
461
- </div>
462
-
463
- <div id="method-M000104" class="method-detail">
464
- <a name="M000104"></a>
465
-
466
- <div class="method-heading">
467
- <a href="#M000104" class="method-signature">
468
- <span class="method-name">value=</span><span class="method-args">(val)</span>
469
- </a>
470
- </div>
471
-
472
- <div class="method-description">
473
- <p><a class="source-toggle" href="#"
474
- onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
475
- <div class="method-source-code" id="M000104-source">
476
- <pre>
477
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 163</span>
478
- 163: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">value=</span>(<span class="ruby-identifier">val</span>)
479
- 164: <span class="ruby-identifier">val</span> = <span class="ruby-ivar">@set_filter</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">val</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@set_filter</span>
480
- 165: <span class="ruby-ivar">@value</span> = <span class="ruby-identifier">val</span>
481
- 166: <span class="ruby-keyword kw">end</span>
482
- </pre>
483
- </div>
484
- </div>
485
- </div>
486
-
487
- <div id="method-M000107" class="method-detail">
488
- <a name="M000107"></a>
489
-
490
- <div class="method-heading">
491
- <a href="#M000107" class="method-signature">
492
- <span class="method-name">with_guarded_io_pos</span><span class="method-args">(io) {|io| ...}</span>
493
- </a>
494
- </div>
495
-
496
- <div class="method-description">
497
- <p><a class="source-toggle" href="#"
498
- onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
499
- <div class="method-source-code" id="M000107-source">
500
- <pre>
501
- <span class="ruby-comment cmt"># File lib/blocker.rb, line 193</span>
502
- 193: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_guarded_io_pos</span>(<span class="ruby-identifier">io</span>)
503
- 194: <span class="ruby-identifier">result</span> = <span class="ruby-keyword kw">nil</span>
504
- 195: <span class="ruby-constant">BinaryBlocker</span>.<span class="ruby-identifier">with_guarded_io_pos</span>(<span class="ruby-identifier">io</span>) <span class="ruby-keyword kw">do</span>
505
- 196: <span class="ruby-identifier">result</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">io</span>
506
- 197: <span class="ruby-identifier">valid?</span>
507
- 198: <span class="ruby-keyword kw">end</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">result</span>
508
- 199: <span class="ruby-keyword kw">end</span>
509
- </pre>
510
- </div>
511
- </div>
512
- </div>
513
-
514
-
515
- </div>
516
-
517
-
518
- </div>
519
-
520
-
521
- <div id="validator-badges">
522
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
523
- </div>
524
-
525
- </body>
526
- </html>