postful 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. data/doc/classes/Postful/Letter.html +60 -60
  2. data/doc/classes/Postful/Letter.src/M000018.html +4 -4
  3. data/doc/classes/Postful/Letter.src/M000019.html +4 -4
  4. data/doc/classes/Postful/Letter.src/M000020.html +4 -4
  5. data/doc/classes/Postful/Letter.src/M000021.html +4 -4
  6. data/doc/classes/Postful/Letter.src/M000022.html +4 -4
  7. data/doc/classes/Postful/Letter.src/M000023.html +4 -4
  8. data/doc/classes/Postful/Letter.src/M000024.html +4 -4
  9. data/doc/classes/Postful/Letter.src/M000025.html +4 -4
  10. data/doc/classes/Postful/Letter.src/M000026.html +4 -4
  11. data/doc/classes/Postful/Letter.src/{M000016.html → M000027.html} +4 -4
  12. data/doc/classes/Postful/Letter.src/{M000017.html → M000028.html} +4 -4
  13. data/doc/classes/Postful/Letter.src/{M000015.html → M000029.html} +4 -4
  14. data/doc/classes/Postful/Postcard.html +222 -0
  15. data/doc/classes/Postful/{Service.src → Postcard.src}/M000011.html +4 -5
  16. data/doc/classes/Postful/Postcard.src/M000012.html +18 -0
  17. data/doc/classes/Postful/Postcard.src/M000013.html +18 -0
  18. data/doc/classes/Postful/Service.html +20 -20
  19. data/doc/classes/Postful/Service.src/M000014.html +5 -10
  20. data/doc/classes/Postful/Service.src/{M000012.html → M000015.html} +0 -0
  21. data/doc/classes/Postful/Service.src/{M000013.html → M000016.html} +0 -0
  22. data/doc/classes/Postful/Service.src/M000017.html +24 -0
  23. data/doc/created.rid +1 -1
  24. data/doc/files/README.html +42 -2
  25. data/doc/files/lib/postful/base_rb.html +1 -1
  26. data/doc/files/lib/postful/letter_rb.html +1 -1
  27. data/doc/files/lib/postful/postcard_rb.html +109 -0
  28. data/doc/files/lib/postful/service_rb.html +1 -1
  29. data/doc/files/lib/postful/util_rb.html +1 -1
  30. data/doc/files/lib/postful_rb.html +2 -1
  31. data/doc/fr_class_index.html +1 -0
  32. data/doc/fr_file_index.html +1 -0
  33. data/doc/fr_method_index.html +19 -16
  34. data/lib/postful.rb +2 -1
  35. data/lib/postful/base.rb +0 -1
  36. data/lib/postful/letter.rb +7 -3
  37. data/lib/postful/postcard.rb +162 -0
  38. data/lib/postful/util.rb +10 -7
  39. data/test/suite.rb +1 -0
  40. data/test/test_letter.rb +2 -2
  41. data/test/test_postcard.rb +104 -2
  42. metadata +15 -8
