sdl4r 0.9.4 → 0.9.5
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 +28 -0
- data/README +9 -0
- data/Rakefile +3 -2
- data/TODO +78 -0
- data/doc/classes/SDL4R.html +207 -53
- data/doc/classes/SDL4R/Parser.html +111 -49
- data/doc/classes/SDL4R/SdlBinary.html +125 -65
- data/doc/classes/SDL4R/SdlParseError.html +52 -30
- data/doc/classes/SDL4R/SdlTimeSpan.html +497 -279
- data/doc/classes/SDL4R/Tag.html +866 -514
- data/doc/created.rid +1 -1
- data/doc/files/CHANGELOG.html +52 -25
- data/doc/files/LICENSE.html +43 -52
- data/doc/files/README.html +52 -43
- data/doc/files/lib/sdl4r/parser/reader_rb.html +16 -27
- data/doc/files/lib/sdl4r/parser/time_span_with_zone_rb.html +17 -21
- data/doc/files/lib/sdl4r/parser/token_rb.html +17 -21
- data/doc/files/lib/sdl4r/parser/tokenizer_rb.html +17 -21
- data/doc/files/lib/sdl4r/parser_rb.html +21 -22
- data/doc/files/lib/sdl4r/sdl4r_rb.html +25 -25
- data/doc/files/lib/sdl4r/sdl_binary_rb.html +17 -21
- data/doc/files/lib/sdl4r/sdl_parse_error_rb.html +17 -21
- data/doc/files/lib/sdl4r/sdl_time_span_rb.html +17 -21
- data/doc/files/lib/sdl4r/tag_rb.html +25 -24
- data/doc/files/lib/sdl4r_rb.html +17 -21
- data/doc/fr_class_index.html +15 -12
- data/doc/fr_file_index.html +23 -12
- data/doc/fr_method_index.html +176 -91
- data/doc/index.html +7 -10
- data/doc/rdoc-style.css +210 -119
- data/lib/sdl4r.rb +3 -0
- data/lib/sdl4r/parser.rb +3 -5
- data/lib/sdl4r/parser/reader.rb +3 -3
- data/lib/sdl4r/parser/time_span_with_zone.rb +3 -0
- data/lib/sdl4r/parser/token.rb +3 -0
- data/lib/sdl4r/parser/tokenizer.rb +3 -0
- data/lib/sdl4r/sdl4r.rb +20 -8
- data/lib/sdl4r/sdl_binary.rb +3 -0
- data/lib/sdl4r/sdl_parse_error.rb +3 -0
- data/lib/sdl4r/sdl_time_span.rb +3 -0
- data/lib/sdl4r/tag.rb +18 -4
- data/test/sdl4r/parser_test.rb +7 -2
- data/test/sdl4r/sdl4r_test.rb +6 -2
- data/test/sdl4r/sdl_test.rb +3 -0
- data/test/sdl4r/tag_test.rb +3 -0
- metadata +72 -74
- data/TODO.txt +0 -177
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
6
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
4
|
<head>
|
8
|
-
<title>Class: SDL4R::Parser</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<title>Class: SDL4R::Parser [RDoc: Simple Declarative Language for Ruby]</title>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
7
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
8
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
9
|
<script type="text/javascript">
|
@@ -25,7 +22,7 @@
|
|
25
22
|
return false;
|
26
23
|
|
27
24
|
elemStyle = elem.style;
|
28
|
-
|
25
|
+
|
29
26
|
if ( elemStyle.display != "block" ) {
|
30
27
|
elemStyle.display = "block"
|
31
28
|
} else {
|
@@ -34,10 +31,10 @@
|
|
34
31
|
|
35
32
|
return true;
|
36
33
|
}
|
37
|
-
|
34
|
+
|
38
35
|
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
40
|
-
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
37
|
+
|
41
38
|
// ]]>
|
42
39
|
</script>
|
43
40
|
|
@@ -45,7 +42,6 @@
|
|
45
42
|
<body>
|
46
43
|
|
47
44
|
|
48
|
-
|
49
45
|
<div id="classHeader">
|
50
46
|
<table class="header-table">
|
51
47
|
<tr class="top-aligned-row">
|
@@ -55,43 +51,76 @@
|
|
55
51
|
<tr class="top-aligned-row">
|
56
52
|
<td><strong>In:</strong></td>
|
57
53
|
<td>
|
54
|
+
|
55
|
+
|
58
56
|
<a href="../../files/lib/sdl4r/parser_rb.html">
|
57
|
+
|
59
58
|
lib/sdl4r/parser.rb
|
59
|
+
|
60
60
|
</a>
|
61
|
+
|
62
|
+
|
61
63
|
<br />
|
64
|
+
|
65
|
+
|
62
66
|
<a href="../../files/lib/sdl4r/parser/reader_rb.html">
|
67
|
+
|
63
68
|
lib/sdl4r/parser/reader.rb
|
69
|
+
|
64
70
|
</a>
|
71
|
+
|
72
|
+
|
65
73
|
<br />
|
74
|
+
|
75
|
+
|
66
76
|
<a href="../../files/lib/sdl4r/parser/tokenizer_rb.html">
|
77
|
+
|
67
78
|
lib/sdl4r/parser/tokenizer.rb
|
79
|
+
|
68
80
|
</a>
|
81
|
+
|
82
|
+
|
69
83
|
<br />
|
84
|
+
|
85
|
+
|
70
86
|
<a href="../../files/lib/sdl4r/parser/token_rb.html">
|
87
|
+
|
71
88
|
lib/sdl4r/parser/token.rb
|
89
|
+
|
72
90
|
</a>
|
91
|
+
|
92
|
+
|
73
93
|
<br />
|
94
|
+
|
95
|
+
|
74
96
|
<a href="../../files/lib/sdl4r/parser/time_span_with_zone_rb.html">
|
97
|
+
|
75
98
|
lib/sdl4r/parser/time_span_with_zone.rb
|
99
|
+
|
76
100
|
</a>
|
101
|
+
|
102
|
+
|
77
103
|
<br />
|
104
|
+
|
78
105
|
</td>
|
79
106
|
</tr>
|
80
107
|
|
108
|
+
|
81
109
|
<tr class="top-aligned-row">
|
82
110
|
<td><strong>Parent:</strong></td>
|
83
111
|
<td>
|
112
|
+
|
84
113
|
Object
|
114
|
+
|
85
115
|
</td>
|
86
116
|
</tr>
|
117
|
+
|
87
118
|
</table>
|
88
119
|
</div>
|
89
120
|
<!-- banner header -->
|
90
121
|
|
91
122
|
<div id="bodyContent">
|
92
123
|
|
93
|
-
|
94
|
-
|
95
124
|
<div id="contextContent">
|
96
125
|
|
97
126
|
<div id="description">
|
@@ -108,7 +137,7 @@ following lines:
|
|
108
137
|
</pre>
|
109
138
|
<p>
|
110
139
|
This will give you correct input and output and correct UTF-8
|
111
|
-
|
140
|
+
“general” sorting. Alternatively you can use the following
|
112
141
|
options when launching the Ruby interpreter:
|
113
142
|
</p>
|
114
143
|
<pre>
|
@@ -121,66 +150,78 @@ Daniel Leuck, Philippe Vosges
|
|
121
150
|
|
122
151
|
</div>
|
123
152
|
|
124
|
-
|
125
153
|
</div>
|
126
154
|
|
155
|
+
|
127
156
|
<div id="method-list">
|
128
157
|
<h3 class="section-bar">Methods</h3>
|
129
158
|
|
130
159
|
<div class="name-list">
|
131
|
-
|
132
|
-
|
133
|
-
|
160
|
+
|
161
|
+
<a href="#M000080">new</a>
|
162
|
+
|
163
|
+
<a href="#M000082">new_date_time</a>
|
164
|
+
|
165
|
+
<a href="#M000081">parse</a>
|
166
|
+
|
134
167
|
</div>
|
135
168
|
</div>
|
136
169
|
|
137
170
|
</div>
|
138
171
|
|
139
|
-
|
140
172
|
<!-- if includes -->
|
141
173
|
|
142
174
|
<div id="section">
|
143
175
|
|
144
|
-
|
145
176
|
<div id="constants-list">
|
146
177
|
<h3 class="section-bar">Constants</h3>
|
147
178
|
|
148
179
|
<div class="name-list">
|
149
180
|
<table summary="Constants">
|
181
|
+
|
150
182
|
<tr class="top-aligned-row context-row">
|
151
183
|
<td class="context-item-name">UNKNOWN_POSITION</td>
|
152
184
|
<td>=</td>
|
153
185
|
<td class="context-item-value">-2</td>
|
154
|
-
|
186
|
+
|
187
|
+
<td> </td>
|
155
188
|
<td class="context-item-desc">
|
156
189
|
Passed to parse_error() in order to specify an error that occured on no
|
157
190
|
specific position (column).
|
158
191
|
|
159
192
|
</td>
|
193
|
+
|
160
194
|
</tr>
|
195
|
+
|
161
196
|
</table>
|
162
197
|
</div>
|
163
198
|
</div>
|
164
199
|
|
165
200
|
|
166
201
|
|
167
|
-
|
168
|
-
|
169
202
|
|
170
203
|
<!-- if method_list -->
|
204
|
+
|
171
205
|
<div id="methods">
|
206
|
+
|
172
207
|
<h3 class="section-bar">Public Class methods</h3>
|
173
208
|
|
174
|
-
|
175
|
-
|
209
|
+
|
210
|
+
<div id="method-M000080" class="method-detail">
|
211
|
+
<a name="M000080"></a>
|
176
212
|
|
177
213
|
<div class="method-heading">
|
178
|
-
|
214
|
+
|
215
|
+
<a href="#M000080" class="method-signature">
|
216
|
+
|
179
217
|
<span class="method-name">new</span><span class="method-args">(io)</span>
|
218
|
+
|
180
219
|
</a>
|
220
|
+
|
181
221
|
</div>
|
182
|
-
|
222
|
+
|
183
223
|
<div class="method-description">
|
224
|
+
|
184
225
|
<p>
|
185
226
|
Creates an SDL parser on the specified <tt>IO</tt>.
|
186
227
|
</p>
|
@@ -190,11 +231,12 @@ Creates an SDL parser on the specified <tt>IO</tt>.
|
|
190
231
|
tags = parser.parse()
|
191
232
|
}
|
192
233
|
</pre>
|
234
|
+
|
193
235
|
<p><a class="source-toggle" href="#"
|
194
|
-
onclick="toggleCode('
|
195
|
-
<div class="method-source-code" id="
|
236
|
+
onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
|
237
|
+
<div class="method-source-code" id="M000080-source">
|
196
238
|
<pre>
|
197
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/parser.rb, line
|
239
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/parser.rb, line 59</span>
|
198
240
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">io</span>)
|
199
241
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"io == nil"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">io</span>.<span class="ruby-identifier">nil?</span>
|
200
242
|
|
@@ -202,21 +244,29 @@ Creates an SDL parser on the specified <tt>IO</tt>.
|
|
202
244
|
<span class="ruby-keyword kw">end</span>
|
203
245
|
</pre>
|
204
246
|
</div>
|
247
|
+
|
205
248
|
</div>
|
206
249
|
</div>
|
207
250
|
|
251
|
+
|
208
252
|
<h3 class="section-bar">Public Instance methods</h3>
|
209
253
|
|
210
|
-
|
211
|
-
|
254
|
+
|
255
|
+
<div id="method-M000082" class="method-detail">
|
256
|
+
<a name="M000082"></a>
|
212
257
|
|
213
258
|
<div class="method-heading">
|
214
|
-
|
259
|
+
|
260
|
+
<a href="#M000082" class="method-signature">
|
261
|
+
|
215
262
|
<span class="method-name">new_date_time</span><span class="method-args">(year, month, day, hour, min, sec, time_zone_offset)</span>
|
263
|
+
|
216
264
|
</a>
|
265
|
+
|
217
266
|
</div>
|
218
|
-
|
267
|
+
|
219
268
|
<div class="method-description">
|
269
|
+
|
220
270
|
<p>
|
221
271
|
Creates and returns the object representing a datetime (DateTime in the
|
222
272
|
default implementation). Can be overriden.
|
@@ -226,32 +276,40 @@ default implementation). Can be overriden.
|
|
226
276
|
Time.utc(year, month, day, hour, min, sec)
|
227
277
|
end
|
228
278
|
</pre>
|
279
|
+
|
229
280
|
<p><a class="source-toggle" href="#"
|
230
|
-
onclick="toggleCode('
|
231
|
-
<div class="method-source-code" id="
|
281
|
+
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
282
|
+
<div class="method-source-code" id="M000082-source">
|
232
283
|
<pre>
|
233
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/parser.rb, line
|
284
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/parser.rb, line 105</span>
|
234
285
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_date_time</span>(<span class="ruby-identifier">year</span>, <span class="ruby-identifier">month</span>, <span class="ruby-identifier">day</span>, <span class="ruby-identifier">hour</span>, <span class="ruby-identifier">min</span>, <span class="ruby-identifier">sec</span>, <span class="ruby-identifier">time_zone_offset</span>)
|
235
286
|
<span class="ruby-constant">SDL4R</span><span class="ruby-operator">::</span><span class="ruby-identifier">new_date_time</span>(<span class="ruby-identifier">year</span>, <span class="ruby-identifier">month</span>, <span class="ruby-identifier">day</span>, <span class="ruby-identifier">hour</span>, <span class="ruby-identifier">min</span>, <span class="ruby-identifier">sec</span>, <span class="ruby-identifier">time_zone_offset</span>)
|
236
287
|
<span class="ruby-keyword kw">end</span>
|
237
288
|
</pre>
|
238
289
|
</div>
|
290
|
+
|
239
291
|
</div>
|
240
292
|
</div>
|
241
293
|
|
242
|
-
|
243
|
-
|
294
|
+
|
295
|
+
<div id="method-M000081" class="method-detail">
|
296
|
+
<a name="M000081"></a>
|
244
297
|
|
245
298
|
<div class="method-heading">
|
246
|
-
|
299
|
+
|
300
|
+
<a href="#M000081" class="method-signature">
|
301
|
+
|
247
302
|
<span class="method-name">parse</span><span class="method-args">()</span>
|
303
|
+
|
248
304
|
</a>
|
305
|
+
|
249
306
|
</div>
|
250
|
-
|
307
|
+
|
251
308
|
<div class="method-description">
|
309
|
+
|
252
310
|
<p>
|
253
|
-
Parses the underlying <tt>IO</tt> and returns an <tt>Array</tt> of
|
254
|
-
|
311
|
+
Parses the underlying <tt>IO</tt> and returns an <tt>Array</tt> of
|
312
|
+
<tt>Tag</tt>.
|
255
313
|
</p>
|
256
314
|
<h2>Errors</h2>
|
257
315
|
<dl>
|
@@ -262,11 +320,12 @@ href="Tag.html">Tag</a></tt>.
|
|
262
320
|
|
263
321
|
</dd>
|
264
322
|
</dl>
|
323
|
+
|
265
324
|
<p><a class="source-toggle" href="#"
|
266
|
-
onclick="toggleCode('
|
267
|
-
<div class="method-source-code" id="
|
325
|
+
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
326
|
+
<div class="method-source-code" id="M000081-source">
|
268
327
|
<pre>
|
269
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/parser.rb, line
|
328
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/parser.rb, line 70</span>
|
270
329
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>
|
271
330
|
<span class="ruby-identifier">tags</span> = []
|
272
331
|
|
@@ -296,19 +355,22 @@ href="Tag.html">Tag</a></tt>.
|
|
296
355
|
<span class="ruby-keyword kw">end</span>
|
297
356
|
</pre>
|
298
357
|
</div>
|
358
|
+
|
299
359
|
</div>
|
300
360
|
</div>
|
301
361
|
|
302
362
|
|
363
|
+
|
303
364
|
</div>
|
304
365
|
|
305
366
|
|
306
|
-
</div>
|
307
367
|
|
308
368
|
|
369
|
+
</div>
|
370
|
+
|
309
371
|
<div id="validator-badges">
|
310
372
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
311
373
|
</div>
|
312
374
|
|
313
375
|
</body>
|
314
|
-
</html>
|
376
|
+
</html>
|
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
6
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
4
|
<head>
|
8
|
-
<title>Class: SDL4R::SdlBinary</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<title>Class: SDL4R::SdlBinary [RDoc: Simple Declarative Language for Ruby]</title>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
7
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
8
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
9
|
<script type="text/javascript">
|
@@ -25,7 +22,7 @@
|
|
25
22
|
return false;
|
26
23
|
|
27
24
|
elemStyle = elem.style;
|
28
|
-
|
25
|
+
|
29
26
|
if ( elemStyle.display != "block" ) {
|
30
27
|
elemStyle.display = "block"
|
31
28
|
} else {
|
@@ -34,10 +31,10 @@
|
|
34
31
|
|
35
32
|
return true;
|
36
33
|
}
|
37
|
-
|
34
|
+
|
38
35
|
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
40
|
-
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
37
|
+
|
41
38
|
// ]]>
|
42
39
|
</script>
|
43
40
|
|
@@ -45,7 +42,6 @@
|
|
45
42
|
<body>
|
46
43
|
|
47
44
|
|
48
|
-
|
49
45
|
<div id="classHeader">
|
50
46
|
<table class="header-table">
|
51
47
|
<tr class="top-aligned-row">
|
@@ -55,27 +51,36 @@
|
|
55
51
|
<tr class="top-aligned-row">
|
56
52
|
<td><strong>In:</strong></td>
|
57
53
|
<td>
|
54
|
+
|
55
|
+
|
58
56
|
<a href="../../files/lib/sdl4r/sdl_binary_rb.html">
|
57
|
+
|
59
58
|
lib/sdl4r/sdl_binary.rb
|
59
|
+
|
60
60
|
</a>
|
61
|
+
|
62
|
+
|
61
63
|
<br />
|
64
|
+
|
62
65
|
</td>
|
63
66
|
</tr>
|
64
67
|
|
68
|
+
|
65
69
|
<tr class="top-aligned-row">
|
66
70
|
<td><strong>Parent:</strong></td>
|
67
71
|
<td>
|
72
|
+
|
68
73
|
Object
|
74
|
+
|
69
75
|
</td>
|
70
76
|
</tr>
|
77
|
+
|
71
78
|
</table>
|
72
79
|
</div>
|
73
80
|
<!-- banner header -->
|
74
81
|
|
75
82
|
<div id="bodyContent">
|
76
83
|
|
77
|
-
|
78
|
-
|
79
84
|
<div id="contextContent">
|
80
85
|
|
81
86
|
<div id="description">
|
@@ -89,73 +94,89 @@ a binary literal.
|
|
89
94
|
|
90
95
|
</div>
|
91
96
|
|
92
|
-
|
93
97
|
</div>
|
94
98
|
|
99
|
+
|
95
100
|
<div id="method-list">
|
96
101
|
<h3 class="section-bar">Methods</h3>
|
97
102
|
|
98
103
|
<div class="name-list">
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
104
|
+
|
105
|
+
<a href="#M000084">==</a>
|
106
|
+
|
107
|
+
<a href="#M000088">decode64</a>
|
108
|
+
|
109
|
+
<a href="#M000085">eql?</a>
|
110
|
+
|
111
|
+
<a href="#M000086">hash</a>
|
112
|
+
|
113
|
+
<a href="#M000083">new</a>
|
114
|
+
|
115
|
+
<a href="#M000087">to_s</a>
|
116
|
+
|
105
117
|
</div>
|
106
118
|
</div>
|
107
119
|
|
108
120
|
</div>
|
109
121
|
|
110
|
-
|
111
122
|
<!-- if includes -->
|
112
123
|
|
113
124
|
<div id="section">
|
114
125
|
|
115
126
|
|
116
127
|
|
117
|
-
|
118
|
-
|
119
128
|
<div id="attribute-list">
|
120
129
|
<h3 class="section-bar">Attributes</h3>
|
121
130
|
|
122
131
|
<div class="name-list">
|
123
132
|
<table>
|
133
|
+
|
124
134
|
<tr class="top-aligned-row context-row">
|
125
135
|
<td class="context-item-name">bytes</td>
|
136
|
+
|
126
137
|
<td class="context-item-value"> [RW] </td>
|
138
|
+
|
127
139
|
<td class="context-item-desc"></td>
|
128
140
|
</tr>
|
141
|
+
|
129
142
|
</table>
|
130
143
|
</div>
|
131
144
|
</div>
|
132
|
-
|
133
145
|
|
134
146
|
|
135
147
|
<!-- if method_list -->
|
148
|
+
|
136
149
|
<div id="methods">
|
150
|
+
|
137
151
|
<h3 class="section-bar">Public Class methods</h3>
|
138
152
|
|
139
|
-
|
140
|
-
|
153
|
+
|
154
|
+
<div id="method-M000088" class="method-detail">
|
155
|
+
<a name="M000088"></a>
|
141
156
|
|
142
157
|
<div class="method-heading">
|
143
|
-
|
158
|
+
|
159
|
+
<a href="#M000088" class="method-signature">
|
160
|
+
|
144
161
|
<span class="method-name">decode64</span><span class="method-args">(s)</span>
|
162
|
+
|
145
163
|
</a>
|
164
|
+
|
146
165
|
</div>
|
147
|
-
|
166
|
+
|
148
167
|
<div class="method-description">
|
168
|
+
|
149
169
|
<p>
|
150
170
|
Decodes the specified base-64 encoded string and returns a corresponding <a
|
151
171
|
href="SdlBinary.html">SdlBinary</a> instance. <tt>s</tt> might not include
|
152
172
|
the conventional starting and ending square brackets.
|
153
173
|
</p>
|
174
|
+
|
154
175
|
<p><a class="source-toggle" href="#"
|
155
|
-
onclick="toggleCode('
|
156
|
-
<div class="method-source-code" id="
|
176
|
+
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
177
|
+
<div class="method-source-code" id="M000088-source">
|
157
178
|
<pre>
|
158
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line
|
179
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line 57</span>
|
159
180
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode64</span>(<span class="ruby-identifier">s</span>)
|
160
181
|
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"\n\r\t "</span>)
|
161
182
|
|
@@ -169,52 +190,68 @@ the conventional starting and ending square brackets.
|
|
169
190
|
<span class="ruby-keyword kw">end</span>
|
170
191
|
</pre>
|
171
192
|
</div>
|
193
|
+
|
172
194
|
</div>
|
173
195
|
</div>
|
174
196
|
|
175
|
-
|
176
|
-
|
197
|
+
|
198
|
+
<div id="method-M000083" class="method-detail">
|
199
|
+
<a name="M000083"></a>
|
177
200
|
|
178
201
|
<div class="method-heading">
|
179
|
-
|
202
|
+
|
203
|
+
<a href="#M000083" class="method-signature">
|
204
|
+
|
180
205
|
<span class="method-name">new</span><span class="method-args">(bytes)</span>
|
206
|
+
|
181
207
|
</a>
|
208
|
+
|
182
209
|
</div>
|
183
|
-
|
210
|
+
|
184
211
|
<div class="method-description">
|
212
|
+
|
185
213
|
<p>
|
186
214
|
<tt>value</tt>: a String containing the bytes
|
187
215
|
</p>
|
216
|
+
|
188
217
|
<p><a class="source-toggle" href="#"
|
189
|
-
onclick="toggleCode('
|
190
|
-
<div class="method-source-code" id="
|
218
|
+
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
219
|
+
<div class="method-source-code" id="M000083-source">
|
191
220
|
<pre>
|
192
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line
|
221
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line 33</span>
|
193
222
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">bytes</span>)
|
194
223
|
<span class="ruby-ivar">@bytes</span> = <span class="ruby-identifier">bytes</span>
|
195
224
|
<span class="ruby-keyword kw">end</span>
|
196
225
|
</pre>
|
197
226
|
</div>
|
227
|
+
|
198
228
|
</div>
|
199
229
|
</div>
|
200
230
|
|
231
|
+
|
201
232
|
<h3 class="section-bar">Public Instance methods</h3>
|
202
233
|
|
203
|
-
|
204
|
-
|
234
|
+
|
235
|
+
<div id="method-M000084" class="method-detail">
|
236
|
+
<a name="M000084"></a>
|
205
237
|
|
206
238
|
<div class="method-heading">
|
207
|
-
|
239
|
+
|
240
|
+
<a href="#M000084" class="method-signature">
|
241
|
+
|
208
242
|
<span class="method-name">==</span><span class="method-args">(o)</span>
|
243
|
+
|
209
244
|
</a>
|
245
|
+
|
210
246
|
</div>
|
211
|
-
|
247
|
+
|
212
248
|
<div class="method-description">
|
249
|
+
|
213
250
|
<p><a class="source-toggle" href="#"
|
214
|
-
onclick="toggleCode('
|
215
|
-
<div class="method-source-code" id="
|
251
|
+
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
252
|
+
<div class="method-source-code" id="M000084-source">
|
216
253
|
<pre>
|
217
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line
|
254
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line 37</span>
|
218
255
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">o</span>)
|
219
256
|
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">equal?</span>(<span class="ruby-identifier">o</span>)
|
220
257
|
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>)
|
@@ -222,82 +259,105 @@ the conventional starting and ending square brackets.
|
|
222
259
|
<span class="ruby-keyword kw">end</span>
|
223
260
|
</pre>
|
224
261
|
</div>
|
262
|
+
|
225
263
|
</div>
|
226
264
|
</div>
|
227
265
|
|
228
|
-
|
229
|
-
|
266
|
+
|
267
|
+
<div id="method-M000085" class="method-detail">
|
268
|
+
<a name="M000085"></a>
|
230
269
|
|
231
270
|
<div class="method-heading">
|
271
|
+
|
232
272
|
<span class="method-name">eql?</span><span class="method-args">(o)</span>
|
273
|
+
|
233
274
|
</div>
|
234
|
-
|
275
|
+
|
235
276
|
<div class="method-description">
|
277
|
+
|
236
278
|
<p>
|
237
279
|
Alias for #==
|
238
280
|
</p>
|
281
|
+
|
239
282
|
</div>
|
240
283
|
</div>
|
241
284
|
|
242
|
-
|
243
|
-
|
285
|
+
|
286
|
+
<div id="method-M000086" class="method-detail">
|
287
|
+
<a name="M000086"></a>
|
244
288
|
|
245
289
|
<div class="method-heading">
|
246
|
-
|
290
|
+
|
291
|
+
<a href="#M000086" class="method-signature">
|
292
|
+
|
247
293
|
<span class="method-name">hash</span><span class="method-args">()</span>
|
294
|
+
|
248
295
|
</a>
|
296
|
+
|
249
297
|
</div>
|
250
|
-
|
298
|
+
|
251
299
|
<div class="method-description">
|
300
|
+
|
252
301
|
<p><a class="source-toggle" href="#"
|
253
|
-
onclick="toggleCode('
|
254
|
-
<div class="method-source-code" id="
|
302
|
+
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
303
|
+
<div class="method-source-code" id="M000086-source">
|
255
304
|
<pre>
|
256
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line
|
305
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line 45</span>
|
257
306
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash</span>
|
258
307
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bytes</span>.<span class="ruby-identifier">hash</span>
|
259
308
|
<span class="ruby-keyword kw">end</span>
|
260
309
|
</pre>
|
261
310
|
</div>
|
311
|
+
|
262
312
|
</div>
|
263
313
|
</div>
|
264
314
|
|
265
|
-
|
266
|
-
|
315
|
+
|
316
|
+
<div id="method-M000087" class="method-detail">
|
317
|
+
<a name="M000087"></a>
|
267
318
|
|
268
319
|
<div class="method-heading">
|
269
|
-
|
320
|
+
|
321
|
+
<a href="#M000087" class="method-signature">
|
322
|
+
|
270
323
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
324
|
+
|
271
325
|
</a>
|
326
|
+
|
272
327
|
</div>
|
273
|
-
|
328
|
+
|
274
329
|
<div class="method-description">
|
330
|
+
|
275
331
|
<p>
|
276
332
|
Returns the bytes base64-encoded.
|
277
333
|
</p>
|
334
|
+
|
278
335
|
<p><a class="source-toggle" href="#"
|
279
|
-
onclick="toggleCode('
|
280
|
-
<div class="method-source-code" id="
|
336
|
+
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
337
|
+
<div class="method-source-code" id="M000087-source">
|
281
338
|
<pre>
|
282
|
-
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line
|
339
|
+
<span class="ruby-comment cmt"># File lib/sdl4r/sdl_binary.rb, line 50</span>
|
283
340
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
284
341
|
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">Base64</span>.<span class="ruby-identifier">encode64</span>(<span class="ruby-identifier">bytes</span>)
|
285
342
|
<span class="ruby-keyword kw">end</span>
|
286
343
|
</pre>
|
287
344
|
</div>
|
345
|
+
|
288
346
|
</div>
|
289
347
|
</div>
|
290
348
|
|
291
349
|
|
350
|
+
|
292
351
|
</div>
|
293
352
|
|
294
353
|
|
295
|
-
</div>
|
296
354
|
|
297
355
|
|
356
|
+
</div>
|
357
|
+
|
298
358
|
<div id="validator-badges">
|
299
359
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
300
360
|
</div>
|
301
361
|
|
302
362
|
</body>
|
303
|
-
</html>
|
363
|
+
</html>
|