sdl4r 0.9.5 → 0.9.6
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 +11 -2
- data/Rakefile +1 -1
- data/TODO +9 -1
- data/doc/classes/SDL4R.html +42 -196
- data/doc/classes/SDL4R/Parser.html +45 -107
- data/doc/classes/SDL4R/SdlBinary.html +59 -119
- data/doc/classes/SDL4R/SdlParseError.html +28 -50
- data/doc/classes/SDL4R/SdlTimeSpan.html +257 -475
- data/doc/classes/SDL4R/Tag.html +497 -828
- data/doc/created.rid +1 -1
- data/doc/files/CHANGELOG.html +46 -18
- data/doc/files/LICENSE.html +51 -42
- data/doc/files/README.html +42 -32
- data/doc/files/lib/sdl4r/parser/reader_rb.html +21 -11
- data/doc/files/lib/sdl4r/parser/time_span_with_zone_rb.html +21 -11
- data/doc/files/lib/sdl4r/parser/token_rb.html +21 -11
- data/doc/files/lib/sdl4r/parser/tokenizer_rb.html +21 -11
- data/doc/files/lib/sdl4r/parser_rb.html +21 -14
- data/doc/files/lib/sdl4r/sdl4r_rb.html +23 -18
- data/doc/files/lib/sdl4r/sdl_binary_rb.html +21 -11
- data/doc/files/lib/sdl4r/sdl_parse_error_rb.html +21 -11
- data/doc/files/lib/sdl4r/sdl_time_span_rb.html +21 -11
- data/doc/files/lib/sdl4r/tag_rb.html +23 -18
- data/doc/files/lib/sdl4r_rb.html +21 -11
- data/doc/fr_class_index.html +11 -14
- data/doc/fr_file_index.html +11 -22
- data/doc/fr_method_index.html +90 -175
- data/doc/index.html +7 -4
- data/doc/rdoc-style.css +119 -210
- data/lib/sdl4r/tag.rb +23 -12
- data/test/sdl4r/tag_test.rb +53 -0
- metadata +9 -4
data/doc/index.html
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
5
|
+
|
4
6
|
<!--
|
5
7
|
|
6
8
|
RDoc: Simple Declarative Language for Ruby
|
7
9
|
|
8
10
|
-->
|
11
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
9
12
|
<head>
|
10
13
|
<title>RDoc: Simple Declarative Language for Ruby</title>
|
11
14
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
@@ -18,4 +21,4 @@
|
|
18
21
|
</frameset>
|
19
22
|
<frame src="files/README.html" name="docwin" />
|
20
23
|
</frameset>
|
21
|
-
</html>
|
24
|
+
</html>
|
data/doc/rdoc-style.css
CHANGED
@@ -1,46 +1,29 @@
|
|
1
|
-
body {
|
2
|
-
font-family: Verdana,Arial,Helvetica,sans-serif;
|
3
|
-
font-size: 90%;
|
4
|
-
margin: 0;
|
5
|
-
margin-left: 40px;
|
6
|
-
padding: 0;
|
7
|
-
background: white;
|
8
|
-
color: black;
|
9
|
-
}
|
10
|
-
|
11
|
-
h1, h2, h3, h4 {
|
12
|
-
margin: 0;
|
13
|
-
background: transparent;
|
14
|
-
}
|
15
|
-
|
16
|
-
h1 {
|
17
|
-
font-size: 150%;
|
18
|
-
}
|
19
1
|
|
20
|
-
|
21
|
-
|
2
|
+
body {
|
3
|
+
font-family: Verdana,Arial,Helvetica,sans-serif;
|
4
|
+
font-size: 90%;
|
5
|
+
margin: 0;
|
6
|
+
margin-left: 40px;
|
7
|
+
padding: 0;
|
8
|
+
background: white;
|
22
9
|
}
|
23
10
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
text-decoration: none;
|
28
|
-
}
|
11
|
+
h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
|
12
|
+
h1 { font-size: 150%; }
|
13
|
+
h2,h3,h4 { margin-top: 1em; }
|
29
14
|
|
30
|
-
:
|
31
|
-
|
32
|
-
color: #eef;
|
33
|
-
}
|
15
|
+
a { background: #eef; color: #039; text-decoration: none; }
|
16
|
+
a:hover { background: #039; color: #eef; }
|
34
17
|
|
35
18
|
/* Override the base stylesheet's Anchor inside a table cell */
|
36
|
-
td >
|
19
|
+
td > a {
|
37
20
|
background: transparent;
|
38
21
|
color: #039;
|
39
22
|
text-decoration: none;
|
40
23
|
}
|
41
24
|
|
42
25
|
/* and inside a section title */
|
43
|
-
.section-title >
|
26
|
+
.section-title > a {
|
44
27
|
background: transparent;
|
45
28
|
color: #eee;
|
46
29
|
text-decoration: none;
|
@@ -48,252 +31,178 @@ td > :link, td > :visited {
|
|
48
31
|
|
49
32
|
/* === Structural elements =================================== */
|
50
33
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
34
|
+
div#index {
|
35
|
+
margin: 0;
|
36
|
+
margin-left: -40px;
|
37
|
+
padding: 0;
|
38
|
+
font-size: 90%;
|
56
39
|
}
|
57
40
|
|
58
|
-
|
59
|
-
|
41
|
+
|
42
|
+
div#index a {
|
43
|
+
margin-left: 0.7em;
|
60
44
|
}
|
61
45
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
46
|
+
div#index .section-bar {
|
47
|
+
margin-left: 0px;
|
48
|
+
padding-left: 0.7em;
|
49
|
+
background: #ccc;
|
50
|
+
font-size: small;
|
67
51
|
}
|
68
52
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
53
|
+
|
54
|
+
div#classHeader, div#fileHeader {
|
55
|
+
width: auto;
|
56
|
+
color: white;
|
57
|
+
padding: 0.5em 1.5em 0.5em 1.5em;
|
58
|
+
margin: 0;
|
59
|
+
margin-left: -40px;
|
60
|
+
border-bottom: 3px solid #006;
|
76
61
|
}
|
77
62
|
|
78
|
-
#classHeader
|
79
|
-
|
80
|
-
|
81
|
-
color: white;
|
63
|
+
div#classHeader a, div#fileHeader a {
|
64
|
+
background: inherit;
|
65
|
+
color: white;
|
82
66
|
}
|
83
67
|
|
84
|
-
#classHeader td, #fileHeader td {
|
85
|
-
|
86
|
-
|
68
|
+
div#classHeader td, div#fileHeader td {
|
69
|
+
background: inherit;
|
70
|
+
color: white;
|
87
71
|
}
|
88
72
|
|
89
|
-
|
90
|
-
|
73
|
+
|
74
|
+
div#fileHeader {
|
75
|
+
background: #057;
|
91
76
|
}
|
92
77
|
|
93
|
-
#classHeader {
|
94
|
-
|
78
|
+
div#classHeader {
|
79
|
+
background: #048;
|
95
80
|
}
|
96
81
|
|
82
|
+
|
97
83
|
.class-name-in-header {
|
98
84
|
font-size: 180%;
|
99
85
|
font-weight: bold;
|
100
86
|
}
|
101
87
|
|
102
|
-
#bodyContent {
|
103
|
-
padding: 0 1.5em 0 1.5em;
|
104
|
-
}
|
105
88
|
|
106
|
-
#
|
107
|
-
|
108
|
-
background: #efefef;
|
109
|
-
border: 1px dotted #999;
|
89
|
+
div#bodyContent {
|
90
|
+
padding: 0 1.5em 0 1.5em;
|
110
91
|
}
|
111
92
|
|
112
|
-
#description
|
113
|
-
|
114
|
-
|
115
|
-
|
93
|
+
div#description {
|
94
|
+
padding: 0.5em 1.5em;
|
95
|
+
background: #efefef;
|
96
|
+
border: 1px dotted #999;
|
116
97
|
}
|
117
98
|
|
118
|
-
#
|
119
|
-
|
99
|
+
div#description h1,h2,h3,h4,h5,h6 {
|
100
|
+
color: #125;;
|
101
|
+
background: transparent;
|
120
102
|
}
|
121
103
|
|
122
|
-
#validator-badges
|
123
|
-
|
104
|
+
div#validator-badges {
|
105
|
+
text-align: center;
|
124
106
|
}
|
107
|
+
div#validator-badges img { border: 0; }
|
125
108
|
|
126
|
-
#copyright {
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
109
|
+
div#copyright {
|
110
|
+
color: #333;
|
111
|
+
background: #efefef;
|
112
|
+
font: 0.75em sans-serif;
|
113
|
+
margin-top: 5em;
|
114
|
+
margin-bottom: 0;
|
115
|
+
padding: 0.5em 2em;
|
133
116
|
}
|
134
117
|
|
118
|
+
|
135
119
|
/* === Classes =================================== */
|
136
120
|
|
137
121
|
table.header-table {
|
138
|
-
|
139
|
-
|
122
|
+
color: white;
|
123
|
+
font-size: small;
|
140
124
|
}
|
141
125
|
|
142
126
|
.type-note {
|
143
|
-
|
144
|
-
|
127
|
+
font-size: small;
|
128
|
+
color: #DEDEDE;
|
145
129
|
}
|
146
130
|
|
147
|
-
.
|
148
|
-
|
149
|
-
|
150
|
-
|
131
|
+
.xxsection-bar {
|
132
|
+
background: #eee;
|
133
|
+
color: #333;
|
134
|
+
padding: 3px;
|
151
135
|
}
|
152
136
|
|
153
|
-
.section-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
margin-top: 2em;
|
158
|
-
margin-left: -30px;
|
159
|
-
border: 1px solid #999;
|
137
|
+
.section-bar {
|
138
|
+
color: #333;
|
139
|
+
border-bottom: 1px solid #999;
|
140
|
+
margin-left: -20px;
|
160
141
|
}
|
161
142
|
|
162
|
-
.top-aligned-row {
|
163
|
-
vertical-align: top
|
164
|
-
}
|
165
143
|
|
166
|
-
.
|
167
|
-
|
144
|
+
.section-title {
|
145
|
+
background: #79a;
|
146
|
+
color: #eee;
|
147
|
+
padding: 3px;
|
148
|
+
margin-top: 2em;
|
149
|
+
margin-left: -30px;
|
150
|
+
border: 1px solid #999;
|
168
151
|
}
|
169
152
|
|
170
|
-
|
171
|
-
|
172
|
-
}
|
153
|
+
.top-aligned-row { vertical-align: top }
|
154
|
+
.bottom-aligned-row { vertical-align: bottom }
|
173
155
|
|
174
156
|
/* --- Context section classes ----------------------- */
|
175
157
|
|
176
158
|
.context-row { }
|
177
|
-
|
178
|
-
.context-item-
|
179
|
-
|
180
|
-
font-weight: bold;
|
181
|
-
color: black;
|
182
|
-
}
|
183
|
-
|
184
|
-
.context-item-value {
|
185
|
-
font-size: small;
|
186
|
-
color: #448;
|
187
|
-
}
|
188
|
-
|
189
|
-
.context-item-desc {
|
190
|
-
color: #333;
|
191
|
-
padding-left: 2em;
|
192
|
-
}
|
159
|
+
.context-item-name { font-family: monospace; font-weight: bold; color: black; }
|
160
|
+
.context-item-value { font-size: small; color: #448; }
|
161
|
+
.context-item-desc { color: #333; padding-left: 2em; }
|
193
162
|
|
194
163
|
/* --- Method classes -------------------------- */
|
195
|
-
|
196
164
|
.method-detail {
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
165
|
+
background: #efefef;
|
166
|
+
padding: 0;
|
167
|
+
margin-top: 0.5em;
|
168
|
+
margin-bottom: 1em;
|
169
|
+
border: 1px dotted #ccc;
|
202
170
|
}
|
203
|
-
|
204
171
|
.method-heading {
|
205
172
|
color: black;
|
206
173
|
background: #ccc;
|
207
174
|
border-bottom: 1px solid #666;
|
208
175
|
padding: 0.2em 0.5em 0 0.5em;
|
209
176
|
}
|
210
|
-
|
211
|
-
.method-
|
212
|
-
|
213
|
-
|
214
|
-
}
|
215
|
-
|
216
|
-
.method-name {
|
217
|
-
font-weight: bold;
|
218
|
-
}
|
219
|
-
|
220
|
-
.method-args {
|
221
|
-
font-style: italic;
|
222
|
-
}
|
223
|
-
|
224
|
-
.method-description {
|
225
|
-
padding: 0 0.5em 0 0.5em;
|
226
|
-
}
|
177
|
+
.method-signature { color: black; background: inherit; }
|
178
|
+
.method-name { font-weight: bold; }
|
179
|
+
.method-args { font-style: italic; }
|
180
|
+
.method-description { padding: 0 0.5em 0 0.5em; }
|
227
181
|
|
228
182
|
/* --- Source code sections -------------------- */
|
229
183
|
|
230
|
-
|
231
|
-
font-size: 90%;
|
232
|
-
}
|
233
|
-
|
184
|
+
a.source-toggle { font-size: 90%; }
|
234
185
|
div.method-source-code {
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
186
|
+
background: #262626;
|
187
|
+
color: #ffdead;
|
188
|
+
margin: 1em;
|
189
|
+
padding: 0.5em;
|
190
|
+
border: 1px dashed #999;
|
191
|
+
overflow: hidden;
|
241
192
|
}
|
242
193
|
|
243
|
-
div.method-source-code pre {
|
244
|
-
color: #ffdead;
|
245
|
-
}
|
194
|
+
div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
246
195
|
|
247
196
|
/* --- Ruby keyword styles --------------------- */
|
248
197
|
|
249
|
-
.standalone-code {
|
250
|
-
|
251
|
-
color: #
|
252
|
-
|
253
|
-
}
|
254
|
-
|
255
|
-
.ruby-
|
256
|
-
|
257
|
-
|
258
|
-
}
|
259
|
-
|
260
|
-
.ruby-keyword {
|
261
|
-
color: #00ffff;
|
262
|
-
background: transparent;
|
263
|
-
}
|
264
|
-
|
265
|
-
.ruby-ivar {
|
266
|
-
color: #eedd82;
|
267
|
-
background: transparent;
|
268
|
-
}
|
269
|
-
|
270
|
-
.ruby-operator {
|
271
|
-
color: #00ffee;
|
272
|
-
background: transparent;
|
273
|
-
}
|
274
|
-
|
275
|
-
.ruby-identifier {
|
276
|
-
color: #ffdead;
|
277
|
-
background: transparent;
|
278
|
-
}
|
279
|
-
|
280
|
-
.ruby-node {
|
281
|
-
color: #ffa07a;
|
282
|
-
background: transparent;
|
283
|
-
}
|
284
|
-
|
285
|
-
.ruby-comment {
|
286
|
-
color: #b22222;
|
287
|
-
font-weight: bold;
|
288
|
-
background: transparent;
|
289
|
-
}
|
290
|
-
|
291
|
-
.ruby-regexp {
|
292
|
-
color: #ffa07a;
|
293
|
-
background: transparent;
|
294
|
-
}
|
295
|
-
|
296
|
-
.ruby-value {
|
297
|
-
color: #7fffd4;
|
298
|
-
background: transparent;
|
299
|
-
}
|
198
|
+
.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
|
199
|
+
|
200
|
+
.ruby-constant { color: #7fffd4; background: transparent; }
|
201
|
+
.ruby-keyword { color: #00ffff; background: transparent; }
|
202
|
+
.ruby-ivar { color: #eedd82; background: transparent; }
|
203
|
+
.ruby-operator { color: #00ffee; background: transparent; }
|
204
|
+
.ruby-identifier { color: #ffdead; background: transparent; }
|
205
|
+
.ruby-node { color: #ffa07a; background: transparent; }
|
206
|
+
.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
|
207
|
+
.ruby-regexp { color: #ffa07a; background: transparent; }
|
208
|
+
.ruby-value { color: #7fffd4; background: transparent; }
|
data/lib/sdl4r/tag.rb
CHANGED
@@ -485,8 +485,8 @@ module SDL4R
|
|
485
485
|
# namespace is non-blank and is not a legal SDL identifier, or the
|
486
486
|
# value is not a legal SDL type
|
487
487
|
#
|
488
|
-
def set_attribute(namespace, key, value =
|
489
|
-
if value
|
488
|
+
def set_attribute(namespace, key, value = :default)
|
489
|
+
if value == :default
|
490
490
|
value = key
|
491
491
|
key = namespace
|
492
492
|
namespace = ""
|
@@ -722,27 +722,38 @@ module SDL4R
|
|
722
722
|
end
|
723
723
|
private_methods :read_io
|
724
724
|
|
725
|
-
# Write this tag out to the given IO or
|
725
|
+
# Write this tag out to the given IO or StringIO or String (optionally clipping the root.)
|
726
|
+
# Returns +output+.
|
726
727
|
#
|
727
|
-
# +
|
728
|
-
# +
|
729
|
-
#
|
728
|
+
# +output+:: an IO or StringIO or a String to write to
|
729
|
+
# +include_root+:: if true this tag will be written out as the root element, if false only the
|
730
|
+
# children will be written. False by default.
|
730
731
|
#
|
731
732
|
def write(output, include_root = false)
|
732
|
-
|
733
|
+
if output.is_a? String
|
734
|
+
io = StringIO.new(output)
|
735
|
+
close_io = true # indicates we close the IO ourselves
|
736
|
+
elsif output.is_a? IO or output.is_a? StringIO
|
737
|
+
io = output
|
738
|
+
close_io = false # let the caller close the IO
|
739
|
+
else
|
740
|
+
raise ArgumentError, "'output' should be a String or an IO but was #{output.class}"
|
741
|
+
end
|
733
742
|
|
734
743
|
if include_root
|
735
744
|
io << to_s
|
736
745
|
else
|
737
|
-
|
738
|
-
|
739
|
-
|
746
|
+
first = true
|
747
|
+
children do |child|
|
748
|
+
io << $/ unless first
|
749
|
+
first = false
|
750
|
+
io << child.to_s
|
740
751
|
end
|
741
752
|
end
|
742
753
|
|
743
|
-
io.close()
|
754
|
+
io.close() if close_io
|
744
755
|
|
745
|
-
|
756
|
+
output
|
746
757
|
end
|
747
758
|
|
748
759
|
#
|