@@ -0,0 +1,222 @@
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::Postcard</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::Postcard</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/postful/postcard_rb.html">
59
+ lib/postful/postcard.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="Base.html">
69
+ Base
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
+ Builder for mailing postcards with the Postful Web <a
86
+ href="Service.html">Service</a>.
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="#M000013">add_border</a>&nbsp;&nbsp;
99
+ <a href="#M000012">back_image_from_file=</a>&nbsp;&nbsp;
100
+ <a href="#M000011">front_image_from_file=</a>&nbsp;&nbsp;
101
+ </div>
102
+ </div>
103
+
104
+ </div>
105
+
106
+
107
+ <!-- if includes -->
108
+
109
+ <div id="section">
110
+
111
+
112
+ <div id="constants-list">
113
+ <h3 class="section-bar">Constants</h3>
114
+
115
+ <div class="name-list">
116
+ <table summary="Constants">
117
+ <tr class="top-aligned-row context-row">
118
+ <td class="context-item-name">FIT</td>
119
+ <td>=</td>
120
+ <td class="context-item-value">'Postcard: Image fit front'</td>
121
+ </tr>
122
+ <tr class="top-aligned-row context-row">
123
+ <td class="context-item-name">FILL</td>
124
+ <td>=</td>
125
+ <td class="context-item-value">'Postcard: Image fill front'</td>
126
+ </tr>
127
+ <tr class="top-aligned-row context-row">
128
+ <td class="context-item-name">IMAGES</td>
129
+ <td>=</td>
130
+ <td class="context-item-value">'Postcard: Image front and back'</td>
131
+ </tr>
132
+ </table>
133
+ </div>
134
+ </div>
135
+
136
+
137
+
138
+ <div id="attribute-list">
139
+ <h3 class="section-bar">Attributes</h3>
140
+
141
+ <div class="name-list">
142
+ <table>
143
+ <tr class="top-aligned-row context-row">
144
+ <td class="context-item-name">back_image</td>
145
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
146
+ <td class="context-item-desc"></td>
147
+ </tr>
148
+ <tr class="top-aligned-row context-row">
149
+ <td class="context-item-name">back_text</td>
150
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
151
+ <td class="context-item-desc"></td>
152
+ </tr>
153
+ <tr class="top-aligned-row context-row">
154
+ <td class="context-item-name">front_image</td>
155
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
156
+ <td class="context-item-desc"></td>
157
+ </tr>
158
+ </table>
159
+ </div>
160
+ </div>
161
+
162
+
163
+
164
+ <!-- if method_list -->
165
+ <div id="methods">
166
+ <h3 class="section-bar">Public Instance methods</h3>
167
+
168
+ <div id="method-M000013" class="method-detail">
169
+ <a name="M000013"></a>
170
+
171
+ <div class="method-heading">
172
+ <a href="Postcard.src/M000013.html" target="Code" class="method-signature"
173
+ onclick="popupCode('Postcard.src/M000013.html');return false;">
174
+ <span class="method-name">add_border</span><span class="method-args">()</span>
175
+ </a>
176
+ </div>
177
+
178
+ <div class="method-description">
179
+ </div>
180
+ </div>
181
+
182
+ <div id="method-M000012" class="method-detail">
183
+ <a name="M000012"></a>
184
+
185
+ <div class="method-heading">
186
+ <a href="Postcard.src/M000012.html" target="Code" class="method-signature"
187
+ onclick="popupCode('Postcard.src/M000012.html');return false;">
188
+ <span class="method-name">back_image_from_file=</span><span class="method-args">(filename)</span>
189
+ </a>
190
+ </div>
191
+
192
+ <div class="method-description">
193
+ </div>
194
+ </div>
195
+
196
+ <div id="method-M000011" class="method-detail">
197
+ <a name="M000011"></a>
198
+
199
+ <div class="method-heading">
200
+ <a href="Postcard.src/M000011.html" target="Code" class="method-signature"
201
+ onclick="popupCode('Postcard.src/M000011.html');return false;">
202
+ <span class="method-name">front_image_from_file=</span><span class="method-args">(filename)</span>
203
+ </a>
204
+ </div>
205
+
206
+ <div class="method-description">
207
+ </div>
208
+ </div>
209
+
210
+
211
+ </div>
212
+
213
+
214
+ </div>
215
+
216
+
217
+ <div id="validator-badges">
218
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
219
+ </div>
220
+
221
+ </body>
222
+ </html>
@@ -5,15 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>new (Postful::Service)</title>
8
+ <title>front_image_from_file= (Postful::Postcard)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/postful/service.rb, line 10</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">email</span>, <span class="ruby-identifier">password</span>)
15
- <span class="ruby-ivar">@email</span> = <span class="ruby-identifier">email</span>
16
- <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/postcard.rb, line 17</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">front_image_from_file=</span>(<span class="ruby-identifier">filename</span>)
15
+ <span class="ruby-ivar">@front_image</span> = <span class="ruby-identifier">get_file</span>(<span class="ruby-identifier">filename</span>)
17
16
  <span class="ruby-keyword kw">end</span></pre>
18
17
  </body>
19
18
  </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>back_image_from_file= (Postful::Postcard)</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/postcard.rb, line 21</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">back_image_from_file=</span>(<span class="ruby-identifier">filename</span>)
