atom-tools 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/README +2 -2
  2. data/Rakefile +1 -1
  3. data/bin/atom-client.rb +71 -45
  4. data/lib/atom/element.rb +7 -2
  5. data/lib/atom/entry.rb +51 -16
  6. data/lib/atom/feed.rb +6 -6
  7. data/lib/atom/http.rb +23 -19
  8. data/lib/atom/service.rb +0 -2
  9. data/lib/atom/text.rb +34 -12
  10. data/lib/atom/xml.rb +26 -17
  11. data/lib/atom/yaml.rb +23 -8
  12. data/test/test_constructs.rb +16 -2
  13. data/test/test_general.rb +22 -9
  14. data/test/test_http.rb +12 -8
  15. data/test/test_xml.rb +66 -20
  16. metadata +4 -40
  17. data/doc/classes/Atom/Author.html +0 -130
  18. data/doc/classes/Atom/Category.html +0 -128
  19. data/doc/classes/Atom/Collection.html +0 -322
  20. data/doc/classes/Atom/Content.html +0 -129
  21. data/doc/classes/Atom/Contributor.html +0 -119
  22. data/doc/classes/Atom/DigestAuth.html +0 -285
  23. data/doc/classes/Atom/Element.html +0 -325
  24. data/doc/classes/Atom/Entry.html +0 -369
  25. data/doc/classes/Atom/Feed.html +0 -595
  26. data/doc/classes/Atom/HTTP.html +0 -436
  27. data/doc/classes/Atom/HTTPResponse.html +0 -149
  28. data/doc/classes/Atom/Link.html +0 -137
  29. data/doc/classes/Atom/Service.html +0 -260
  30. data/doc/classes/Atom/Text.html +0 -245
  31. data/doc/classes/Atom/Workspace.html +0 -121
  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/collection_rb.html +0 -110
  36. data/doc/files/lib/atom/element_rb.html +0 -109
  37. data/doc/files/lib/atom/entry_rb.html +0 -111
  38. data/doc/files/lib/atom/feed_rb.html +0 -112
  39. data/doc/files/lib/atom/http_rb.html +0 -112
  40. data/doc/files/lib/atom/service_rb.html +0 -111
  41. data/doc/files/lib/atom/text_rb.html +0 -109
  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 -42
  45. data/doc/fr_file_index.html +0 -36
  46. data/doc/fr_method_index.html +0 -69
  47. data/doc/index.html +0 -24
  48. data/doc/rdoc-style.css +0 -208
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: atom-tools
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.2
7
- date: 2006-12-27 00:00:00 -07:00
6
+ version: 0.9.3
7
+ date: 2007-05-10 00:00:00 -06:00
8
8
  summary: Tools for working with Atom Entries, Feeds and Collections
9
9
  require_paths:
10
10
  - lib
@@ -25,6 +25,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
25
25
  platform: ruby
26
26
  signing_key:
27
27
  cert_chain:
28
+ post_install_message:
28
29
  authors:
29
30
  - Brendan Taylor
30
31
  files:
@@ -33,43 +34,6 @@ files:
33
34
  - Rakefile
34
35
  - setup.rb
35
36
  - bin/atom-client.rb
36
- - doc/files
37
- - doc/index.html
38
- - doc/rdoc-style.css
39
- - doc/fr_method_index.html
40
- - doc/fr_class_index.html
41
- - doc/fr_file_index.html
42
- - doc/created.rid
43
- - doc/classes
44
- - doc/files/lib
45
- - doc/files/README.html
46
- - doc/files/lib/atom
47
- - doc/files/lib/atom/feed_rb.html
48
- - doc/files/lib/atom/text_rb.html
49
- - doc/files/lib/atom/xml_rb.html
50
- - doc/files/lib/atom/yaml_rb.html
51
- - doc/files/lib/atom/service_rb.html
52
- - doc/files/lib/atom/element_rb.html
53
- - doc/files/lib/atom/entry_rb.html
54
- - doc/files/lib/atom/http_rb.html
55
- - doc/files/lib/atom/collection_rb.html
56
- - doc/classes/Atom
57
- - doc/classes/XHTML.html
58
- - doc/classes/Atom/Service.html
59
- - doc/classes/Atom/Author.html
60
- - doc/classes/Atom/Element.html
61
- - doc/classes/Atom/Feed.html
62
- - doc/classes/Atom/DigestAuth.html
63
- - doc/classes/Atom/Text.html
64
- - doc/classes/Atom/Contributor.html
65
- - doc/classes/Atom/HTTPResponse.html
66
- - doc/classes/Atom/HTTP.html
67
- - doc/classes/Atom/Link.html
68
- - doc/classes/Atom/Collection.html
69
- - doc/classes/Atom/Content.html
70
- - doc/classes/Atom/Category.html
71
- - doc/classes/Atom/Workspace.html
72
- - doc/classes/Atom/Entry.html
73
37
  - test/test_constructs.rb
