atom-tools 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/README +3 -3
  2. data/Rakefile +1 -1
  3. data/bin/atom-client.rb +13 -10
  4. data/lib/atom/collection.rb +2 -2
  5. data/lib/atom/element.rb +5 -1
  6. data/lib/atom/entry.rb +9 -2
  7. data/lib/atom/feed.rb +11 -6
  8. data/lib/atom/http.rb +157 -38
  9. data/lib/atom/service.rb +170 -0
  10. data/lib/atom/text.rb +15 -2
  11. data/lib/atom/xml.rb +1 -1
  12. data/test/conformance/updated.rb +2 -1
  13. data/test/test_constructs.rb +45 -2
  14. data/test/test_feed.rb +27 -0
  15. data/test/test_http.rb +116 -20
  16. data/test/test_protocol.rb +77 -13
  17. data/test/test_xml.rb +15 -1
  18. metadata +3 -38
  19. data/bin/atom-server.rb~ +0 -71
  20. data/doc/classes/Atom/App.html +0 -217
  21. data/doc/classes/Atom/Author.html +0 -130
  22. data/doc/classes/Atom/Category.html +0 -128
  23. data/doc/classes/Atom/Collection.html +0 -322
  24. data/doc/classes/Atom/Content.html +0 -129
  25. data/doc/classes/Atom/Contributor.html +0 -119
  26. data/doc/classes/Atom/Element.html +0 -325
  27. data/doc/classes/Atom/Entry.html +0 -365
  28. data/doc/classes/Atom/Feed.html +0 -585
  29. data/doc/classes/Atom/HTTP.html +0 -374
  30. data/doc/classes/Atom/Link.html +0 -137
  31. data/doc/classes/Atom/Text.html +0 -229
  32. data/doc/classes/XHTML.html +0 -118
  33. data/doc/created.rid +0 -1
  34. data/doc/files/README.html +0 -213
  35. data/doc/files/lib/atom/app_rb.html +0 -110
  36. data/doc/files/lib/atom/collection_rb.html +0 -110
  37. data/doc/files/lib/atom/element_rb.html +0 -109
  38. data/doc/files/lib/atom/entry_rb.html +0 -111
  39. data/doc/files/lib/atom/feed_rb.html +0 -112
  40. data/doc/files/lib/atom/http_rb.html +0 -109
  41. data/doc/files/lib/atom/text_rb.html +0 -108
  42. data/doc/files/lib/atom/xml_rb.html +0 -110
  43. data/doc/files/lib/atom/yaml_rb.html +0 -109
  44. data/doc/fr_class_index.html +0 -39
  45. data/doc/fr_file_index.html +0 -36
  46. data/doc/fr_method_index.html +0 -62
  47. data/doc/index.html +0 -24
  48. data/doc/rdoc-style.css +0 -208
  49. data/lib/atom/app.rb +0 -87
