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.
@@ -1,11 +1,14 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
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>
@@ -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
- h2,h3,h4 {
21
- margin-top: 1em;
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
- :link, :visited {
25
- background: #eef;
26
- color: #039;
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
- :link:hover, :visited:hover {
31
- background: #039;
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 > :link, td > :visited {
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 > :link, .section-title > :visited {
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
- .index {
52
- margin: 0;
53
- margin-left: -40px;
54
- padding: 0;
55
- font-size: 90%;
34
+ div#index {
35
+ margin: 0;
36
+ margin-left: -40px;
37
+ padding: 0;
38
+ font-size: 90%;
56
39
  }
57
40
 
58
- .index :link, .index :visited {
59
- margin-left: 0.7em;
41
+
42
+ div#index a {
43
+ margin-left: 0.7em;
60
44
  }
61
45
 
62
- .index .section-bar {
63
- margin-left: 0px;
64
- padding-left: 0.7em;
65
- background: #ccc;
66
- font-size: small;
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
- #classHeader, #fileHeader {
70
- width: auto;
71
- color: white;
72
- padding: 0.5em 1.5em 0.5em 1.5em;
73
- margin: 0;
74
- margin-left: -40px;
75
- border-bottom: 3px solid #006;
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 :link, #fileHeader :link,
79
- #classHeader :visited, #fileHeader :visited {
80
- background: inherit;
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
- background: inherit;
86
- color: white;
68
+ div#classHeader td, div#fileHeader td {
69
+ background: inherit;
70
+ color: white;
87
71
  }
88
72
 
89
- #fileHeader {
90
- background: #057;
73
+
74
+ div#fileHeader {
75
+ background: #057;
91
76
  }
92
77
 
93
- #classHeader {
94
- background: #048;
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
- #description {
107
- padding: 0.5em 1.5em;
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 h1, #description h2, #description h3,
113
- #description h4, #description h5, #description h6 {
114
- color: #125;
115
- background: transparent;
93
+ div#description {
94
+ padding: 0.5em 1.5em;
95
+ background: #efefef;
96
+ border: 1px dotted #999;
116
97
  }
117
98
 
118
- #validator-badges {
119
- text-align: center;
99
+ div#description h1,h2,h3,h4,h5,h6 {
100
+ color: #125;;
101
+ background: transparent;
120
102
  }
121
103
 
122
- #validator-badges img {
123
- border: 0;
104
+ div#validator-badges {
105
+ text-align: center;
124
106
  }
107
+ div#validator-badges img { border: 0; }
125
108
 
126
- #copyright {
127
- color: #333;
128
- background: #efefef;
129
- font: 0.75em sans-serif;
130
- margin-top: 5em;
131
- margin-bottom: 0;
132
- padding: 0.5em 2em;
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
- color: white;
139
- font-size: small;
122
+ color: white;
123
+ font-size: small;
140
124
  }
141
125
 
142
126
  .type-note {
143
- font-size: small;
144
- color: #dedede;
127
+ font-size: small;
128
+ color: #DEDEDE;
145
129
  }
146
130
 
147
- .section-bar {
148
- color: #333;
149
- border-bottom: 1px solid #999;
150
- margin-left: -20px;
131
+ .xxsection-bar {
132
+ background: #eee;
133
+ color: #333;
134
+ padding: 3px;
151
135
  }
152
136
 
153
- .section-title {
154
- background: #79a;
155
- color: #eee;
156
- padding: 3px;
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
- .bottom-aligned-row {
167
- vertical-align: bottom
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
- #diagram img {
171
- border: 0;
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-name {
179
- font-family: monospace;
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
- background: #efefef;
198
- padding: 0;
199
- margin-top: 0.5em;
200
- margin-bottom: 1em;
201
- border: 1px dotted #ccc;
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-signature {
212
- color: black;
213
- background: inherit;
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
- :link.source-toggle, :visited.source-toggle {
231
- font-size: 90%;
232
- }
233
-
184
+ a.source-toggle { font-size: 90%; }
234
185
  div.method-source-code {
235
- background: #262626;
236
- color: #ffdead;
237
- margin: 1em;
238
- padding: 0.5em;
239
- border: 1px dashed #999;
240
- overflow: auto;
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
- background: #221111;
251
- color: #ffdead;
252
- overflow: auto;
253
- }
254
-
255
- .ruby-constant {
256
- color: #7fffd4;
257
- background: transparent;
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; }
@@ -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 = nil)
489
- if value.nil?
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 string (optionally clipping the root.)
725
+ # Write this tag out to the given IO or StringIO or String (optionally clipping the root.)
726
+ # Returns +output+.
726
727
  #
727
- # +writer+:: The writer to which we will write this tag
728
- # +includeRoot+:: If true this tag will be written out as the root
729
- # element, if false only the children will be written
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
- io = (output.is_a?(String))? StringIO.new(output) : output
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
- each_child do |child, index|
738
- io << $/ if index > 0
739
- child.write(io)
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
- nil
756
+ output
746
757
  end
747
758
 
748
759
  #