atom-tools 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/Rakefile +1 -1
  2. data/doc/classes/Atom/AttrEl.html +163 -0
  3. data/doc/classes/Atom/Author.html +113 -0
  4. data/doc/classes/Atom/AutodiscoveryFailure.html +111 -0
  5. data/doc/classes/Atom/Categories.html +168 -0
  6. data/doc/classes/Atom/Category.html +137 -0
  7. data/doc/classes/Atom/Collection.html +425 -0
  8. data/doc/classes/Atom/Content.html +170 -0
  9. data/doc/classes/Atom/Contributor.html +113 -0
  10. data/doc/classes/Atom/Control.html +126 -0
  11. data/doc/classes/Atom/Converters.html +571 -0
  12. data/doc/classes/Atom/DigestAuth.html +285 -0
  13. data/doc/classes/Atom/Element.html +892 -0
  14. data/doc/classes/Atom/FileCache.html +287 -0
  15. data/doc/classes/Atom/HTTP.html +490 -0
  16. data/doc/classes/Atom/HTTPResponse.html +190 -0
  17. data/doc/classes/Atom/HasCategories.html +187 -0
  18. data/doc/classes/Atom/HasLinks.html +168 -0
  19. data/doc/classes/Atom/Link.html +214 -0
  20. data/doc/classes/Atom/NilCache.html +202 -0
  21. data/doc/classes/Atom/ParseError.html +111 -0
  22. data/doc/classes/Atom/Parsers.html +311 -0
  23. data/doc/classes/Atom/Person.html +130 -0
  24. data/doc/classes/Atom/Rights.html +113 -0
  25. data/doc/classes/Atom/Service.html +298 -0
  26. data/doc/classes/Atom/Source.html +111 -0
  27. data/doc/classes/Atom/Subtitle.html +113 -0
  28. data/doc/classes/Atom/Summary.html +113 -0
  29. data/doc/classes/Atom/Text.html +372 -0
  30. data/doc/classes/Atom/Title.html +113 -0
  31. data/doc/classes/Atom/Tools.html +525 -0
  32. data/doc/classes/Atom/Workspace.html +121 -0
  33. data/doc/classes/Object.html +204 -0
  34. data/doc/classes/XHTML.html +118 -0
  35. data/doc/created.rid +1 -0
  36. data/doc/files/README.html +173 -0
  37. data/doc/files/lib/atom/cache_rb.html +302 -0
  38. data/doc/files/lib/atom/collection_rb.html +109 -0
  39. data/doc/files/lib/atom/element_rb.html +110 -0
  40. data/doc/files/lib/atom/entry_rb.html +111 -0
  41. data/doc/files/lib/atom/feed_rb.html +111 -0
  42. data/doc/files/lib/atom/http_rb.html +114 -0
  43. data/doc/files/lib/atom/service_rb.html +112 -0
  44. data/doc/files/lib/atom/text_rb.html +109 -0
  45. data/doc/files/lib/atom/tools_rb.html +108 -0
  46. data/doc/fr_class_index.html +59 -0
  47. data/doc/fr_file_index.html +36 -0
  48. data/doc/fr_method_index.html +137 -0
  49. data/doc/index.html +24 -0
  50. data/doc/rdoc-style.css +208 -0
  51. data/lib/atom/cache.rb +1 -1
  52. data/lib/atom/http.rb +2 -2
  53. data/lib/atom/text.rb +15 -6
  54. data/spec/entry_spec.rb +12 -1
  55. data/spec/feed_spec.rb +20 -1
  56. data/spec/fixtures/contacts-feed.xml +34 -0
  57. data/spec/fixtures/entry-w-xml.xml +24 -0
  58. metadata +68 -5
