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.
- data/Rakefile +1 -1
- data/doc/classes/Atom/AttrEl.html +163 -0
- data/doc/classes/Atom/Author.html +113 -0
- data/doc/classes/Atom/AutodiscoveryFailure.html +111 -0
- data/doc/classes/Atom/Categories.html +168 -0
- data/doc/classes/Atom/Category.html +137 -0
- data/doc/classes/Atom/Collection.html +425 -0
- data/doc/classes/Atom/Content.html +170 -0
- data/doc/classes/Atom/Contributor.html +113 -0
- data/doc/classes/Atom/Control.html +126 -0
- data/doc/classes/Atom/Converters.html +571 -0
- data/doc/classes/Atom/DigestAuth.html +285 -0
- data/doc/classes/Atom/Element.html +892 -0
- data/doc/classes/Atom/FileCache.html +287 -0
- data/doc/classes/Atom/HTTP.html +490 -0
- data/doc/classes/Atom/HTTPResponse.html +190 -0
- data/doc/classes/Atom/HasCategories.html +187 -0
- data/doc/classes/Atom/HasLinks.html +168 -0
- data/doc/classes/Atom/Link.html +214 -0
- data/doc/classes/Atom/NilCache.html +202 -0
- data/doc/classes/Atom/ParseError.html +111 -0
- data/doc/classes/Atom/Parsers.html +311 -0
- data/doc/classes/Atom/Person.html +130 -0
- data/doc/classes/Atom/Rights.html +113 -0
- data/doc/classes/Atom/Service.html +298 -0
- data/doc/classes/Atom/Source.html +111 -0
- data/doc/classes/Atom/Subtitle.html +113 -0
- data/doc/classes/Atom/Summary.html +113 -0
- data/doc/classes/Atom/Text.html +372 -0
- data/doc/classes/Atom/Title.html +113 -0
- data/doc/classes/Atom/Tools.html +525 -0
- data/doc/classes/Atom/Workspace.html +121 -0
- data/doc/classes/Object.html +204 -0
- data/doc/classes/XHTML.html +118 -0
- data/doc/created.rid +1 -0
- data/doc/files/README.html +173 -0
- data/doc/files/lib/atom/cache_rb.html +302 -0
- data/doc/files/lib/atom/collection_rb.html +109 -0
- data/doc/files/lib/atom/element_rb.html +110 -0
- data/doc/files/lib/atom/entry_rb.html +111 -0
- data/doc/files/lib/atom/feed_rb.html +111 -0
- data/doc/files/lib/atom/http_rb.html +114 -0
- data/doc/files/lib/atom/service_rb.html +112 -0
- data/doc/files/lib/atom/text_rb.html +109 -0
- data/doc/files/lib/atom/tools_rb.html +108 -0
- data/doc/fr_class_index.html +59 -0
- data/doc/fr_file_index.html +36 -0
- data/doc/fr_method_index.html +137 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/atom/cache.rb +1 -1
- data/lib/atom/http.rb +2 -2
- data/lib/atom/text.rb +15 -6
- data/spec/entry_spec.rb +12 -1
- data/spec/feed_spec.rb +20 -1
- data/spec/fixtures/contacts-feed.xml +34 -0
- data/spec/fixtures/entry-w-xml.xml +24 -0
- metadata +68 -5
@@ -0,0 +1,137 @@
|
|
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::Category</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::Category</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
|
+
A category has the following attributes:
|
86
|
+
</p>
|
87
|
+
<table>
|
88
|
+
<tr><td valign="top">term (required):</td><td>a string that identifies the category
|
89
|
+
|
90
|
+
</td></tr>
|
91
|
+
<tr><td valign="top">scheme:</td><td>an IRI that identifies a categorization scheme
|
92
|
+
|
93
|
+
</td></tr>
|
94
|
+
<tr><td valign="top">label:</td><td>a human-readable label
|
95
|
+
|
96
|
+
</td></tr>
|
97
|
+
</table>
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
<!-- if includes -->
|
109
|
+
<div id="includes">
|
110
|
+
<h3 class="section-bar">Included Modules</h3>
|
111
|
+
|
112
|
+
<div id="includes-list">
|
113
|
+
<span class="include-name"><a href="AttrEl.html">AttrEl</a></span>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<div id="section">
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<!-- if method_list -->
|
127
|
+
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
<div id="validator-badges">
|
133
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
</body>
|
137
|
+
</html>
|
@@ -0,0 +1,425 @@
|
|
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::Collection</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::Collection</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/atom/collection_rb.html">
|
59
|
+
lib/atom/collection.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
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000103">accepts</a>
|
92
|
+
<a href="#M000104">accepts=</a>
|
93
|
+
<a href="#M000109">delete!</a>
|
94
|
+
<a href="#M000105">new</a>
|
95
|
+
<a href="#M000106">parse</a>
|
96
|
+
<a href="#M000107">post!</a>
|
97
|
+
<a href="#M000110">post_media!</a>
|
98
|
+
<a href="#M000108">put!</a>
|
99
|
+
<a href="#M000111">put_media!</a>
|
100
|
+
<a href="#M000102">title</a>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if includes -->
|
108
|
+
|
109
|
+
<div id="section">
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
<div id="attribute-list">
|
116
|
+
<h3 class="section-bar">Attributes</h3>
|
117
|
+
|
118
|
+
<div class="name-list">
|
119
|
+
<table>
|
120
|
+
<tr class="top-aligned-row context-row">
|
121
|
+
<td class="context-item-name">feed</td>
|
122
|
+
<td class="context-item-value"> [R] </td>
|
123
|
+
<td class="context-item-desc"></td>
|
124
|
+
</tr>
|
125
|
+
<tr class="top-aligned-row context-row">
|
126
|
+
<td class="context-item-name">http</td>
|
127
|
+
<td class="context-item-value"> [R] </td>
|
128
|
+
<td class="context-item-desc"></td>
|
129
|
+
</tr>
|
130
|
+
</table>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<!-- if method_list -->
|
137
|
+
<div id="methods">
|
138
|
+
<h3 class="section-bar">Public Class methods</h3>
|
139
|
+
|
140
|
+
<div id="method-M000105" class="method-detail">
|
141
|
+
<a name="M000105"></a>
|
142
|
+
|
143
|
+
<div class="method-heading">
|
144
|
+
<a href="#M000105" class="method-signature">
|
145
|
+
<span class="method-name">new</span><span class="method-args">(href = nil, http = Atom::HTTP.new)</span>
|
146
|
+
</a>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
<div class="method-description">
|
150
|
+
<p><a class="source-toggle" href="#"
|
151
|
+
onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
|
152
|
+
<div class="method-source-code" id="M000105-source">
|
153
|
+
<pre>
|
154
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 70</span>
|
155
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">href</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">http</span> = <span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">new</span>)
|
156
|
+
<span class="ruby-keyword kw">super</span>()
|
157
|
+
|
158
|
+
<span class="ruby-ivar">@http</span> = <span class="ruby-identifier">http</span>
|
159
|
+
|
160
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">href</span>
|
161
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">href</span> = <span class="ruby-identifier">href</span>
|
162
|
+
<span class="ruby-keyword kw">end</span>
|
163
|
+
<span class="ruby-keyword kw">end</span>
|
164
|
+
</pre>
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
|
169
|
+
<div id="method-M000106" class="method-detail">
|
170
|
+
<a name="M000106"></a>
|
171
|
+
|
172
|
+
<div class="method-heading">
|
173
|
+
<a href="#M000106" class="method-signature">
|
174
|
+
<span class="method-name">parse</span><span class="method-args">(xml, base = '')</span>
|
175
|
+
</a>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
<div class="method-description">
|
179
|
+
<p><a class="source-toggle" href="#"
|
180
|
+
onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
|
181
|
+
<div class="method-source-code" id="M000106-source">
|
182
|
+
<pre>
|
183
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 80</span>
|
184
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">parse</span> <span class="ruby-identifier">xml</span>, <span class="ruby-identifier">base</span> = <span class="ruby-value str">''</span>
|
185
|
+
<span class="ruby-identifier">e</span> = <span class="ruby-keyword kw">super</span>
|
186
|
+
|
187
|
+
<span class="ruby-comment cmt"># URL absolutization</span>
|
188
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">e</span>.<span class="ruby-identifier">base</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">href</span>
|
189
|
+
<span class="ruby-identifier">e</span>.<span class="ruby-identifier">href</span> = (<span class="ruby-identifier">e</span>.<span class="ruby-identifier">base</span>.<span class="ruby-identifier">to_uri</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">href</span>).<span class="ruby-identifier">to_s</span>
|
190
|
+
<span class="ruby-keyword kw">end</span>
|
191
|
+
|
192
|
+
<span class="ruby-identifier">e</span>
|
193
|
+
<span class="ruby-keyword kw">end</span>
|
194
|
+
</pre>
|
195
|
+
</div>
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
|
199
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
200
|
+
|
201
|
+
<div id="method-M000103" class="method-detail">
|
202
|
+
<a name="M000103"></a>
|
203
|
+
|
204
|
+
<div class="method-heading">
|
205
|
+
<a href="#M000103" class="method-signature">
|
206
|
+
<span class="method-name">accepts</span><span class="method-args">()</span>
|
207
|
+
</a>
|
208
|
+
</div>
|
209
|
+
|
210
|
+
<div class="method-description">
|
211
|
+
<p><a class="source-toggle" href="#"
|
212
|
+
onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
|
213
|
+
<div class="method-source-code" id="M000103-source">
|
214
|
+
<pre>
|
215
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 54</span>
|
216
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accepts</span>
|
217
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@accepts</span>.<span class="ruby-identifier">empty?</span>
|
218
|
+
[<span class="ruby-value str">'application/atom+xml;type=entry'</span>]
|
219
|
+
<span class="ruby-keyword kw">else</span>
|
220
|
+
<span class="ruby-ivar">@accepts</span>
|
221
|
+
<span class="ruby-keyword kw">end</span>
|
222
|
+
<span class="ruby-keyword kw">end</span>
|
223
|
+
</pre>
|
224
|
+
</div>
|
225
|
+
</div>
|
226
|
+
</div>
|
227
|
+
|
228
|
+
<div id="method-M000104" class="method-detail">
|
229
|
+
<a name="M000104"></a>
|
230
|
+
|
231
|
+
<div class="method-heading">
|
232
|
+
<a href="#M000104" class="method-signature">
|
233
|
+
<span class="method-name">accepts=</span><span class="method-args">(array)</span>
|
234
|
+
</a>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<div class="method-description">
|
238
|
+
<p><a class="source-toggle" href="#"
|
239
|
+
onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
|
240
|
+
<div class="method-source-code" id="M000104-source">
|
241
|
+
<pre>
|
242
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 62</span>
|
243
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accepts=</span> <span class="ruby-identifier">array</span>
|
244
|
+
<span class="ruby-ivar">@accepts</span> = <span class="ruby-identifier">array</span>
|
245
|
+
<span class="ruby-keyword kw">end</span>
|
246
|
+
</pre>
|
247
|
+
</div>
|
248
|
+
</div>
|
249
|
+
</div>
|
250
|
+
|
251
|
+
<div id="method-M000109" class="method-detail">
|
252
|
+
<a name="M000109"></a>
|
253
|
+
|
254
|
+
<div class="method-heading">
|
255
|
+
<a href="#M000109" class="method-signature">
|
256
|
+
<span class="method-name">delete!</span><span class="method-args">(entry, url = entry.edit_url)</span>
|
257
|
+
</a>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
<div class="method-description">
|
261
|
+
<p>
|
262
|
+
DELETE an entry from the collection
|
263
|
+
</p>
|
264
|
+
<p><a class="source-toggle" href="#"
|
265
|
+
onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
|
266
|
+
<div class="method-source-code" id="M000109-source">
|
267
|
+
<pre>
|
268
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 106</span>
|
269
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete!</span>(<span class="ruby-identifier">entry</span>, <span class="ruby-identifier">url</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">edit_url</span>)
|
270
|
+
<span class="ruby-ivar">@http</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">url</span>)
|
271
|
+
<span class="ruby-keyword kw">end</span>
|
272
|
+
</pre>
|
273
|
+
</div>
|
274
|
+
</div>
|
275
|
+
</div>
|
276
|
+
|
277
|
+
<div id="method-M000107" class="method-detail">
|
278
|
+
<a name="M000107"></a>
|
279
|
+
|
280
|
+
<div class="method-heading">
|
281
|
+
<a href="#M000107" class="method-signature">
|
282
|
+
<span class="method-name">post!</span><span class="method-args">(entry, slug = nil)</span>
|
283
|
+
</a>
|
284
|
+
</div>
|
285
|
+
|
286
|
+
<div class="method-description">
|
287
|
+
<p>
|
288
|
+
POST an entry to the collection, with an optional slug
|
289
|
+
</p>
|
290
|
+
<p><a class="source-toggle" href="#"
|
291
|
+
onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
|
292
|
+
<div class="method-source-code" id="M000107-source">
|
293
|
+
<pre>
|
294
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 92</span>
|
295
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post!</span>(<span class="ruby-identifier">entry</span>, <span class="ruby-identifier">slug</span> = <span class="ruby-keyword kw">nil</span>)
|
296
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"Cowardly refusing to POST a non-Atom::Entry"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Atom</span><span class="ruby-operator">::</span><span class="ruby-constant">Entry</span>
|
297
|
+
<span class="ruby-identifier">headers</span> = {<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/atom+xml"</span> }
|
298
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Slug"</span>] = <span class="ruby-identifier">slug</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">slug</span>
|
299
|
+
|
300
|
+
<span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-ivar">@href</span>, <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">headers</span>)
|
301
|
+
<span class="ruby-keyword kw">end</span>
|
302
|
+
</pre>
|
303
|
+
</div>
|
304
|
+
</div>
|
305
|
+
</div>
|
306
|
+
|
307
|
+
<div id="method-M000110" class="method-detail">
|
308
|
+
<a name="M000110"></a>
|
309
|
+
|
310
|
+
<div class="method-heading">
|
311
|
+
<a href="#M000110" class="method-signature">
|
312
|
+
<span class="method-name">post_media!</span><span class="method-args">(data, content_type, slug = nil)</span>
|
313
|
+
</a>
|
314
|
+
</div>
|
315
|
+
|
316
|
+
<div class="method-description">
|
317
|
+
<p>
|
318
|
+
POST a media item to the collection
|
319
|
+
</p>
|
320
|
+
<p><a class="source-toggle" href="#"
|
321
|
+
onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
|
322
|
+
<div class="method-source-code" id="M000110-source">
|
323
|
+
<pre>
|
324
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 111</span>
|
325
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_media!</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">content_type</span>, <span class="ruby-identifier">slug</span> = <span class="ruby-keyword kw">nil</span>)
|
326
|
+
<span class="ruby-identifier">headers</span> = {<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">content_type</span>}
|
327
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Slug"</span>] = <span class="ruby-identifier">slug</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">slug</span>
|
328
|
+
|
329
|
+
<span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-ivar">@href</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">headers</span>)
|
330
|
+
<span class="ruby-keyword kw">end</span>
|
331
|
+
</pre>
|
332
|
+
</div>
|
333
|
+
</div>
|
334
|
+
</div>
|
335
|
+
|
336
|
+
<div id="method-M000108" class="method-detail">
|
337
|
+
<a name="M000108"></a>
|
338
|
+
|
339
|
+
<div class="method-heading">
|
340
|
+
<a href="#M000108" class="method-signature">
|
341
|
+
<span class="method-name">put!</span><span class="method-args">(entry, url = entry.edit_url)</span>
|
342
|
+
</a>
|
343
|
+
</div>
|
344
|
+
|
345
|
+
<div class="method-description">
|
346
|
+
<p>
|
347
|
+
PUT an updated version of an entry to the collection
|
348
|
+
</p>
|
349
|
+
<p><a class="source-toggle" href="#"
|
350
|
+
onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
|
351
|
+
<div class="method-source-code" id="M000108-source">
|
352
|
+
<pre>
|
353
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 101</span>
|
354
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put!</span>(<span class="ruby-identifier">entry</span>, <span class="ruby-identifier">url</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">edit_url</span>)
|
355
|
+
<span class="ruby-ivar">@http</span>.<span class="ruby-identifier">put_atom_entry</span>(<span class="ruby-identifier">entry</span>, <span class="ruby-identifier">url</span>)
|
356
|
+
<span class="ruby-keyword kw">end</span>
|
357
|
+
</pre>
|
358
|
+
</div>
|
359
|
+
</div>
|
360
|
+
</div>
|
361
|
+
|
362
|
+
<div id="method-M000111" class="method-detail">
|
363
|
+
<a name="M000111"></a>
|
364
|
+
|
365
|
+
<div class="method-heading">
|
366
|
+
<a href="#M000111" class="method-signature">
|
367
|
+
<span class="method-name">put_media!</span><span class="method-args">(data, content_type, slug = nil)</span>
|
368
|
+
</a>
|
369
|
+
</div>
|
370
|
+
|
371
|
+
<div class="method-description">
|
372
|
+
<p>
|
373
|
+
PUT a media item to the collection
|
374
|
+
</p>
|
375
|
+
<p><a class="source-toggle" href="#"
|
376
|
+
onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
|
377
|
+
<div class="method-source-code" id="M000111-source">
|
378
|
+
<pre>
|
379
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 119</span>
|
380
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_media!</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">content_type</span>, <span class="ruby-identifier">slug</span> = <span class="ruby-keyword kw">nil</span>)
|
381
|
+
<span class="ruby-identifier">headers</span> = {<span class="ruby-value str">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">content_type</span>}
|
382
|
+
|
383
|
+
<span class="ruby-ivar">@http</span>.<span class="ruby-identifier">put</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">headers</span>)
|
384
|
+
<span class="ruby-keyword kw">end</span>
|
385
|
+
</pre>
|
386
|
+
</div>
|
387
|
+
</div>
|
388
|
+
</div>
|
389
|
+
|
390
|
+
<div id="method-M000102" class="method-detail">
|
391
|
+
<a name="M000102"></a>
|
392
|
+
|
393
|
+
<div class="method-heading">
|
394
|
+
<a href="#M000102" class="method-signature">
|
395
|
+
<span class="method-name">title</span><span class="method-args">()</span>
|
396
|
+
</a>
|
397
|
+
</div>
|
398
|
+
|
399
|
+
<div class="method-description">
|
400
|
+
<p><a class="source-toggle" href="#"
|
401
|
+
onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
|
402
|
+
<div class="method-source-code" id="M000102-source">
|
403
|
+
<pre>
|
404
|
+
<span class="ruby-comment cmt"># File lib/atom/collection.rb, line 50</span>
|
405
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">title</span>
|
406
|
+
<span class="ruby-ivar">@title</span> <span class="ruby-keyword kw">or</span> <span class="ruby-ivar">@feed</span>.<span class="ruby-identifier">title</span>
|
407
|
+
<span class="ruby-keyword kw">end</span>
|
408
|
+
</pre>
|
409
|
+
</div>
|
410
|
+
</div>
|
411
|
+
</div>
|
412
|
+
|
413
|
+
|
414
|
+
</div>
|
415
|
+
|
416
|
+
|
417
|
+
</div>
|
418
|
+
|
419
|
+
|
420
|
+
<div id="validator-badges">
|
421
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
422
|
+
</div>
|
423
|
+
|
424
|
+
</body>
|
425
|
+
</html>
|