74
38
  - test/runtests.rb
75
39
  - test/test_feed.rb
@@ -1,130 +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::Author</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::Author</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 person construct has the following child elements:
86
- </p>
87
- <table>
88
- <tr><td valign="top">name (required):</td><td>a human-readable name
89
-
90
- </td></tr>
91
- <tr><td valign="top">uri:</td><td>an IRI associated with the person
92
-
93
- </td></tr>
94
- <tr><td valign="top">email:</td><td>an email address associated with the person
95
-
96
- </td></tr>
97
- </table>
98
-
99
- </div>
100
-
101
-
102
- </div>
103
-
104
-
105
- </div>
106
-
107
-
108
- <!-- if includes -->
109
-
110
- <div id="section">
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
- <!-- if method_list -->
120
-
121
-
122
- </div>
123
-
124
-
125
- <div id="validator-badges">
126
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
127
- </div>
128
-
129
- </body>
130
- </html>
@@ -1,128 +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::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
- Atom::AttrEl
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- A category has the following attributes:
84
- </p>
85
- <table>
86
- <tr><td valign="top">term (required):</td><td>a string that identifies the category
87
-
88
- </td></tr>
89
- <tr><td valign="top">scheme:</td><td>an IRI that identifies a categorization scheme
90
-
91
- </td></tr>
92
- <tr><td valign="top">label:</td><td>a human-readable label
93
-
94
- </td></tr>
95
- </table>
96
-
97
- </div>
98
-
99
-
100
- </div>
101
-
102
-
103
- </div>
104
-
105
-
106
- <!-- if includes -->
107
-
108
- <div id="section">
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
- <!-- if method_list -->
118
-
119
-
120
- </div>
121
-
122
-
123
- <div id="validator-badges">
124
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
125
- </div>
126
-
127
- </body>
128
- </html>
@@ -1,322 +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::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="Feed.html">
69
- Feed
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 <a href="Collection.html">Collection</a> is an <a
86
- href="Feed.html">Atom::Feed</a> with extra Protocol-specific methods
87
- </p>
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
- <div id="method-list">
95
- <h3 class="section-bar">Methods</h3>
96
-
97
- <div class="name-list">
98
- <a href="#M000033">delete!</a>&nbsp;&nbsp;
99
- <a href="#M000030">new</a>&nbsp;&nbsp;
100
- <a href="#M000031">post!</a>&nbsp;&nbsp;
101
- <a href="#M000034">post_media!</a>&nbsp;&nbsp;
102
- <a href="#M000032">put!</a>&nbsp;&nbsp;
103
- <a href="#M000035">put_media!</a>&nbsp;&nbsp;
104
- </div>
105
- </div>
106
-
107
- </div>
108
-
109
-
110
- <!-- if includes -->
111
-
112
- <div id="section">
113
-
114
-
115
-
116
-
117
-
118
- <div id="attribute-list">
119
- <h3 class="section-bar">Attributes</h3>
120
-
121
- <div class="name-list">
122
- <table>
123
- <tr class="top-aligned-row context-row">
124
- <td class="context-item-name">accepts</td>
125
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
126
- <td class="context-item-desc">
127
- comma separated string that contains a list of media types accepted by a
128
- collection.
129
-
130
- <p>
131
- XXX I should parse this in some way, but I&#8216;m not sure what&#8216;s
132
- useful
133
- </p>
134
- </td>
135
- </tr>
136
- </table>
137
- </div>
138
- </div>
139
-
140
-
141
-
142
- <!-- if method_list -->
143
- <div id="methods">
144
- <h3 class="section-bar">Public Class methods</h3>
145
-
146
- <div id="method-M000030" class="method-detail">
147
- <a name="M000030"></a>
148
-
149
- <div class="method-heading">
150
- <a href="#M000030" class="method-signature">
151
- <span class="method-name">new</span><span class="method-args">(uri, http = Atom::HTTP.new)</span>
152
- </a>
153
- </div>
154
-
155
- <div class="method-description">
156
- <p><a class="source-toggle" href="#"
157
- onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
158
- <div class="method-source-code" id="M000030-source">
159
- <pre>
160
- <span class="ruby-comment cmt"># File lib/atom/collection.rb, line 16</span>
161
- 16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</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>)
162
- 17: <span class="ruby-keyword kw">super</span> <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">http</span>
163
- 18: <span class="ruby-keyword kw">end</span>
164
- </pre>
165
- </div>
166
- </div>
167
- </div>
168
-
169
- <h3 class="section-bar">Public Instance methods</h3>
170
-
171
- <div id="method-M000033" class="method-detail">
172
- <a name="M000033"></a>
173
-
174
- <div class="method-heading">
175
- <a href="#M000033" class="method-signature">
176
- <span class="method-name">delete!</span><span class="method-args">(entry, url = entry.edit_url)</span>
177
- </a>
178
- </div>
179
-
180
- <div class="method-description">
181
- <p>
182
- DELETE an entry from the collection
183
- </p>
184
- <p><a class="source-toggle" href="#"
185
- onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
186
- <div class="method-source-code" id="M000033-source">
187
- <pre>
188
- <span class="ruby-comment cmt"># File lib/atom/collection.rb, line 35</span>
189
- 35: <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>)
190
- 36: <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">url</span>)
191
- 37: <span class="ruby-keyword kw">end</span>
192
- </pre>
193
- </div>
194
- </div>
195
- </div>
196
-
197
- <div id="method-M000031" class="method-detail">
198
- <a name="M000031"></a>
199
-
200
- <div class="method-heading">
201
- <a href="#M000031" class="method-signature">
202
- <span class="method-name">post!</span><span class="method-args">(entry, slug = nil)</span>
203
- </a>
204
- </div>
205
-
206
- <div class="method-description">
207
- <p>
208
- POST an entry to the collection, with an optional slug
209
- </p>
210
- <p><a class="source-toggle" href="#"
211
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
212
- <div class="method-source-code" id="M000031-source">
213
- <pre>
214
- <span class="ruby-comment cmt"># File lib/atom/collection.rb, line 21</span>
215
- 21: <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>)
216
- 22: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Cowardly refusing to POST a non-Atom::Entry&quot;</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>
217
- 23: <span class="ruby-identifier">headers</span> = {<span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;application/atom+xml&quot;</span> }
218
- 24: <span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;Slug&quot;</span>] = <span class="ruby-identifier">slug</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">slug</span>
219
- 25:
220
- 26: <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-ivar">@uri</span>, <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">headers</span>)
221
- 27: <span class="ruby-keyword kw">end</span>
222
- </pre>
223
- </div>
224
- </div>
225
- </div>
226
-
227
- <div id="method-M000034" class="method-detail">
228
- <a name="M000034"></a>
229
-
230
- <div class="method-heading">
231
- <a href="#M000034" class="method-signature">
232
- <span class="method-name">post_media!</span><span class="method-args">(data, content_type, slug = nil)</span>
233
- </a>
234
- </div>
235
-
236
- <div class="method-description">
237
- <p>
238
- POST a media item to the collection
239
- </p>
240
- <p><a class="source-toggle" href="#"
241
- onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
242
- <div class="method-source-code" id="M000034-source">
243
- <pre>
244
- <span class="ruby-comment cmt"># File lib/atom/collection.rb, line 40</span>
245
- 40: <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>)
246
- 41: <span class="ruby-identifier">headers</span> = {<span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">content_type</span>}
247
- 42: <span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;Slug&quot;</span>] = <span class="ruby-identifier">slug</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">slug</span>
248
- 43:
249
- 44: <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-ivar">@uri</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">headers</span>)
250
- 45: <span class="ruby-keyword kw">end</span>
251
- </pre>
252
- </div>
253
- </div>
254
- </div>
255
-
256
- <div id="method-M000032" class="method-detail">
257
- <a name="M000032"></a>
258
-
259
- <div class="method-heading">
260
- <a href="#M000032" class="method-signature">
261
- <span class="method-name">put!</span><span class="method-args">(entry, url = entry.edit_url)</span>
262
- </a>
263
- </div>
264
-
265
- <div class="method-description">
266
- <p>
267
- PUT an updated version of an entry to the collection
268
- </p>
269
- <p><a class="source-toggle" href="#"
270
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
271
- <div class="method-source-code" id="M000032-source">
272
- <pre>
273
- <span class="ruby-comment cmt"># File lib/atom/collection.rb, line 30</span>
274
- 30: <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>)
275
- 31: <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>)
276
- 32: <span class="ruby-keyword kw">end</span>
277
- </pre>
278
- </div>
279
- </div>
280
- </div>
281
-
282
- <div id="method-M000035" class="method-detail">
283
- <a name="M000035"></a>
284
-
285
- <div class="method-heading">
286
- <a href="#M000035" class="method-signature">
287
- <span class="method-name">put_media!</span><span class="method-args">(data, content_type, slug = nil)</span>
288
- </a>
289
- </div>
290
-
291
- <div class="method-description">
292
- <p>
293
- PUT a media item to the collection
294
- </p>
295
- <p><a class="source-toggle" href="#"
296
- onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
297
- <div class="method-source-code" id="M000035-source">
298
- <pre>
299
- <span class="ruby-comment cmt"># File lib/atom/collection.rb, line 48</span>
300
- 48: <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>)
301
- 49: <span class="ruby-identifier">headers</span> = {<span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">content_type</span>}
302
- 50:
303
- 51: <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>)
304
- 52: <span class="ruby-keyword kw">end</span>
305
- </pre>
306
- </div>
307
- </div>
308
- </div>
309
-
310
-
311
- </div>
312
-
313
-
314
- </div>
315
-
316
-
317
- <div id="validator-badges">
318
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
319
- </div>
320
-
321
- </body>
322
- </html>