@@ -0,0 +1,170 @@
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 URI 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
+ <div id="method-list">
104
+ <h3 class="section-bar">Methods</h3>
105
+
106
+ <div class="name-list">
107
+ <a href="#M000048">src=</a>&nbsp;&nbsp;
108
+ </div>
109
+ </div>
110
+
111
+ </div>
112
+
113
+
114
+ <!-- if includes -->
115
+
116
+ <div id="section">
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <!-- if method_list -->
126
+ <div id="methods">
127
+ <h3 class="section-bar">Public Instance methods</h3>
128
+
129
+ <div id="method-M000048" class="method-detail">
130
+ <a name="M000048"></a>
131
+
132
+ <div class="method-heading">
133
+ <a href="#M000048" class="method-signature">
134
+ <span class="method-name">src=</span><span class="method-args">(v)</span>
135
+ </a>
136
+ </div>
137
+
138
+ <div class="method-description">
139
+ <p><a class="source-toggle" href="#"
140
+ onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
141
+ <div class="method-source-code" id="M000048-source">
142
+ <pre>
143
+ <span class="ruby-comment cmt"># File lib/atom/text.rb, line 206</span>
144
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">src=</span> <span class="ruby-identifier">v</span>
145
+ <span class="ruby-ivar">@content</span> = <span class="ruby-keyword kw">nil</span>
146
+
147
+ <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">base</span>
148
+ <span class="ruby-ivar">@src</span> = (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">base</span>.<span class="ruby-identifier">to_uri</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">v</span>).<span class="ruby-identifier">to_s</span>
149
+ <span class="ruby-keyword kw">else</span>
150
+ <span class="ruby-ivar">@src</span> = <span class="ruby-identifier">v</span>
151
+ <span class="ruby-keyword kw">end</span>
152
+ <span class="ruby-keyword kw">end</span>
153
+ </pre>
154
+ </div>
155
+ </div>
156
+ </div>
157
+
158
+
159
+ </div>
160
+
161
+
162
+ </div>
163
+
164
+
165
+ <div id="validator-badges">
166
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
167
+ </div>
168
+
169
+ </body>
170
+ </html>
@@ -0,0 +1,113 @@
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="Person.html">
69
+ Atom::Person
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
+
84
+
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <!-- if method_list -->
103
+
104
+
105
+ </div>
106
+
107
+
108
+ <div id="validator-badges">
109
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
110
+ </div>
111
+
112
+ </body>
113
+ </html>
@@ -0,0 +1,126 @@
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::Control</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::Control</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/atom/entry_rb.html">
59
+ lib/atom/entry.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
+
84
+
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+
96
+
97
+
98
+
99
+ <div id="attribute-list">
100
+ <h3 class="section-bar">Attributes</h3>
101
+
102
+ <div class="name-list">
103
+ <table>
104
+ <tr class="top-aligned-row context-row">
105
+ <td class="context-item-name">draft</td>
106
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
107
+ <td class="context-item-desc"></td>
108
+ </tr>
109
+ </table>
110
+ </div>
111
+ </div>
112
+
113
+
114
+
115
+ <!-- if method_list -->
116
+
117
+
118
+ </div>
119
+
120
+
121
+ <div id="validator-badges">
122
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
123
+ </div>
124
+
125
+ </body>
126
+ </html>
@@ -0,0 +1,571 @@
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>Module: Atom::Converters</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>Module</strong></td>
53
+ <td class="class-name-in-header">Atom::Converters</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
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000046">atom_attrb</a>&nbsp;&nbsp;
84
+ <a href="#M000041">atom_element</a>&nbsp;&nbsp;
85
+ <a href="#M000044">atom_elements</a>&nbsp;&nbsp;
86
+ <a href="#M000047">atom_link</a>&nbsp;&nbsp;
87
+ <a href="#M000037">atom_string</a>&nbsp;&nbsp;
88
+ <a href="#M000039">atom_time</a>&nbsp;&nbsp;
89
+ <a href="#M000045">attrb</a>&nbsp;&nbsp;
90
+ <a href="#M000036">build_plain</a>&nbsp;&nbsp;
91
+ <a href="#M000040">element</a>&nbsp;&nbsp;
92
+ <a href="#M000043">elements</a>&nbsp;&nbsp;
93
+ <a href="#M000042">strings</a>&nbsp;&nbsp;
94
+ <a href="#M000038">time</a>&nbsp;&nbsp;
95
+ </div>
96
+ </div>
97
+
98
+ </div>
99
+
100
+
101
+ <!-- if includes -->
102
+
103
+ <div id="section">
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <!-- if method_list -->
113
+ <div id="methods">
114
+ <h3 class="section-bar">Public Instance methods</h3>
115
+
116
+ <div id="method-M000046" class="method-detail">
117
+ <a name="M000046"></a>
118
+
119
+ <div class="method-heading">
120
+ <a href="#M000046" class="method-signature">
121
+ <span class="method-name">atom_attrb</span><span class="method-args">(name)</span>
122
+ </a>
123
+ </div>
124
+
125
+ <div class="method-description">
126
+ <p>
127
+ an XML attribute in the Atom namespace
128
+ </p>
129
+ <p><a class="source-toggle" href="#"
130
+ onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
131
+ <div class="method-source-code" id="M000046-source">
132
+ <pre>
133
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 304</span>
134
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">atom_attrb</span>(<span class="ruby-identifier">name</span>)
135
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">attrb</span>([<span class="ruby-value str">'atom'</span>, <span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">NS</span>], <span class="ruby-identifier">name</span>)
136
+ <span class="ruby-keyword kw">end</span>
137
+ </pre>
138
+ </div>
139
+ </div>
140
+ </div>
141
+
142
+ <div id="method-M000041" class="method-detail">
143
+ <a name="M000041"></a>
144
+
145
+ <div class="method-heading">
146
+ <a href="#M000041" class="method-signature">
147
+ <span class="method-name">atom_element</span><span class="method-args">(name, klass)</span>
148
+ </a>
149
+ </div>
150
+
151
+ <div class="method-description">
152
+ <p>
153
+ an <a href="Converters.html#M000040">element</a> that is parsed by <a
154
+ href="Element.html">Element</a> descendant &#8216;klass&#8216;
155
+ </p>
156
+ <p><a class="source-toggle" href="#"
157
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
158
+ <div class="method-source-code" id="M000041-source">
159
+ <pre>
160
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 217</span>
161
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">atom_element</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">klass</span>)
162
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">element</span>([<span class="ruby-value str">'atom'</span>, <span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">NS</span>], <span class="ruby-identifier">name</span>, <span class="ruby-identifier">klass</span>)
163
+ <span class="ruby-keyword kw">end</span>
164
+ </pre>
165
+ </div>
166
+ </div>
167
+ </div>
168
+
169
+ <div id="method-M000044" class="method-detail">
170
+ <a name="M000044"></a>
171
+
172
+ <div class="method-heading">
173
+ <a href="#M000044" class="method-signature">
174
+ <span class="method-name">atom_elements</span><span class="method-args">(one_name, many_name, klass)</span>
175
+ </a>
176
+ </div>
177
+
178
+ <div class="method-description">
179
+ <p>
180
+ like <a href="Converters.html#M000043">elements</a> but in the Atom
181
+ namespace
182
+ </p>
183
+ <p><a class="source-toggle" href="#"
184
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
185
+ <div class="method-source-code" id="M000044-source">
186
+ <pre>
187
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 277</span>
188
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">atom_elements</span>(<span class="ruby-identifier">one_name</span>, <span class="ruby-identifier">many_name</span>, <span class="ruby-identifier">klass</span>)
189
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">elements</span>([<span class="ruby-value str">'atom'</span>, <span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">NS</span>], <span class="ruby-identifier">one_name</span>, <span class="ruby-identifier">many_name</span>, <span class="ruby-identifier">klass</span>)
190
+ <span class="ruby-keyword kw">end</span>
191
+ </pre>
192
+ </div>
193
+ </div>
194
+ </div>
195
+
196
+ <div id="method-M000047" class="method-detail">
197
+ <a name="M000047"></a>
198
+
199
+ <div class="method-heading">
200
+ <a href="#M000047" class="method-signature">
201
+ <span class="method-name">atom_link</span><span class="method-args">(name, criteria)</span>
202
+ </a>
203
+ </div>
204
+
205
+ <div class="method-description">
206
+ <p>
207
+ a type of Atom <a href="Link.html">Link</a>. specifics defined by Hash
208
+ &#8216;criteria&#8216;
209
+ </p>
210
+ <p><a class="source-toggle" href="#"
211
+ onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
212
+ <div class="method-source-code" id="M000047-source">
213
+ <pre>
214
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 309</span>
215
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">atom_link</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">criteria</span>
216
+ <span class="ruby-identifier">def_get</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">do</span>
217
+ <span class="ruby-identifier">existing</span> = <span class="ruby-identifier">find_link</span>(<span class="ruby-identifier">criteria</span>)
218
+
219
+ <span class="ruby-identifier">existing</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">existing</span>.<span class="ruby-identifier">href</span>
220
+ <span class="ruby-keyword kw">end</span>
221
+
222
+ <span class="ruby-identifier">def_set</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
223
+ <span class="ruby-identifier">existing</span> = <span class="ruby-identifier">find_link</span>(<span class="ruby-identifier">criteria</span>)
224
+
225
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">existing</span>
226
+ <span class="ruby-identifier">existing</span>.<span class="ruby-identifier">href</span> = <span class="ruby-identifier">value</span>
227
+ <span class="ruby-keyword kw">else</span>
228
+ <span class="ruby-identifier">links</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">criteria</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">:href</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">value</span>)
229
+ <span class="ruby-keyword kw">end</span>
230
+ <span class="ruby-keyword kw">end</span>
231
+ <span class="ruby-keyword kw">end</span>
232
+ </pre>
233
+ </div>
234
+ </div>
235
+ </div>
236
+
237
+ <div id="method-M000037" class="method-detail">
238
+ <a name="M000037"></a>
239
+
240
+ <div class="method-heading">
241
+ <a href="#M000037" class="method-signature">
242
+ <span class="method-name">atom_string</span><span class="method-args">(name)</span>
243
+ </a>
244
+ </div>
245
+
246
+ <div class="method-description">
247
+ <p>
248
+ an <a href="Converters.html#M000040">element</a> in the Atom namespace
249
+ containing text
250
+ </p>
251
+ <p><a class="source-toggle" href="#"
252
+ onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
253
+ <div class="method-source-code" id="M000037-source">
254
+ <pre>
255
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 159</span>
256
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">atom_string</span>(<span class="ruby-identifier">name</span>)
257
+ <span class="ruby-identifier">attr_accessor</span> <span class="ruby-identifier">name</span>
258
+
259
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">parse_plain</span>(<span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">NS</span>, <span class="ruby-identifier">name</span>)
260
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_plain</span>([<span class="ruby-value str">'atom'</span>, <span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">NS</span>], <span class="ruby-identifier">name</span>)
261
+ <span class="ruby-keyword kw">end</span>
262
+ </pre>
263
+ </div>
264
+ </div>
265
+ </div>
266
+
267
+ <div id="method-M000039" class="method-detail">
268
+ <a name="M000039"></a>
269
+
270
+ <div class="method-heading">
271
+ <a href="#M000039" class="method-signature">
272
+ <span class="method-name">atom_time</span><span class="method-args">(name)</span>
273
+ </a>
274
+ </div>
275
+
276
+ <div class="method-description">
277
+ <p>
278
+ an <a href="Converters.html#M000040">element</a> in the Atom namespace
279
+ containing a timestamp
280
+ </p>
281
+ <p><a class="source-toggle" href="#"
282
+ onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
283
+ <div class="method-source-code" id="M000039-source">
284
+ <pre>
285
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 189</span>
286
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">atom_time</span><span class="ruby-identifier">atom_time</span>(<span class="ruby-identifier">name</span>)
287
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">time</span> [<span class="ruby-value str">'atom'</span>, <span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">NS</span>], <span class="ruby-identifier">name</span>
288
+ <span class="ruby-keyword kw">end</span>
289
+ </pre>
290
+ </div>
291
+ </div>
292
+ </div>
293
+
294
+ <div id="method-M000045" class="method-detail">
295
+ <a name="M000045"></a>
296
+
297
+ <div class="method-heading">
298
+ <a href="#M000045" class="method-signature">
299
+ <span class="method-name">attrb</span><span class="method-args">(ns, name)</span>
300
+ </a>
301
+ </div>
302
+
303
+ <div class="method-description">
304
+ <p>
305
+ an XML attribute in the namespace &#8216;ns&#8216;
306
+ </p>
307
+ <p><a class="source-toggle" href="#"
308
+ onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
309
+ <div class="method-source-code" id="M000045-source">
310
+ <pre>
311
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 282</span>
312
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attrb</span>(<span class="ruby-identifier">ns</span>, <span class="ruby-identifier">name</span>)
313
+ <span class="ruby-identifier">attr_accessor</span> <span class="ruby-identifier">name</span>
314
+
315
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_parse_attr</span> [<span class="ruby-identifier">ns</span>[<span class="ruby-value">1</span>], <span class="ruby-identifier">name</span>] <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
316
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">x</span>)
317
+ <span class="ruby-keyword kw">end</span>
318
+
319
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_build</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
320
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
321
+ <span class="ruby-identifier">n</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
322
+
323
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">namespace</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">ns</span>[<span class="ruby-value">1</span>]
324
+ <span class="ruby-identifier">x</span>.<span class="ruby-identifier">add_namespace</span> <span class="ruby-operator">*</span><span class="ruby-identifier">ns</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">namespaces</span>[<span class="ruby-identifier">ns</span>[<span class="ruby-value">0</span>]]
325
+ <span class="ruby-identifier">n</span> = <span class="ruby-node">&quot;#{ns[0]}:#{n}&quot;</span>
326
+ <span class="ruby-keyword kw">end</span>
327
+
328
+ <span class="ruby-identifier">x</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">n</span>] = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>
329
+ <span class="ruby-keyword kw">end</span>
330
+ <span class="ruby-keyword kw">end</span>
331
+ <span class="ruby-keyword kw">end</span>
332
+ </pre>
333
+ </div>
334
+ </div>
335
+ </div>
336
+
337
+ <div id="method-M000036" class="method-detail">
338
+ <a name="M000036"></a>
339
+
340
+ <div class="method-heading">
341
+ <a href="#M000036" class="method-signature">
342
+ <span class="method-name">build_plain</span><span class="method-args">(ns, name)</span>
343
+ </a>
344
+ </div>
345
+
346
+ <div class="method-description">
347
+ <p><a class="source-toggle" href="#"
348
+ onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
349
+ <div class="method-source-code" id="M000036-source">
350
+ <pre>
351
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 149</span>
352
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_plain</span> <span class="ruby-identifier">ns</span>, <span class="ruby-identifier">name</span>
353
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_build</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
354
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
355
+ <span class="ruby-identifier">el</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">append_elem</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">ns</span>, <span class="ruby-identifier">name</span>)
356
+ <span class="ruby-identifier">el</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>
357
+ <span class="ruby-keyword kw">end</span>
358
+ <span class="ruby-keyword kw">end</span>
359
+ <span class="ruby-keyword kw">end</span>
360
+ </pre>
361
+ </div>
362
+ </div>
363
+ </div>
364
+
365
+ <div id="method-M000040" class="method-detail">
366
+ <a name="M000040"></a>
367
+
368
+ <div class="method-heading">
369
+ <a href="#M000040" class="method-signature">
370
+ <span class="method-name">element</span><span class="method-args">(ns, name, klass)</span>
371
+ </a>
372
+ </div>
373
+
374
+ <div class="method-description">
375
+ <p>
376
+ an <a href="Converters.html#M000040">element</a> that is parsed by <a
377
+ href="Element.html">Element</a> descendant &#8216;klass&#8216;
378
+ </p>
379
+ <p><a class="source-toggle" href="#"
380
+ onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
381
+ <div class="method-source-code" id="M000040-source">
382
+ <pre>
383
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 194</span>
384
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">element</span>(<span class="ruby-identifier">ns</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">klass</span>)
385
+ <span class="ruby-identifier">el_name</span> = <span class="ruby-identifier">name</span>
386
+ <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/-/</span>, <span class="ruby-value str">'_'</span>)
387
+
388
+ <span class="ruby-identifier">attr_reader</span> <span class="ruby-identifier">name</span>
389
+
390
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_parse</span> [<span class="ruby-identifier">ns</span>[<span class="ruby-value">1</span>], <span class="ruby-identifier">el_name</span>] <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
391
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>, <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">e</span>.<span class="ruby-identifier">base</span>))
392
+ <span class="ruby-keyword kw">end</span>
393
+
394
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_build</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
395
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
396
+ <span class="ruby-identifier">el</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">append_elem</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">ns</span>, <span class="ruby-identifier">el_name</span>)
397
+ <span class="ruby-identifier">v</span>.<span class="ruby-identifier">build</span>(<span class="ruby-identifier">el</span>)
398
+ <span class="ruby-keyword kw">end</span>
399
+ <span class="ruby-keyword kw">end</span>
400
+
401
+ <span class="ruby-identifier">def_set</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
402
+ <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>, <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>))
403
+ <span class="ruby-keyword kw">end</span>
404
+ <span class="ruby-keyword kw">end</span>
405
+ </pre>
406
+ </div>
407
+ </div>
408
+ </div>
409
+
410
+ <div id="method-M000043" class="method-detail">
411
+ <a name="M000043"></a>
412
+
413
+ <div class="method-heading">
414
+ <a href="#M000043" class="method-signature">
415
+ <span class="method-name">elements</span><span class="method-args">(ns, one_name, many_name, klass)</span>
416
+ </a>
417
+ </div>
418
+
419
+ <div class="method-description">
420
+ <p>
421
+ an <a href="Converters.html#M000040">element</a> that can appear multiple
422
+ times that is parsed by <a href="Element.html">Element</a> descendant
423
+ &#8216;klass&#8216;
424
+ </p>
425
+ <p>
426
+ &#8216;one_name&#8217; is the name of the <a
427
+ href="Converters.html#M000040">element</a>, &#8216;many_name&#8217; is the
428
+ name of the attribute that will be created on this <a
429
+ href="Element.html">Element</a>
430
+ </p>
431
+ <p><a class="source-toggle" href="#"
432
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
433
+ <div class="method-source-code" id="M000043-source">
434
+ <pre>
435
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 252</span>
436
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">elements</span>(<span class="ruby-identifier">ns</span>, <span class="ruby-identifier">one_name</span>, <span class="ruby-identifier">many_name</span>, <span class="ruby-identifier">klass</span>)
437
+ <span class="ruby-identifier">attr_reader</span> <span class="ruby-identifier">many_name</span>
438
+
439
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_init</span> <span class="ruby-keyword kw">do</span>
440
+ <span class="ruby-identifier">var</span> = <span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">Multiple</span>(<span class="ruby-identifier">klass</span>).<span class="ruby-identifier">new</span>
441
+ <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{many_name}&quot;</span>, <span class="ruby-identifier">var</span>)
442
+ <span class="ruby-keyword kw">end</span>
443
+
444
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_parse_many</span> [<span class="ruby-identifier">ns</span>[<span class="ruby-value">1</span>], <span class="ruby-identifier">one_name</span>] <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">xs</span><span class="ruby-operator">|</span>
445
+ <span class="ruby-identifier">var</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">many_name</span>)
446
+
447
+ <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">el</span><span class="ruby-operator">|</span>
448
+ <span class="ruby-identifier">var</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">el</span>, <span class="ruby-identifier">e</span>.<span class="ruby-identifier">base</span>)
449
+ <span class="ruby-keyword kw">end</span>
450
+ <span class="ruby-keyword kw">end</span>
451
+
452
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_build</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
453
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">many_name</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
454
+ <span class="ruby-identifier">el</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">append_elem</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">ns</span>, <span class="ruby-identifier">one_name</span>)
455
+ <span class="ruby-identifier">v</span>.<span class="ruby-identifier">build</span>(<span class="ruby-identifier">el</span>)
456
+ <span class="ruby-keyword kw">end</span>
457
+ <span class="ruby-keyword kw">end</span>
458
+ <span class="ruby-keyword kw">end</span>
459
+ </pre>
460
+ </div>
461
+ </div>
462
+ </div>
463
+
464
+ <div id="method-M000042" class="method-detail">
465
+ <a name="M000042"></a>
466
+
467
+ <div class="method-heading">
468
+ <a href="#M000042" class="method-signature">
469
+ <span class="method-name">strings</span><span class="method-args">(ns, one_name, many_name)</span>
470
+ </a>
471
+ </div>
472
+
473
+ <div class="method-description">
474
+ <p>
475
+ an <a href="Converters.html#M000040">element</a> that can appear multiple
476
+ times that contains text
477
+ </p>
478
+ <p>
479
+ &#8216;one_name&#8217; is the name of the <a
480
+ href="Converters.html#M000040">element</a>, &#8216;many_name&#8217; is the
481
+ name of the attribute that will be created on this <a
482
+ href="Element.html">Element</a>
483
+ </p>
484
+ <p><a class="source-toggle" href="#"
485
+ onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
486
+ <div class="method-source-code" id="M000042-source">
487
+ <pre>
488
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 225</span>
489
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strings</span>(<span class="ruby-identifier">ns</span>, <span class="ruby-identifier">one_name</span>, <span class="ruby-identifier">many_name</span>)
490
+ <span class="ruby-identifier">attr_reader</span> <span class="ruby-identifier">many_name</span>
491
+
492
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_init</span> <span class="ruby-keyword kw">do</span>
493
+ <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{many_name}&quot;</span>, [])
494
+ <span class="ruby-keyword kw">end</span>
495
+
496
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_parse_many</span> [<span class="ruby-identifier">ns</span>[<span class="ruby-value">1</span>], <span class="ruby-identifier">one_name</span>] <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">xs</span><span class="ruby-operator">|</span>
497
+ <span class="ruby-identifier">var</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">&quot;@#{many_name}&quot;</span>)
498
+
499
+ <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">el</span><span class="ruby-operator">|</span>
500
+ <span class="ruby-identifier">var</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">el</span>.<span class="ruby-identifier">text</span>
501
+ <span class="ruby-keyword kw">end</span>
502
+ <span class="ruby-keyword kw">end</span>
503
+
504
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">on_build</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
505
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">&quot;@#{many_name}&quot;</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
506
+ <span class="ruby-identifier">e</span>.<span class="ruby-identifier">append_elem</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">ns</span>, <span class="ruby-identifier">one_name</span>).<span class="ruby-identifier">text</span> = <span class="ruby-identifier">v</span>
507
+ <span class="ruby-keyword kw">end</span>
508
+ <span class="ruby-keyword kw">end</span>
509
+ <span class="ruby-keyword kw">end</span>
510
+ </pre>
511
+ </div>
512
+ </div>
513
+ </div>
514
+
515
+ <div id="method-M000038" class="method-detail">
516
+ <a name="M000038"></a>
517
+
518
+ <div class="method-heading">
519
+ <a href="#M000038" class="method-signature">
520
+ <span class="method-name">time</span><span class="method-args">(ns, name)</span>
521
+ </a>
522
+ </div>
523
+
524
+ <div class="method-description">
525
+ <p>
526
+ an <a href="Converters.html#M000040">element</a> in namespace
527
+ &#8216;ns&#8217; containing a RFC3339 timestamp
528
+ </p>
529
+ <p><a class="source-toggle" href="#"
530
+ onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
531
+ <div class="method-source-code" id="M000038-source">
532
+ <pre>
533
+ <span class="ruby-comment cmt"># File lib/atom/element.rb, line 167</span>
534
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">time</span>(<span class="ruby-identifier">ns</span>, <span class="ruby-identifier">name</span>)
535
+ <span class="ruby-identifier">attr_reader</span> <span class="ruby-identifier">name</span>
536
+
537
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">def_set</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">time</span><span class="ruby-operator">|</span>
538
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">time</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:iso8601</span>
539
+ <span class="ruby-identifier">time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">time</span>.<span class="ruby-identifier">to_s</span>)
540
+ <span class="ruby-keyword kw">end</span>
541
+
542
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">time</span>.<span class="ruby-identifier">to_s</span>; <span class="ruby-identifier">iso8601</span>; <span class="ruby-keyword kw">end</span>
543
+
544
+ <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>, <span class="ruby-identifier">time</span>)
545
+ <span class="ruby-keyword kw">end</span>
546
+
547
+ <span class="ruby-identifier">define_method</span> <span class="ruby-node">&quot;#{name}!&quot;</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword kw">do</span>
548
+ <span class="ruby-identifier">set</span>(<span class="ruby-identifier">name</span>, <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>)
549
+ <span class="ruby-keyword kw">end</span>
550
+
551
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">parse_plain</span>(<span class="ruby-identifier">ns</span>[<span class="ruby-value">1</span>], <span class="ruby-identifier">name</span>)
552
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">build_plain</span>(<span class="ruby-identifier">ns</span>, <span class="ruby-identifier">name</span>)
553
+ <span class="ruby-keyword kw">end</span>
554
+ </pre>
555
+ </div>
556
+ </div>
557
+ </div>
558
+
559
+
560
+ </div>
561
+
562
+
563
+ </div>
564
+
565
+
566
+ <div id="validator-badges">
567
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
568
+ </div>
569
+
570
+ </body>
571
+ </html>