postful 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/doc/classes/Postful/Base.html +85 -28
  2. data/doc/classes/Postful/Base.src/M000004.html +8 -8
  3. data/doc/classes/Postful/Base.src/M000005.html +8 -6
  4. data/doc/classes/Postful/Base.src/{M000002.html → M000007.html} +1 -1
  5. data/doc/classes/Postful/Base.src/{M000003.html → M000008.html} +1 -1
  6. data/doc/classes/Postful/Base.src/M000009.html +22 -0
  7. data/doc/classes/Postful/Base.src/M000010.html +20 -0
  8. data/doc/classes/Postful/Base.src/{M000006.html → M000011.html} +1 -1
  9. data/doc/classes/Postful/Base.src/M000012.html +20 -0
  10. data/doc/classes/Postful/Document.html +176 -0
  11. data/doc/classes/Postful/{Base.src/M000001.html → Document.src/M000026.html} +2 -4
  12. data/doc/classes/Postful/Document.src/M000027.html +18 -0
  13. data/doc/classes/Postful/Document.src/M000028.html +18 -0
  14. data/doc/classes/Postful/Letter.html +168 -60
  15. data/doc/classes/Postful/Letter.src/{M000018.html → M000041.html} +2 -2
  16. data/doc/classes/Postful/Letter.src/{M000019.html → M000042.html} +2 -2
  17. data/doc/classes/Postful/Letter.src/M000043.html +18 -0
  18. data/doc/classes/Postful/Letter.src/{M000020.html → M000044.html} +2 -2
  19. data/doc/classes/Postful/Letter.src/{M000021.html → M000045.html} +2 -2
  20. data/doc/classes/Postful/Letter.src/M000046.html +18 -0
  21. data/doc/classes/Postful/Letter.src/{M000022.html → M000047.html} +2 -2
  22. data/doc/classes/Postful/Letter.src/{M000023.html → M000048.html} +2 -2
  23. data/doc/classes/Postful/Letter.src/M000049.html +18 -0
  24. data/doc/classes/Postful/Letter.src/{M000024.html → M000050.html} +2 -2
  25. data/doc/classes/Postful/Letter.src/{M000025.html → M000051.html} +2 -2
  26. data/doc/classes/Postful/Letter.src/M000052.html +18 -0
  27. data/doc/classes/Postful/Letter.src/{M000026.html → M000053.html} +2 -2
  28. data/doc/classes/Postful/Letter.src/{M000027.html → M000054.html} +2 -2
  29. data/doc/classes/Postful/Letter.src/M000055.html +18 -0
  30. data/doc/classes/Postful/Letter.src/{M000028.html → M000056.html} +2 -2
  31. data/doc/classes/Postful/Letter.src/{M000029.html → M000057.html} +2 -2
  32. data/doc/classes/Postful/Letter.src/M000058.html +18 -0
  33. data/doc/classes/Postful/Order.html +20 -20
  34. data/doc/classes/Postful/Order.src/{M000007.html → M000013.html} +0 -0
  35. data/doc/classes/Postful/Order.src/{M000008.html → M000014.html} +0 -0
  36. data/doc/classes/Postful/Order.src/{M000009.html → M000015.html} +0 -0
  37. data/doc/classes/Postful/Order.src/{M000010.html → M000016.html} +0 -0
  38. data/doc/classes/Postful/Postcard.html +15 -15
  39. data/doc/classes/Postful/Postcard.src/{M000011.html → M000023.html} +0 -0
  40. data/doc/classes/Postful/Postcard.src/{M000012.html → M000024.html} +0 -0
  41. data/doc/classes/Postful/Postcard.src/{M000013.html → M000025.html} +0 -0
  42. data/doc/classes/Postful/Section.html +221 -0
  43. data/doc/classes/Postful/Section.src/M000017.html +21 -0
  44. data/doc/classes/Postful/Section.src/M000018.html +18 -0
  45. data/doc/classes/Postful/Section.src/M000019.html +20 -0
  46. data/doc/classes/Postful/Section.src/M000020.html +18 -0
  47. data/doc/classes/Postful/Section.src/M000021.html +25 -0
  48. data/doc/classes/Postful/Section.src/M000022.html +22 -0
  49. data/doc/classes/Postful/Service.html +20 -20
  50. data/doc/classes/Postful/Service.src/{M000014.html → M000037.html} +0 -0
  51. data/doc/classes/Postful/Service.src/{M000015.html → M000038.html} +0 -0
  52. data/doc/classes/Postful/Service.src/{M000016.html → M000039.html} +0 -0
  53. data/doc/classes/Postful/Service.src/{M000017.html → M000040.html} +0 -0
  54. data/doc/classes/Postful/SimpleDocument.html +197 -0
  55. data/doc/classes/Postful/SimpleDocument.src/M000001.html +22 -0
  56. data/doc/classes/Postful/SimpleDocument.src/M000002.html +18 -0
  57. data/doc/classes/Postful/SimpleDocument.src/M000003.html +29 -0
  58. data/doc/classes/Postful/TemplateDocument.html +274 -0
  59. data/doc/classes/Postful/TemplateDocument.src/M000029.html +36 -0
  60. data/doc/classes/Postful/TemplateDocument.src/M000030.html +22 -0
  61. data/doc/classes/Postful/TemplateDocument.src/M000031.html +18 -0
  62. data/doc/classes/Postful/TemplateDocument.src/M000033.html +21 -0
  63. data/doc/classes/Postful/TemplateDocument.src/M000035.html +18 -0
  64. data/doc/classes/Postful/TemplateDocument.src/M000036.html +20 -0
  65. data/doc/created.rid +1 -1
  66. data/doc/files/MIT-LICENSE.html +1 -1
  67. data/doc/files/README.html +1 -1
  68. data/doc/files/lib/postful/base_rb.html +1 -1
  69. data/doc/files/lib/postful/document_rb.html +101 -0
  70. data/doc/files/lib/postful/instance_exec_module_rb.html +1 -1
  71. data/doc/files/lib/postful/letter_rb.html +1 -1
  72. data/doc/files/lib/postful/order_rb.html +1 -1
  73. data/doc/files/lib/postful/postcard_rb.html +1 -1
  74. data/doc/files/lib/postful/section_rb.html +101 -0
  75. data/doc/files/lib/postful/service_rb.html +1 -1
  76. data/doc/files/lib/postful/simple_document_rb.html +101 -0
  77. data/doc/files/lib/postful/template_document_rb.html +101 -0
  78. data/doc/files/lib/postful/util_rb.html +1 -1
  79. data/doc/files/lib/postful_rb.html +1 -1
  80. data/doc/fr_class_index.html +4 -0
  81. data/doc/fr_file_index.html +4 -0
  82. data/doc/fr_method_index.html +58 -29
  83. data/lib/postful/base.rb +20 -0
  84. data/lib/postful/document.rb +18 -0
  85. data/lib/postful/letter.rb +55 -48
  86. data/lib/postful/postcard.rb +4 -0
  87. data/lib/postful/section.rb +46 -0
  88. data/lib/postful/simple_document.rb +38 -0
  89. data/lib/postful/template_document.rb +66 -0
  90. data/lib/postful/util.rb +70 -21
  91. data/test/test_base.rb +71 -0
  92. data/test/test_letter.rb +6 -0
  93. data/test/test_postcard.rb +13 -1
  94. metadata +71 -29