15
+ <span class="ruby-ivar">@back_image</span> = <span class="ruby-identifier">get_file</span>(<span class="ruby-identifier">filename</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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_border (Postful::Postcard)</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/postcard.rb, line 25</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_border</span>
15
+ <span class="ruby-ivar">@border</span> = <span class="ruby-keyword kw">true</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -86,10 +86,10 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000013">cancel_order_by_id</a>&nbsp;&nbsp;
90
- <a href="#M000014">find_all_orders</a>&nbsp;&nbsp;
91
- <a href="#M000012">find_order_by_id</a>&nbsp;&nbsp;
92
- <a href="#M000011">new</a>&nbsp;&nbsp;
89
+ <a href="#M000016">cancel_order_by_id</a>&nbsp;&nbsp;
90
+ <a href="#M000017">find_all_orders</a>&nbsp;&nbsp;
91
+ <a href="#M000015">find_order_by_id</a>&nbsp;&nbsp;
92
+ <a href="#M000014">new</a>&nbsp;&nbsp;
93
93
  </div>
94
94
  </div>
95
95
 
@@ -118,12 +118,12 @@
118
118
  <div id="methods">
119
119
  <h3 class="section-bar">Public Class methods</h3>
120
120
 
121
- <div id="method-M000011" class="method-detail">
122
- <a name="M000011"></a>
121
+ <div id="method-M000014" class="method-detail">
122
+ <a name="M000014"></a>
123
123
 
124
124
  <div class="method-heading">
125
- <a href="Service.src/M000011.html" target="Code" class="method-signature"
126
- onclick="popupCode('Service.src/M000011.html');return false;">
125
+ <a href="Service.src/M000014.html" target="Code" class="method-signature"
126
+ onclick="popupCode('Service.src/M000014.html');return false;">
127
127
  <span class="method-name">new</span><span class="method-args">(email, password)</span>
128
128
  </a>
129
129
  </div>
@@ -134,12 +134,12 @@
134
134
 
135
135
  <h3 class="section-bar">Public Instance methods</h3>
136
136
 
137
- <div id="method-M000013" class="method-detail">
138
- <a name="M000013"></a>
137
+ <div id="method-M000016" class="method-detail">
138
+ <a name="M000016"></a>
139
139
 
140
140
  <div class="method-heading">
141
- <a href="Service.src/M000013.html" target="Code" class="method-signature"
142
- onclick="popupCode('Service.src/M000013.html');return false;">
141
+ <a href="Service.src/M000016.html" target="Code" class="method-signature"
142
+ onclick="popupCode('Service.src/M000016.html');return false;">
143
143
  <span class="method-name">cancel_order_by_id</span><span class="method-args">(id)</span>
144
144
  </a>
145
145
  </div>
@@ -148,12 +148,12 @@
148
148
  </div>
149
149
  </div>
150
150
 
151
- <div id="method-M000014" class="method-detail">
152
- <a name="M000014"></a>
151
+ <div id="method-M000017" class="method-detail">
152
+ <a name="M000017"></a>
153
153
 
154
154
  <div class="method-heading">
155
- <a href="Service.src/M000014.html" target="Code" class="method-signature"
156
- onclick="popupCode('Service.src/M000014.html');return false;">
155
+ <a href="Service.src/M000017.html" target="Code" class="method-signature"
156
+ onclick="popupCode('Service.src/M000017.html');return false;">
157
157
  <span class="method-name">find_all_orders</span><span class="method-args">()</span>
158
158
  </a>
159
159
  </div>
@@ -162,12 +162,12 @@
162
162
  </div>
163
163
  </div>
164
164
 
165
- <div id="method-M000012" class="method-detail">
166
- <a name="M000012"></a>
165
+ <div id="method-M000015" class="method-detail">
166
+ <a name="M000015"></a>
167
167
 
168
168
  <div class="method-heading">
169
- <a href="Service.src/M000012.html" target="Code" class="method-signature"
170
- onclick="popupCode('Service.src/M000012.html');return false;">
169
+ <a href="Service.src/M000015.html" target="Code" class="method-signature"
170
+ onclick="popupCode('Service.src/M000015.html');return false;">
171
171
  <span class="method-name">find_order_by_id</span><span class="method-args">(id)</span>
172
172
  </a>
173
173
  </div>
@@ -5,20 +5,15 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>find_all_orders (Postful::Service)</title>
8
+ <title>new (Postful::Service)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/postful/service.rb, line 30</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_all_orders</span>
15
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">get_request_on_path</span>(<span class="ruby-value str">&quot;/service/mail&quot;</span>, <span class="ruby-ivar">@email</span>, <span class="ruby-ivar">@password</span>)
16
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">code</span>
17
- <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;200&quot;</span> <span class="ruby-keyword kw">then</span>
18
- <span class="ruby-constant">Postful</span><span class="ruby-operator">::</span><span class="ruby-constant">Order</span>.<span class="ruby-identifier">build_all_from_response</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>, <span class="ruby-ivar">@email</span>, <span class="ruby-ivar">@password</span>)
19
- <span class="ruby-keyword kw">else</span>
20
- <span class="ruby-identifier">process_standard_responses</span>(<span class="ruby-identifier">response</span>)
21
- <span class="ruby-keyword kw">end</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/postful/service.rb, line 10</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">email</span>, <span class="ruby-identifier">password</span>)
15
+ <span class="ruby-ivar">@email</span> = <span class="ruby-identifier">email</span>
16
+ <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
22
17
  <span class="ruby-keyword kw">end</span></pre>