@@ -1,129 +0,0 @@
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: Atom::Content</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">Atom::Content</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/atom/text_rb.html">
59
- lib/atom/text.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="Text.html">
69
- Atom::Text
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
-
83
- <div id="description">
84
- <p>
85
- <a href="Content.html">Atom::Content</a> behaves the same as an <a
86
- href="Text.html">Atom::Text</a>, but for two things:
87
- </p>
88
- <ul>
89
- <li>the &quot;type&quot; attribute can be an arbitrary media type
90
-
91
- </li>
92
- <li>there is a &quot;src&quot; attribute which is an IRI that points to the
93
- content of the entry (in which case the content element will be empty)
94
-
95
- </li>
96
- </ul>
97
-
98
- </div>
99
-
100
-
101
- </div>
102
-
103
-
104
- </div>
105
-
106
-
107
- <!-- if includes -->
108
-
109
- <div id="section">
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
- <!-- if method_list -->
119
-
120
-
121
- </div>
122
-
123
-
124
- <div id="validator-badges">
125
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
126
- </div>
127
-
128
- </body>
129
- </html>
@@ -1,119 +0,0 @@
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: Atom::Contributor</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">Atom::Contributor</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/atom/element_rb.html">
59
- lib/atom/element.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="Element.html">
69
- Atom::Element
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
-
83
- <div id="description">
84
- <p>
85
- same as <a href="Author.html">Atom::Author</a>
86
- </p>
87
-
88
- </div>
89
-
90
-
91
- </div>
92
-
93
-
94
- </div>
95
-
96
-
97
- <!-- if includes -->
98
-
99
- <div id="section">
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
- <!-- if method_list -->
109
-
110
-
111
- </div>
112
-
113
-
114
- <div id="validator-badges">
115
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
116
- </div>
117
-
118
- </body>
119
- </html>
@@ -1,325 +0,0 @@
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: Atom::Element</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">Atom::Element</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/atom/yaml_rb.html">
59
- lib/atom/yaml.rb
60
- </a>
61
- <br />
62
- <a href="../../files/lib/atom/element_rb.html">
63
- lib/atom/element.rb
64
- </a>
65
- <br />
66
- </td>
67
- </tr>
68
-
69
- <tr class="top-aligned-row">
70
- <td><strong>Parent:</strong></td>
71
- <td>
72
- Hash
73
- </td>
74
- </tr>
75
- </table>
76
- </div>
77
- <!-- banner header -->
78
-
79
- <div id="bodyContent">
80
-
81
-
82
-
83
- <div id="contextContent">
84
-
85
-
86
-
87
- </div>
88
-
89
- <div id="method-list">
90
- <h3 class="section-bar">Methods</h3>
91
-
92
- <div class="name-list">
93
- <a href="#M000032">[]</a>&nbsp;&nbsp;
94
- <a href="#M000033">[]=</a>&nbsp;&nbsp;
95
- <a href="#M000034">to_element</a>&nbsp;&nbsp;
96
- <a href="#M000036">to_s</a>&nbsp;&nbsp;
97
- <a href="#M000035">to_xml</a>&nbsp;&nbsp;
98
- </div>
99
- </div>
100
-
101
- </div>
102
-
103
-
104
- <!-- if includes -->
105
-
106
- <div id="section">
107
-
108
-
109
-
110
-
111
-
112
- <div id="attribute-list">
113
- <h3 class="section-bar">Attributes</h3>
114
-
115
- <div class="name-list">
116
- <table>
117
- <tr class="top-aligned-row context-row">
118
- <td class="context-item-name">base</td>
119
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
120
- <td class="context-item-desc">
121
- this element&#8217;s xml:base
122
-
123
- </td>
124
- </tr>
125
- <tr class="top-aligned-row context-row">
126
- <td class="context-item-name">extensions</td>
127
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
128
- <td class="context-item-desc">
129
- a REXML::Element that shares this element&#8217;s extension attributes and
130
- child elements
131
-
132
- </td>
133
- </tr>
134
- </table>
135
- </div>
136
- </div>
137
-
138
-
139
-
140
- <!-- if method_list -->
141
- <div id="methods">
142
- <h3 class="section-bar">Public Instance methods</h3>
143
-
144
- <div id="method-M000032" class="method-detail">
145
- <a name="M000032"></a>
146
-
147
- <div class="method-heading">
148
- <a href="#M000032" class="method-signature">
149
- <span class="method-name">[]</span><span class="method-args">(key)</span>
150
- </a>
151
- </div>
152
-
153
- <div class="method-description">
154
- <p>
155
- get the value of an attribute
156
- </p>
157
- <p><a class="source-toggle" href="#"
158
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
159
- <div class="method-source-code" id="M000032-source">
160
- <pre>
161
- <span class="ruby-comment cmt"># File lib/atom/element.rb, line 115</span>
162
- 115: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-identifier">key</span>
163
- 116: <span class="ruby-identifier">test_key</span> <span class="ruby-identifier">key</span>
164
- 117:
165
- 118: <span class="ruby-keyword kw">super</span>
166
- 119: <span class="ruby-keyword kw">end</span>
167
- </pre>
168
- </div>
169
- </div>
170
- </div>
171
-
172
- <div id="method-M000033" class="method-detail">
173
- <a name="M000033"></a>
174
-
175
- <div class="method-heading">
176
- <a href="#M000033" class="method-signature">
177
- <span class="method-name">[]=</span><span class="method-args">(key, value)</span>
178
- </a>
179
- </div>
180
-
181
- <div class="method-description">
182
- <p>
183
- set the value of an attribute
184
- </p>
185
- <p><a class="source-toggle" href="#"
186
- onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
187
- <div class="method-source-code" id="M000033-source">
188
- <pre>
189
- <span class="ruby-comment cmt"># File lib/atom/element.rb, line 122</span>
190
- 122: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span> <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>
191
- 123: <span class="ruby-identifier">test_key</span> <span class="ruby-identifier">key</span>
192
- 124:
193
- 125: <span class="ruby-keyword kw">super</span>
194
- 126: <span class="ruby-keyword kw">end</span>
195
- </pre>
196
- </div>
197
- </div>
198
- </div>
199
-
200
- <div id="method-M000034" class="method-detail">
201
- <a name="M000034"></a>
202
-
203
- <div class="method-heading">
204
- <a href="#M000034" class="method-signature">
205
- <span class="method-name">to_element</span><span class="method-args">()</span>
206
- </a>
207
- </div>
208
-
209
- <div class="method-description">
210
- <p>
211
- convert to a REXML::Element (with no namespace)
212
- </p>
213
- <p><a class="source-toggle" href="#"
214
- onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
215
- <div class="method-source-code" id="M000034-source">
216
- <pre>
217
- <span class="ruby-comment cmt"># File lib/atom/element.rb, line 147</span>
218
- 147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_element</span>
219
- 148: <span class="ruby-identifier">elem</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Element</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">local_name</span>)
220
- 149:
221
- 150: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">elements</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>,<span class="ruby-identifier">kind</span>,<span class="ruby-identifier">req</span><span class="ruby-operator">|</span>
222
- 151: <span class="ruby-identifier">v</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
223
- 152: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">nil?</span>
224
- 153:
225
- 154: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_element</span>
226
- 155: <span class="ruby-identifier">e</span> = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_element</span>
227
- 156: <span class="ruby-identifier">e</span> = [ <span class="ruby-identifier">e</span> ] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
228
- 157:
229
- 158: <span class="ruby-identifier">e</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">bit</span><span class="ruby-operator">|</span>
230
- 159: <span class="ruby-identifier">elem</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">bit</span>
231
- 160: <span class="ruby-keyword kw">end</span>
232
- 161: <span class="ruby-keyword kw">else</span>
233
- 162: <span class="ruby-identifier">e</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Element</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">elem</span>).<span class="ruby-identifier">text</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
234
- 163: <span class="ruby-keyword kw">end</span>
235
- 164: <span class="ruby-keyword kw">end</span>
236
- 165:
237
- 166: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>,<span class="ruby-identifier">req</span><span class="ruby-operator">|</span>
238
- 167: <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>]
239
- 168: <span class="ruby-identifier">elem</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">value</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>
240
- 169: <span class="ruby-keyword kw">end</span>
241
- 170:
242
- 171: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">extensions</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">element</span><span class="ruby-operator">|</span>
243
- 172: <span class="ruby-identifier">elem</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">element</span>.<span class="ruby-identifier">dup</span> <span class="ruby-comment cmt"># otherwise they get removed from @extensions</span>
244
- 173: <span class="ruby-keyword kw">end</span>
245
- 174:
246
- 175: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">base</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">base</span>.<span class="ruby-identifier">empty?</span>
247
- 176: <span class="ruby-identifier">elem</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;xml:base&quot;</span>] = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">base</span>
248
- 177: <span class="ruby-keyword kw">end</span>
249
- 178:
250
- 179: <span class="ruby-identifier">elem</span>
251
- 180: <span class="ruby-keyword kw">end</span>
252
- </pre>
253
- </div>
254
- </div>
255
- </div>
256
-
257
- <div id="method-M000036" class="method-detail">
258
- <a name="M000036"></a>
259
-
260
- <div class="method-heading">
261
- <a href="#M000036" class="method-signature">
262
- <span class="method-name">to_s</span><span class="method-args">()</span>
263
- </a>
264
- </div>
265
-
266
- <div class="method-description">
267
- <p>
268
- convert to an XML string
269
- </p>
270
- <p><a class="source-toggle" href="#"
271
- onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
272
- <div class="method-source-code" id="M000036-source">
273
- <pre>
274
- <span class="ruby-comment cmt"># File lib/atom/element.rb, line 192</span>
275
- 192: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
276
- 193: <span class="ruby-identifier">to_xml</span>.<span class="ruby-identifier">to_s</span>
277
- 194: <span class="ruby-keyword kw">end</span>
278
- </pre>
279
- </div>
280
- </div>
281
- </div>
282
-
283
- <div id="method-M000035" class="method-detail">
284
- <a name="M000035"></a>
285
-
286
- <div class="method-heading">
287
- <a href="#M000035" class="method-signature">
288
- <span class="method-name">to_xml</span><span class="method-args">()</span>
289
- </a>
290
- </div>
291
-
292
- <div class="method-description">
293
- <p>
294
- convert to a REXML::Document (properly namespaced)
295
- </p>
296
- <p><a class="source-toggle" href="#"
297
- onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
298
- <div class="method-source-code" id="M000035-source">
299
- <pre>
300
- <span class="ruby-comment cmt"># File lib/atom/element.rb, line 183</span>
301
- 183: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>
302
- 184: <span class="ruby-identifier">doc</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>
303
- 185: <span class="ruby-identifier">root</span> = <span class="ruby-identifier">to_element</span>
304
- 186: <span class="ruby-identifier">root</span>.<span class="ruby-identifier">add_namespace</span> <span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">NS</span>
305
- 187: <span class="ruby-identifier">doc</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">root</span>
306
- 188: <span class="ruby-identifier">doc</span>
307
- 189: <span class="ruby-keyword kw">end</span>
308
- </pre>
309
- </div>
310
- </div>
311
- </div>
312
-
313
-
314
- </div>
315
-
316
-
317
- </div>
318
-
319
-
320
- <div id="validator-badges">
321
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
322
- </div>
323
-
324
- </body>
325
- </html>