binaryparse 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/binaryparse.gemspec +18 -0
- data/doc/classes/BinaryBlocker/BitFieldEncoder.html +328 -0
- data/doc/classes/BinaryBlocker/Blocker.html +168 -0
- data/doc/classes/BinaryBlocker/CountedArrayEncoder.html +347 -0
- data/doc/classes/BinaryBlocker/Encoder.html +526 -0
- data/doc/classes/BinaryBlocker/FixedArrayEncoder.html +278 -0
- data/doc/classes/BinaryBlocker/FixedStringEncoder.html +177 -0
- data/doc/classes/BinaryBlocker/FixedUTF16StringEncoder.html +229 -0
- data/doc/classes/BinaryBlocker/GroupEncoder.html +650 -0
- data/doc/classes/BinaryBlocker/ListOfEncoder.html +343 -0
- data/doc/classes/BinaryBlocker/OneOfEncoder.html +306 -0
- data/doc/classes/BinaryBlocker/PackedDateEncoder.html +220 -0
- data/doc/classes/BinaryBlocker/PackedDateTimeEncoder.html +220 -0
- data/doc/classes/BinaryBlocker/PackedNumberEncoder.html +231 -0
- data/doc/classes/BinaryBlocker/SimpleEncoder.html +284 -0
- data/doc/classes/BinaryBlocker.html +329 -0
- data/doc/classes/BufferedIO.html +324 -0
- data/doc/classes/TestBlocker/BBDate.html +120 -0
- data/doc/classes/TestBlocker/BBList.html +120 -0
- data/doc/classes/TestBlocker/BBPacked.html +120 -0
- data/doc/classes/TestBlocker/BBString.html +120 -0
- data/doc/classes/TestBlocker/BBSub1.html +120 -0
- data/doc/classes/TestBlocker/BBSub2.html +120 -0
- data/doc/classes/TestBlocker/BBTest1.html +120 -0
- data/doc/classes/TestBlocker/BBTest2.html +120 -0
- data/doc/classes/TestBlocker/BBTest3.html +120 -0
- data/doc/classes/TestBlocker/BBTest4.html +120 -0
- data/doc/classes/TestBlocker/BBTest5.html +120 -0
- data/doc/classes/TestBlocker/BBTest6.html +120 -0
- data/doc/classes/TestBlocker/BBTest7.html +120 -0
- data/doc/classes/TestBlocker/BBTime.html +120 -0
- data/doc/classes/TestBlocker/BBUTF16.html +120 -0
- data/doc/classes/TestBlocker/ItemA.html +120 -0
- data/doc/classes/TestBlocker/ItemB.html +120 -0
- data/doc/classes/TestBlocker.html +802 -0
- data/doc/created.rid +1 -0
- data/doc/dot/f_0.dot +208 -0
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/f_1.dot +23 -0
- data/doc/dot/f_1.png +0 -0
- data/doc/dot/f_2.dot +32 -0
- data/doc/dot/f_2.png +0 -0
- data/doc/dot/m_0_0.dot +208 -0
- data/doc/dot/m_0_0.png +0 -0
- data/doc/files/lib/blocker_rb.html +144 -0
- data/doc/files/lib/buffered_io_rb.html +115 -0
- data/doc/files/test/test_blocker_rb.html +116 -0
- data/doc/fr_class_index.html +60 -0
- data/doc/fr_file_index.html +29 -0
- data/doc/fr_method_index.html +135 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/blocker.rb +736 -0
- data/lib/buffered_io.rb +58 -0
- data/test/test_blocker.rb +412 -0
- metadata +111 -0
data/binaryparse.gemspec
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
spec = Gem::Specification.new do |s|
|
4
|
+
s.name = "binaryparse"
|
5
|
+
s.version = "0.1.0"
|
6
|
+
s.author = "Patrick Hurley"
|
7
|
+
s.email = "phurley@gmail.com"
|
8
|
+
s.homepage = "http://binaryparse.rubyforge.org/"
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.summary = "Binaryparse is a simple Ruby DSL to parse semi-complicated binary structures. This includes structures dynamic in length, which cannot be handled by DL::Struct or BitStructEx."
|
11
|
+
s.files = Dir["**/*"]
|
12
|
+
s.autorequire = "binaryparse"
|
13
|
+
end
|
14
|
+
|
15
|
+
if __FILE__ == $PROGRAM_NAME
|
16
|
+
Gem::manage_gems
|
17
|
+
Gem::Builder.new(spec).build
|
18
|
+
end
|
@@ -0,0 +1,328 @@
|
|
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: BinaryBlocker::BitFieldEncoder</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::BitFieldEncoder</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
|
+
<a href="Encoder.html">
|
69
|
+
Encoder
|
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
|
+
<div id="diagram">
|
83
|
+
<map id="map" name="map">
|
84
|
+
<area shape="rect" coords="252,146,351,194" href="GroupEncoder.html" alt="GroupEncoder" />
|
85
|
+
<area shape="rect" coords="27,242,123,290" href="ListOfEncoder.html" alt="ListOfEncoder" />
|
86
|
+
<area shape="rect" coords="147,242,219,290" href="Blocker.html" alt="Blocker" />
|
87
|
+
<area shape="rect" coords="243,242,360,290" href="FixedArrayEncoder.html" alt="FixedArrayEncoder" />
|
88
|
+
<area shape="rect" coords="384,242,517,290" href="CountedArrayEncoder.html" alt="CountedArrayEncoder" />
|
89
|
+
<area shape="rect" coords="683,50,755,98" href="Encoder.html" alt="Encoder" />
|
90
|
+
<area shape="rect" coords="605,146,707,194" href="SimpleEncoder.html" alt="SimpleEncoder" />
|
91
|
+
<area shape="rect" coords="731,146,835,194" href="BitFieldEncoder.html" alt="BitFieldEncoder" />
|
92
|
+
<area shape="rect" coords="859,146,960,194" href="OneOfEncoder.html" alt="OneOfEncoder" />
|
93
|
+
<area shape="rect" coords="541,242,683,290" href="PackedNumberEncoder.html" alt="PackedNumberEncoder" />
|
94
|
+
<area shape="rect" coords="469,338,595,386" href="PackedDateEncoder.html" alt="PackedDateEncoder" />
|
95
|
+
<area shape="rect" coords="619,338,765,386" href="PackedDateTimeEncoder.html" alt="PackedDateTimeEncoder" />
|
96
|
+
<area shape="rect" coords="707,242,827,290" href="FixedStringEncoder.html" alt="FixedStringEncoder" />
|
97
|
+
<area shape="rect" coords="851,242,1005,290" href="FixedUTF16StringEncoder.html" alt="FixedUTF16StringEncoder" />
|
98
|
+
<area shape="rect" coords="16,16,1016,396" href="../BinaryBlocker.html" alt="BinaryBlocker" />
|
99
|
+
</map>
|
100
|
+
<img src="../../dot/m_0_0.png" usemap="#map" border="0" alt="Module: BinaryBlocker" />
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div id="method-list">
|
108
|
+
<h3 class="section-bar">Methods</h3>
|
109
|
+
|
110
|
+
<div class="name-list">
|
111
|
+
<a href="#M000069">internal_block</a>
|
112
|
+
<a href="#M000070">internal_deblock</a>
|
113
|
+
<a href="#M000073">method_missing</a>
|
114
|
+
<a href="#M000068">new</a>
|
115
|
+
<a href="#M000072">raw_value</a>
|
116
|
+
<a href="#M000071">value</a>
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
</div>
|
121
|
+
|
122
|
+
|
123
|
+
<!-- if includes -->
|
124
|
+
|
125
|
+
<div id="section">
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<!-- if method_list -->
|
135
|
+
<div id="methods">
|
136
|
+
<h3 class="section-bar">Public Class methods</h3>
|
137
|
+
|
138
|
+
<div id="method-M000068" class="method-detail">
|
139
|
+
<a name="M000068"></a>
|
140
|
+
|
141
|
+
<div class="method-heading">
|
142
|
+
<a href="#M000068" class="method-signature">
|
143
|
+
<span class="method-name">new</span><span class="method-args">(type, bit_info, *opts)</span>
|
144
|
+
</a>
|
145
|
+
</div>
|
146
|
+
|
147
|
+
<div class="method-description">
|
148
|
+
<p><a class="source-toggle" href="#"
|
149
|
+
onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
|
150
|
+
<div class="method-source-code" id="M000068-source">
|
151
|
+
<pre>
|
152
|
+
<span class="ruby-comment cmt"># File lib/blocker.rb, line 666</span>
|
153
|
+
666: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">bit_info</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
|
154
|
+
667: <span class="ruby-ivar">@type</span> = <span class="ruby-constant">BinaryBlocker</span>.<span class="ruby-identifier">pack_symbols</span>[<span class="ruby-identifier">type</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">type</span>
|
155
|
+
668: <span class="ruby-ivar">@length</span> = <span class="ruby-constant">BinaryBlocker</span>.<span class="ruby-identifier">sizeof_format</span>(<span class="ruby-ivar">@type</span>)
|
156
|
+
669: <span class="ruby-ivar">@bit_info</span> = {}
|
157
|
+
670: <span class="ruby-identifier">pos</span> = <span class="ruby-value">0</span>
|
158
|
+
671: <span class="ruby-identifier">bit_info</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">bi</span><span class="ruby-operator">|</span>
|
159
|
+
672: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">bi</span>
|
160
|
+
673: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Symbol</span>
|
161
|
+
674: <span class="ruby-ivar">@bit_info</span>[<span class="ruby-identifier">bi</span>.<span class="ruby-identifier">to_sym</span>] = [<span class="ruby-identifier">pos</span>,<span class="ruby-value">1</span>]
|
162
|
+
675: <span class="ruby-identifier">pos</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
163
|
+
676:
|
164
|
+
677: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Fixnum</span>
|
165
|
+
678: <span class="ruby-identifier">pos</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">bi</span>
|
166
|
+
679:
|
167
|
+
680: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
|
168
|
+
681: <span class="ruby-ivar">@bit_info</span>[<span class="ruby-identifier">bi</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">to_sym</span>] = [<span class="ruby-identifier">pos</span>, <span class="ruby-identifier">bi</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">to_i</span>]
|
169
|
+
682: <span class="ruby-identifier">pos</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">bi</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">to_i</span>
|
170
|
+
683: <span class="ruby-keyword kw">end</span>
|
171
|
+
684: <span class="ruby-keyword kw">end</span>
|
172
|
+
685: <span class="ruby-ivar">@value</span> = <span class="ruby-value">0</span>
|
173
|
+
686: <span class="ruby-identifier">initialize_options</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
|
174
|
+
687: <span class="ruby-identifier">initialize_data</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">opts</span>)
|
175
|
+
688: <span class="ruby-keyword kw">end</span>
|
176
|
+
</pre>
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
182
|
+
|
183
|
+
<div id="method-M000069" class="method-detail">
|
184
|
+
<a name="M000069"></a>
|
185
|
+
|
186
|
+
<div class="method-heading">
|
187
|
+
<a href="#M000069" class="method-signature">
|
188
|
+
<span class="method-name">internal_block</span><span class="method-args">(val)</span>
|
189
|
+
</a>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div class="method-description">
|
193
|
+
<p><a class="source-toggle" href="#"
|
194
|
+
onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
|
195
|
+
<div class="method-source-code" id="M000069-source">
|
196
|
+
<pre>
|
197
|
+
<span class="ruby-comment cmt"># File lib/blocker.rb, line 690</span>
|
198
|
+
690: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">internal_block</span>(<span class="ruby-identifier">val</span>)
|
199
|
+
691: [<span class="ruby-identifier">val</span>.<span class="ruby-identifier">raw_value</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-ivar">@type</span>)
|
200
|
+
692: <span class="ruby-keyword kw">end</span>
|
201
|
+
</pre>
|
202
|
+
</div>
|
203
|
+
</div>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
<div id="method-M000070" class="method-detail">
|
207
|
+
<a name="M000070"></a>
|
208
|
+
|
209
|
+
<div class="method-heading">
|
210
|
+
<a href="#M000070" class="method-signature">
|
211
|
+
<span class="method-name">internal_deblock</span><span class="method-args">(io)</span>
|
212
|
+
</a>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div class="method-description">
|
216
|
+
<p><a class="source-toggle" href="#"
|
217
|
+
onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
|
218
|
+
<div class="method-source-code" id="M000070-source">
|
219
|
+
<pre>
|
220
|
+
<span class="ruby-comment cmt"># File lib/blocker.rb, line 694</span>
|
221
|
+
694: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">internal_deblock</span>(<span class="ruby-identifier">io</span>)
|
222
|
+
695: <span class="ruby-identifier">buffer</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>(<span class="ruby-ivar">@length</span>)
|
223
|
+
696: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-ivar">@type</span>)
|
224
|
+
697: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">first</span>
|
225
|
+
698: <span class="ruby-keyword kw">end</span>
|
226
|
+
</pre>
|
227
|
+
</div>
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
|
231
|
+
<div id="method-M000073" class="method-detail">
|
232
|
+
<a name="M000073"></a>
|
233
|
+
|
234
|
+
<div class="method-heading">
|
235
|
+
<a href="#M000073" class="method-signature">
|
236
|
+
<span class="method-name">method_missing</span><span class="method-args">(sym, *args)</span>
|
237
|
+
</a>
|
238
|
+
</div>
|
239
|
+
|
240
|
+
<div class="method-description">
|
241
|
+
<p><a class="source-toggle" href="#"
|
242
|
+
onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
|
243
|
+
<div class="method-source-code" id="M000073-source">
|
244
|
+
<pre>
|
245
|
+
<span class="ruby-comment cmt"># File lib/blocker.rb, line 708</span>
|
246
|
+
708: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
247
|
+
709: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">bi</span> = <span class="ruby-ivar">@bit_info</span>[<span class="ruby-identifier">sym</span>])
|
248
|
+
710: <span class="ruby-identifier">v</span> = <span class="ruby-ivar">@value</span> <span class="ruby-operator">>></span> <span class="ruby-identifier">bi</span>.<span class="ruby-identifier">first</span>
|
249
|
+
711: <span class="ruby-identifier">mask</span> = (<span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">bi</span>.<span class="ruby-identifier">last</span>) <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
|
250
|
+
712: <span class="ruby-identifier">v</span> = <span class="ruby-identifier">v</span> <span class="ruby-operator">&</span> <span class="ruby-identifier">mask</span>
|
251
|
+
713: <span class="ruby-keyword kw">else</span>
|
252
|
+
714: <span class="ruby-identifier">sym</span> = <span class="ruby-identifier">sym</span>.<span class="ruby-identifier">to_s</span>
|
253
|
+
715: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sym</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?=</span>
|
254
|
+
716: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">bi</span> = <span class="ruby-ivar">@bit_info</span>[<span class="ruby-identifier">sym</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>].<span class="ruby-identifier">to_sym</span>]
|
255
|
+
717: <span class="ruby-ivar">@value</span> <span class="ruby-operator">&=</span> <span class="ruby-operator">~</span>(((<span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">bi</span>.<span class="ruby-identifier">last</span>) <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) <span class="ruby-operator"><<</span> <span class="ruby-identifier">bi</span>.<span class="ruby-identifier">first</span>)
|
256
|
+
718: <span class="ruby-ivar">@value</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">bi</span>.<span class="ruby-identifier">first</span>
|
257
|
+
719: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value</span>
|
258
|
+
720: <span class="ruby-keyword kw">end</span>
|
259
|
+
721: <span class="ruby-keyword kw">end</span>
|
260
|
+
722: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"undefined method `#{sym}''"</span>)
|
261
|
+
723: <span class="ruby-comment cmt"># I was using super, but it was throwing a different error</span>
|
262
|
+
724: <span class="ruby-comment cmt"># which seemed wrong, not sure why</span>
|
263
|
+
725: <span class="ruby-keyword kw">end</span>
|
264
|
+
726: <span class="ruby-keyword kw">end</span>
|
265
|
+
</pre>
|
266
|
+
</div>
|
267
|
+
</div>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
<div id="method-M000072" class="method-detail">
|
271
|
+
<a name="M000072"></a>
|
272
|
+
|
273
|
+
<div class="method-heading">
|
274
|
+
<a href="#M000072" class="method-signature">
|
275
|
+
<span class="method-name">raw_value</span><span class="method-args">()</span>
|
276
|
+
</a>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
<div class="method-description">
|
280
|
+
<p><a class="source-toggle" href="#"
|
281
|
+
onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
|
282
|
+
<div class="method-source-code" id="M000072-source">
|
283
|
+
<pre>
|
284
|
+
<span class="ruby-comment cmt"># File lib/blocker.rb, line 704</span>
|
285
|
+
704: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raw_value</span>
|
286
|
+
705: <span class="ruby-ivar">@value</span>
|
287
|
+
706: <span class="ruby-keyword kw">end</span>
|
288
|
+
</pre>
|
289
|
+
</div>
|
290
|
+
</div>
|
291
|
+
</div>
|
292
|
+
|
293
|
+
<div id="method-M000071" class="method-detail">
|
294
|
+
<a name="M000071"></a>
|
295
|
+
|
296
|
+
<div class="method-heading">
|
297
|
+
<a href="#M000071" class="method-signature">
|
298
|
+
<span class="method-name">value</span><span class="method-args">()</span>
|
299
|
+
</a>
|
300
|
+
</div>
|
301
|
+
|
302
|
+
<div class="method-description">
|
303
|
+
<p><a class="source-toggle" href="#"
|
304
|
+
onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
|
305
|
+
<div class="method-source-code" id="M000071-source">
|
306
|
+
<pre>
|
307
|
+
<span class="ruby-comment cmt"># File lib/blocker.rb, line 700</span>
|
308
|
+
700: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">value</span>
|
309
|
+
701: <span class="ruby-keyword kw">self</span>
|
310
|
+
702: <span class="ruby-keyword kw">end</span>
|
311
|
+
</pre>
|
312
|
+
</div>
|
313
|
+
</div>
|
314
|
+
</div>
|
315
|
+
|
316
|
+
|
317
|
+
</div>
|
318
|
+
|
319
|
+
|
320
|
+
</div>
|
321
|
+
|
322
|
+
|
323
|
+
<div id="validator-badges">
|
324
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
</body>
|
328
|
+
</html>
|
@@ -0,0 +1,168 @@
|
|
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: BinaryBlocker::Blocker</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::Blocker</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
|
+
<a href="GroupEncoder.html">
|
69
|
+
GroupEncoder
|
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
|
+
<div id="diagram">
|
83
|
+
<map id="map" name="map">
|
84
|
+
<area shape="rect" coords="252,146,351,194" href="GroupEncoder.html" alt="GroupEncoder" />
|
85
|
+
<area shape="rect" coords="27,242,123,290" href="ListOfEncoder.html" alt="ListOfEncoder" />
|
86
|
+
<area shape="rect" coords="147,242,219,290" href="Blocker.html" alt="Blocker" />
|
87
|
+
<area shape="rect" coords="243,242,360,290" href="FixedArrayEncoder.html" alt="FixedArrayEncoder" />
|
88
|
+
<area shape="rect" coords="384,242,517,290" href="CountedArrayEncoder.html" alt="CountedArrayEncoder" />
|
89
|
+
<area shape="rect" coords="683,50,755,98" href="Encoder.html" alt="Encoder" />
|
90
|
+
<area shape="rect" coords="605,146,707,194" href="SimpleEncoder.html" alt="SimpleEncoder" />
|
91
|
+
<area shape="rect" coords="731,146,835,194" href="BitFieldEncoder.html" alt="BitFieldEncoder" />
|
92
|
+
<area shape="rect" coords="859,146,960,194" href="OneOfEncoder.html" alt="OneOfEncoder" />
|
93
|
+
<area shape="rect" coords="541,242,683,290" href="PackedNumberEncoder.html" alt="PackedNumberEncoder" />
|
94
|
+
<area shape="rect" coords="469,338,595,386" href="PackedDateEncoder.html" alt="PackedDateEncoder" />
|
95
|
+
<area shape="rect" coords="619,338,765,386" href="PackedDateTimeEncoder.html" alt="PackedDateTimeEncoder" />
|
96
|
+
<area shape="rect" coords="707,242,827,290" href="FixedStringEncoder.html" alt="FixedStringEncoder" />
|
97
|
+
<area shape="rect" coords="851,242,1005,290" href="FixedUTF16StringEncoder.html" alt="FixedUTF16StringEncoder" />
|
98
|
+
<area shape="rect" coords="16,16,1016,396" href="../BinaryBlocker.html" alt="BinaryBlocker" />
|
99
|
+
</map>
|
100
|
+
<img src="../../dot/m_0_0.png" usemap="#map" border="0" alt="Module: BinaryBlocker" />
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div id="method-list">
|
108
|
+
<h3 class="section-bar">Methods</h3>
|
109
|
+
|
110
|
+
<div class="name-list">
|
111
|
+
<a href="#M000055">inspect</a>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
<!-- if includes -->
|
119
|
+
|
120
|
+
<div id="section">
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<!-- if method_list -->
|
130
|
+
<div id="methods">
|
131
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
132
|
+
|
133
|
+
<div id="method-M000055" class="method-detail">
|
134
|
+
<a name="M000055"></a>
|
135
|
+
|
136
|
+
<div class="method-heading">
|
137
|
+
<a href="#M000055" class="method-signature">
|
138
|
+
<span class="method-name">inspect</span><span class="method-args">()</span>
|
139
|
+
</a>
|
140
|
+
</div>
|
141
|
+
|
142
|
+
<div class="method-description">
|
143
|
+
<p><a class="source-toggle" href="#"
|
144
|
+
onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
|
145
|
+
<div class="method-source-code" id="M000055-source">
|
146
|
+
<pre>
|
147
|
+
<span class="ruby-comment cmt"># File lib/blocker.rb, line 731</span>
|
148
|
+
731: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
149
|
+
732: <span class="ruby-node">"Blocker: #{@value.inspect} (index: #{@lookup})"</span>
|
150
|
+
733: <span class="ruby-keyword kw">end</span>
|
151
|
+
</pre>
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
|
157
|
+
</div>
|
158
|
+
|
159
|
+
|
160
|
+
</div>
|
161
|
+
|
162
|
+
|
163
|
+
<div id="validator-badges">
|
164
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
165
|
+
</div>
|
166
|
+
|
167
|
+
</body>
|
168
|
+
</html>
|