23
18
  </body>
24
19
  </html>
@@ -0,0 +1,24 @@
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>find_all_orders (Postful::Service)</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/service.rb, line 30</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_all_orders</span>
15
+ <span class="ruby-identifier">response</span> = <span class="ruby-identifier">get_request_on_path</span>(<span class="ruby-value str">&quot;/service/mail&quot;</span>, <span class="ruby-ivar">@email</span>, <span class="ruby-ivar">@password</span>)
16
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">code</span>
17
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;200&quot;</span> <span class="ruby-keyword kw">then</span>
18
+ <span class="ruby-constant">Postful</span><span class="ruby-operator">::</span><span class="ruby-constant">Order</span>.<span class="ruby-identifier">build_all_from_response</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>, <span class="ruby-ivar">@email</span>, <span class="ruby-ivar">@password</span>)
19
+ <span class="ruby-keyword kw">else</span>
20
+ <span class="ruby-identifier">process_standard_responses</span>(<span class="ruby-identifier">response</span>)
21
+ <span class="ruby-keyword kw">end</span>
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -1 +1 @@
1
- Sun, 10 Aug 2008 15:14:31 -0700
1
+ Tue, 12 Aug 2008 18:21:40 -0700
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sat Aug 09 20:50:22 -0700 2008</td>
59
+ <td>Tue Aug 12 16:26:03 -0700 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -89,11 +89,13 @@ The only prerequisite to the use of the client is a Postful user acccount.
89
89
  Sign ups are available at <a
90
90
  href="http://www.postful.com/user/signup">www.postful.com/user/signup</a>.
91
91
  </p>
92
- <h1>Synopsis</h1>
92
+ <h1>Examples</h1>
93
93
  <p>
94
94
  This is how to mail a letter via the Postful Web Service:
95
95
  </p>
96
96
  <pre>
97
+ require 'postful'
98
+
97
99
  letter = Postful::Letter.new('mysignupemail@mydomain.com', 'mypassword')
98
100
  letter.add_text_document 'Hello, World!'
99
101
  letter.add_address :name =&gt; 'World',
@@ -103,6 +105,44 @@ This is how to mail a letter via the Postful Web Service:
103
105
  :postal_code =&gt; '10000'
104
106
  letter.mail!
105
107
  </pre>
108
+ <p>
109
+ And this is how to mail a postcard:
110
+ </p>
111
+ <pre>
112
+ require 'postful'
113
+
114
+ postcard = Postful::Postcard.new('mysignupemail@mydomain.com', 'mypassword')
115
+ postcard.add_address :name =&gt; 'John Doe',
116
+ :address =&gt; '123 Main St',
117
+ :city =&gt; 'Anytown',
118
+ :state =&gt; 'AZ',
119
+ :postal_code =&gt; '10000'
120
+ </pre>
121
+ <p>
122
+ And then for a postcard with an image with full-bleed on the front:
123
+ </p>
124
+ <pre>
125
+ postcard.front_image_from_file = 'image.jpg'
126
+ postcard.back_text = 'Hello, world!'
127
+ postcard.mail!
128
+ </pre>
129
+ <p>
130
+ Or for a postcard with a border around the front image:
131
+ </p>
132
+ <pre>
133
+ postcard.front_image_from_file = 'image.jpg'
134
+ postcard.add_border
135
+ postcard.back_text = 'Hello, world!'
136
+ postcard.mail!
137
+ </pre>
138
+ <p>
139
+ Or for user-supplied images on both front and back:
140
+ </p>
141
+ <pre>
142
+ postcard.front_image_from_file = 'image.jpg'
143
+ postcard.back_image_from_file = 'image2.jpg'
144
+ postcard.mail!
145
+ </pre>
106
146
  <h1>Copyright</h1>
107
147
  <p>
108
148
  Copyright (c) 2008 Postful, Inc. &lt;support@postful.com&gt;