@@ -0,0 +1,29 @@
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>
7
+ <head>
8
+ <title>upload (Postful::SimpleDocument)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/simple_document.rb, line 23</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upload</span>
15
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">requires_upload?</span>
16
+ <span class="ruby-identifier">headers</span> = {
17
+ <span class="ruby-value str">'Content-Type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'application/octet-stream'</span>,
18
+ <span class="ruby-value str">'Content-Length'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">content</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_s</span>
19
+ }
20
+ <span class="ruby-identifier">response</span> = <span class="ruby-identifier">post_request_on_path</span>(<span class="ruby-value str">'/service/upload'</span>, <span class="ruby-identifier">content</span>, <span class="ruby-ivar">@email</span>, <span class="ruby-ivar">@password</span>, <span class="ruby-identifier">headers</span>)
21
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPOK</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/&lt;id&gt;(.*)&lt;\/id&gt;/</span>
22
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">attachment_name</span> = <span class="ruby-identifier">$1</span>
23
+ <span class="ruby-keyword kw">else</span>
24
+ <span class="ruby-comment cmt"># raise stuff</span>
25
+ <span class="ruby-keyword kw">end</span>
26
+ <span class="ruby-keyword kw">end</span>
27
+ <span class="ruby-keyword kw">end</span></pre>
28
+ </body>
29
+ </html>
@@ -0,0 +1,274 @@
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: Postful::TemplateDocument</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">Postful::TemplateDocument</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/postful/template_document_rb.html">
59
+ lib/postful/template_document.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="Document.html">
69
+ Document
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="#M000031">add_property</a>&nbsp;&nbsp;
92
+ <a href="#M000033">add_section</a>&nbsp;&nbsp;
93
+ <a href="#M000029">build_request</a>&nbsp;&nbsp;
94
+ <a href="#M000036">do_upload</a>&nbsp;&nbsp;
95
+ <a href="#M000030">new</a>&nbsp;&nbsp;
96
+ <a href="#M000032">property</a>&nbsp;&nbsp;
97
+ <a href="#M000035">requires_upload?</a>&nbsp;&nbsp;
98
+ <a href="#M000034">section</a>&nbsp;&nbsp;
99
+ </div>
100
+ </div>
101
+
102
+ </div>
103
+
104
+
105
+ <!-- if includes -->
106
+
107
+ <div id="section">
108
+
109
+
110
+
111
+
112
+
113
+ <div id="attribute-list">
114
+ <h3 class="section-bar">Attributes</h3>
115
+
116
+ <div class="name-list">
117
+ <table>
118
+ <tr class="top-aligned-row context-row">
119
+ <td class="context-item-name">name</td>
120
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
121
+ <td class="context-item-desc"></td>
122
+ </tr>
123
+ <tr class="top-aligned-row context-row">
124
+ <td class="context-item-name">properties</td>
125
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
126
+ <td class="context-item-desc"></td>
127
+ </tr>
128
+ <tr class="top-aligned-row context-row">
129
+ <td class="context-item-name">sections</td>
130
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
131
+ <td class="context-item-desc"></td>
132
+ </tr>
133
+ <tr class="top-aligned-row context-row">
134
+ <td class="context-item-name">source</td>
135
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
136
+ <td class="context-item-desc"></td>
137
+ </tr>
138
+ </table>
139
+ </div>
140
+ </div>
141
+
142
+
143
+
144
+ <!-- if method_list -->
145
+ <div id="methods">
146
+ <h3 class="section-bar">Public Class methods</h3>
147
+
148
+ <div id="method-M000030" class="method-detail">
149
+ <a name="M000030"></a>
150
+
151
+ <div class="method-heading">
152
+ <a href="TemplateDocument.src/M000030.html" target="Code" class="method-signature"
153
+ onclick="popupCode('TemplateDocument.src/M000030.html');return false;">
154
+ <span class="method-name">new</span><span class="method-args">(name, email, password)</span>
155
+ </a>
156
+ </div>
157
+
158
+ <div class="method-description">
159
+ </div>
160
+ </div>
161
+
162
+ <h3 class="section-bar">Public Instance methods</h3>
163
+
164
+ <div id="method-M000031" class="method-detail">
165
+ <a name="M000031"></a>
166
+
167
+ <div class="method-heading">
168
+ <a href="TemplateDocument.src/M000031.html" target="Code" class="method-signature"
169
+ onclick="popupCode('TemplateDocument.src/M000031.html');return false;">
170
+ <span class="method-name">add_property</span><span class="method-args">(key, value)</span>
171
+ </a>
172
+ </div>
173
+
174
+ <div class="method-description">
175
+ </div>
176
+ </div>
177
+
178
+ <div id="method-M000033" class="method-detail">
179
+ <a name="M000033"></a>
180
+
181
+ <div class="method-heading">
182
+ <a href="TemplateDocument.src/M000033.html" target="Code" class="method-signature"
183
+ onclick="popupCode('TemplateDocument.src/M000033.html');return false;">
184
+ <span class="method-name">add_section</span><span class="method-args">(name, &amp;block)</span>
185
+ </a>
186
+ </div>
187
+
188
+ <div class="method-description">
189
+ </div>
190
+ </div>
191
+
192
+ <div id="method-M000029" class="method-detail">
193
+ <a name="M000029"></a>
194
+
195
+ <div class="method-heading">
196
+ <a href="TemplateDocument.src/M000029.html" target="Code" class="method-signature"
197
+ onclick="popupCode('TemplateDocument.src/M000029.html');return false;">
198
+ <span class="method-name">build_request</span><span class="method-args">(builder)</span>
199
+ </a>
200
+ </div>
201
+
202
+ <div class="method-description">
203
+ </div>
204
+ </div>
205
+
206
+ <div id="method-M000036" class="method-detail">
207
+ <a name="M000036"></a>
208
+
209
+ <div class="method-heading">
210
+ <a href="TemplateDocument.src/M000036.html" target="Code" class="method-signature"
211
+ onclick="popupCode('TemplateDocument.src/M000036.html');return false;">
212
+ <span class="method-name">do_upload</span><span class="method-args">()</span>
213
+ </a>
214
+ </div>
215
+
216
+ <div class="method-description">
217
+ </div>
218
+ </div>
219
+
220
+ <div id="method-M000032" class="method-detail">
221
+ <a name="M000032"></a>
222
+
223
+ <div class="method-heading">
224
+ <span class="method-name">property</span><span class="method-args">(key, value)</span>
225
+ </div>
226
+
227
+ <div class="method-description">
228
+ <p>
229
+ Alias for <a href="TemplateDocument.html#M000031">add_property</a>
230
+ </p>
231
+ </div>
232
+ </div>
233
+
234
+ <div id="method-M000035" class="method-detail">
235
+ <a name="M000035"></a>
236
+
237
+ <div class="method-heading">
238
+ <a href="TemplateDocument.src/M000035.html" target="Code" class="method-signature"
239
+ onclick="popupCode('TemplateDocument.src/M000035.html');return false;">
240
+ <span class="method-name">requires_upload?</span><span class="method-args">()</span>
241
+ </a>
242
+ </div>
243
+
244
+ <div class="method-description">
245
+ </div>
246
+ </div>
247
+
248
+ <div id="method-M000034" class="method-detail">
249
+ <a name="M000034"></a>
250
+
251
+ <div class="method-heading">
252
+ <span class="method-name">section</span><span class="method-args">(name, &amp;block)</span>
253
+ </div>
254
+
255
+ <div class="method-description">
256
+ <p>
257
+ Alias for <a href="TemplateDocument.html#M000033">add_section</a>
258
+ </p>
259
+ </div>
260
+ </div>
261
+
262
+
263
+ </div>
264
+
265
+
266
+ </div>
267
+
268
+
269
+ <div id="validator-badges">
270
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
271
+ </div>
272
+
273
+ </body>
274
+ </html>
@@ -0,0 +1,36 @@
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>
7
+ <head>
8
+ <title>build_request (Postful::TemplateDocument)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/template_document.rb, line 6</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_request</span>(<span class="ruby-identifier">builder</span>)
15
+ <span class="ruby-identifier">builder</span>.<span class="ruby-identifier">document</span> <span class="ruby-keyword kw">do</span>
16
+ <span class="ruby-identifier">builder</span>.<span class="ruby-identifier">template</span> <span class="ruby-keyword kw">do</span>
17
+ <span class="ruby-identifier">builder</span>.<span class="ruby-identifier">source</span> <span class="ruby-identifier">source</span>
18
+ <span class="ruby-identifier">builder</span>.<span class="ruby-identifier">name</span> <span class="ruby-identifier">name</span>
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-identifier">builder</span>.<span class="ruby-identifier">sections</span> <span class="ruby-keyword kw">do</span>
21
+ <span class="ruby-identifier">sections</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">section</span><span class="ruby-operator">|</span>
22
+ <span class="ruby-identifier">section</span>.<span class="ruby-identifier">build_request</span>(<span class="ruby-identifier">builder</span>)
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sections</span>.<span class="ruby-identifier">any?</span>
25
+ <span class="ruby-identifier">builder</span>.<span class="ruby-identifier">properties</span> <span class="ruby-keyword kw">do</span>
26
+ <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
27
+ <span class="ruby-identifier">builder</span>.<span class="ruby-identifier">property</span> <span class="ruby-keyword kw">do</span>
28
+ <span class="ruby-identifier">builder</span>.<span class="ruby-identifier">key</span> <span class="ruby-identifier">key</span>
29
+ <span class="ruby-identifier">builder</span>.<span class="ruby-identifier">value</span> <span class="ruby-identifier">value</span>
30
+ <span class="ruby-keyword kw">end</span>
31
+ <span class="ruby-keyword kw">end</span>
32
+ <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">any?</span>
33
+ <span class="ruby-keyword kw">end</span>
34
+ <span class="ruby-keyword kw">end</span></pre>
35
+ </body>
36
+ </html>
@@ -0,0 +1,22 @@
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>
7
+ <head>
8
+ <title>new (Postful::TemplateDocument)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/template_document.rb, line 28</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">email</span>, <span class="ruby-identifier">password</span>)
15
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">email</span>, <span class="ruby-identifier">password</span>)
16
+ <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
17
+ <span class="ruby-ivar">@source</span> = <span class="ruby-value str">'gallery'</span>
18
+ <span class="ruby-ivar">@sections</span> = []
19
+ <span class="ruby-ivar">@properties</span> = {}
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>add_property (Postful::TemplateDocument)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/template_document.rb, line 41</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_property</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
15
+ <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,21 @@
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>
7
+ <head>
8
+ <title>add_section (Postful::TemplateDocument)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/template_document.rb, line 47</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_section</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ <span class="ruby-identifier">returning</span> <span class="ruby-constant">Section</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-ivar">@email</span>, <span class="ruby-ivar">@password</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">section</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">section</span>.<span class="ruby-identifier">instance_exec</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
17
+ <span class="ruby-identifier">sections</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">section</span>
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>requires_upload? (Postful::TemplateDocument)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/template_document.rb, line 56</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">requires_upload?</span>
15
+ <span class="ruby-operator">!</span>(<span class="ruby-identifier">sections</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">section</span><span class="ruby-operator">|</span> <span class="ruby-identifier">section</span>.<span class="ruby-identifier">requires_upload?</span> }).<span class="ruby-identifier">nil?</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,20 @@
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>
7
+ <head>
8
+ <title>do_upload (Postful::TemplateDocument)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/template_document.rb, line 60</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_upload</span>
15
+ <span class="ruby-identifier">sections</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">section</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">section</span>.<span class="ruby-identifier">do_upload</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">section</span>.<span class="ruby-identifier">requires_upload?</span>
17
+ <span class="ruby-keyword kw">end</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>