mack-notifier 0.7.1 → 0.7.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. metadata +2 -36
  2. data/doc/classes/Mack/Errors/UnconvertedNotifier.html +0 -111
  3. data/doc/classes/Mack/Notifier.html +0 -698
  4. data/doc/classes/Mack/Notifier/Adapters/Base.html +0 -134
  5. data/doc/classes/Mack/Notifier/Adapters/Tmail.html +0 -265
  6. data/doc/classes/Mack/Notifier/Attachment.html +0 -270
  7. data/doc/classes/Mack/Notifier/DeliveryHandlers/Sendmail.html +0 -154
  8. data/doc/classes/Mack/Notifier/DeliveryHandlers/Smtp.html +0 -153
  9. data/doc/classes/Mack/Notifier/DeliveryHandlers/Test.html +0 -147
  10. data/doc/classes/Mack/Notifier/Validatable.html +0 -419
  11. data/doc/classes/Mack/Paths.html +0 -197
  12. data/doc/classes/NotifierGenerator.html +0 -133
  13. data/doc/created.rid +0 -1
  14. data/doc/files/README.html +0 -150
  15. data/doc/files/lib/mack-notifier/adapters/base_rb.html +0 -101
  16. data/doc/files/lib/mack-notifier/adapters/tmail_rb.html +0 -108
  17. data/doc/files/lib/mack-notifier/attachment_rb.html +0 -101
  18. data/doc/files/lib/mack-notifier/delivery_handlers/sendmail_rb.html +0 -101
  19. data/doc/files/lib/mack-notifier/delivery_handlers/smtp_rb.html +0 -108
  20. data/doc/files/lib/mack-notifier/delivery_handlers/test_rb.html +0 -101
  21. data/doc/files/lib/mack-notifier/errors_rb.html +0 -101
  22. data/doc/files/lib/mack-notifier/loader_rb.html +0 -107
  23. data/doc/files/lib/mack-notifier/notifier_generator/notifier_generator_rb.html +0 -123
  24. data/doc/files/lib/mack-notifier/notifier_rb.html +0 -101
  25. data/doc/files/lib/mack-notifier/paths_rb.html +0 -101
  26. data/doc/files/lib/mack-notifier/rendering/type/mailer_rb.html +0 -101
  27. data/doc/files/lib/mack-notifier/settings_rb.html +0 -101
  28. data/doc/files/lib/mack-notifier/testing_rb.html +0 -142
  29. data/doc/files/lib/mack-notifier/validations_rb.html +0 -101
  30. data/doc/files/lib/mack-notifier_rb.html +0 -110
  31. data/doc/fr_class_index.html +0 -37
  32. data/doc/fr_file_index.html +0 -43
  33. data/doc/fr_method_index.html +0 -61
  34. data/doc/index.html +0 -24
  35. data/doc/rdoc-style.css +0 -208
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mack-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Bates
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-08 00:00:00 -04:00
12
+ date: 2008-09-14 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -66,40 +66,6 @@ files:
66
66
  - lib/mack-notifier/validations.rb
67
67
  - lib/mack-notifier.rb
68
68
  - README
69
- - doc/classes/Mack/Errors/UnconvertedNotifier.html
70
- - doc/classes/Mack/Notifier/Adapters/Base.html
71
- - doc/classes/Mack/Notifier/Adapters/Tmail.html
72
- - doc/classes/Mack/Notifier/Attachment.html
73
- - doc/classes/Mack/Notifier/DeliveryHandlers/Sendmail.html
74
- - doc/classes/Mack/Notifier/DeliveryHandlers/Smtp.html
75
- - doc/classes/Mack/Notifier/DeliveryHandlers/Test.html
76
- - doc/classes/Mack/Notifier/Validatable.html
77
- - doc/classes/Mack/Notifier.html
78
- - doc/classes/Mack/Paths.html
79
- - doc/classes/NotifierGenerator.html
80
- - doc/created.rid
81
- - doc/files/lib/mack-notifier/adapters/base_rb.html
82
- - doc/files/lib/mack-notifier/adapters/tmail_rb.html
83
- - doc/files/lib/mack-notifier/attachment_rb.html
84
- - doc/files/lib/mack-notifier/delivery_handlers/sendmail_rb.html
85
- - doc/files/lib/mack-notifier/delivery_handlers/smtp_rb.html
86
- - doc/files/lib/mack-notifier/delivery_handlers/test_rb.html
87
- - doc/files/lib/mack-notifier/errors_rb.html
88
- - doc/files/lib/mack-notifier/loader_rb.html
89
- - doc/files/lib/mack-notifier/notifier_generator/notifier_generator_rb.html
90
- - doc/files/lib/mack-notifier/notifier_rb.html
91
- - doc/files/lib/mack-notifier/paths_rb.html
92
- - doc/files/lib/mack-notifier/rendering/type/mailer_rb.html
93
- - doc/files/lib/mack-notifier/settings_rb.html
94
- - doc/files/lib/mack-notifier/testing_rb.html
95
- - doc/files/lib/mack-notifier/validations_rb.html
96
- - doc/files/lib/mack-notifier_rb.html
97
- - doc/files/README.html
98
- - doc/fr_class_index.html
99
- - doc/fr_file_index.html
100
- - doc/fr_method_index.html
101
- - doc/index.html
102
- - doc/rdoc-style.css
103
69
  has_rdoc: true
104
70
  homepage: http://www.mackframework.com
105
71
  post_install_message:
@@ -1,111 +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: Mack::Errors::UnconvertedNotifier</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">Mack::Errors::UnconvertedNotifier</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/mack-notifier/errors_rb.html">
59
- lib/mack-notifier/errors.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
- StandardError
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
-
82
-
83
- </div>
84
-
85
-
86
- </div>
87
-
88
-
89
- <!-- if includes -->
90
-
91
- <div id="section">
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <!-- if method_list -->
101
-
102
-
103
- </div>
104
-
105
-
106
- <div id="validator-badges">
107
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
- </div>
109
-
110
- </body>
111
- </html>
@@ -1,698 +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>Module: Mack::Notifier</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Mack::Notifier</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/mack-notifier/adapters/base_rb.html">
59
- lib/mack-notifier/adapters/base.rb
60
- </a>
61
- <br />
62
- <a href="../../files/lib/mack-notifier/adapters/tmail_rb.html">
63
- lib/mack-notifier/adapters/tmail.rb
64
- </a>
65
- <br />
66
- <a href="../../files/lib/mack-notifier/attachment_rb.html">
67
- lib/mack-notifier/attachment.rb
68
- </a>
69
- <br />
70
- <a href="../../files/lib/mack-notifier/delivery_handlers/sendmail_rb.html">
71
- lib/mack-notifier/delivery_handlers/sendmail.rb
72
- </a>
73
- <br />
74
- <a href="../../files/lib/mack-notifier/delivery_handlers/smtp_rb.html">
75
- lib/mack-notifier/delivery_handlers/smtp.rb
76
- </a>
77
- <br />
78
- <a href="../../files/lib/mack-notifier/delivery_handlers/test_rb.html">
79
- lib/mack-notifier/delivery_handlers/test.rb
80
- </a>
81
- <br />
82
- <a href="../../files/lib/mack-notifier/notifier_rb.html">
83
- lib/mack-notifier/notifier.rb
84
- </a>
85
- <br />
86
- <a href="../../files/lib/mack-notifier/validations_rb.html">
87
- lib/mack-notifier/validations.rb
88
- </a>
89
- <br />
90
- </td>
91
- </tr>
92
-
93
- </table>
94
- </div>
95
- <!-- banner header -->
96
-
97
- <div id="bodyContent">
98
-
99
-
100
-
101
- <div id="contextContent">
102
-
103
- <div id="description">
104
- <p>
105
- The heart and soul of the mack-notifier package.
106
- </p>
107
-
108
- </div>
109
-
110
-
111
- </div>
112
-
113
- <div id="method-list">
114
- <h3 class="section-bar">Methods</h3>
115
-
116
- <div class="name-list">
117
- <a href="#M000018">adapter</a>&nbsp;&nbsp;
118
- <a href="#M000011">attach</a>&nbsp;&nbsp;
119
- <a href="#M000013">attachments</a>&nbsp;&nbsp;
120
- <a href="#M000006">body</a>&nbsp;&nbsp;
121
- <a href="#M000005">build</a>&nbsp;&nbsp;
122
- <a href="#M000008">content_type</a>&nbsp;&nbsp;
123
- <a href="#M000009">date_sent</a>&nbsp;&nbsp;
124
- <a href="#M000014">deliver</a>&nbsp;&nbsp;
125
- <a href="#M000015">deliver!</a>&nbsp;&nbsp;
126
- <a href="#M000019">deliver_with</a>&nbsp;&nbsp;
127
- <a href="#M000017">deliverable</a>&nbsp;&nbsp;
128
- <a href="#M000012">has_attachments?</a>&nbsp;&nbsp;
129
- <a href="#M000007">mime_version</a>&nbsp;&nbsp;
130
- <a href="#M000016">recipients</a>&nbsp;&nbsp;
131
- <a href="#M000010">reply_to</a>&nbsp;&nbsp;
132
- </div>
133
- </div>
134
-
135
- </div>
136
-
137
-
138
- <!-- if includes -->
139
-
140
- <div id="section">
141
-
142
- <div id="class-list">
143
- <h3 class="section-bar">Classes and Modules</h3>
144
-
145
- Module <a href="Notifier/Validatable.html" class="link">Mack::Notifier::Validatable</a><br />
146
- Class <a href="Notifier/Attachment.html" class="link">Mack::Notifier::Attachment</a><br />
147
-
148
- </div>
149
-
150
-
151
-
152
-
153
- <div id="attribute-list">
154
- <h3 class="section-bar">Attributes</h3>
155
-
156
- <div class="name-list">
157
- <table>
158
- <tr class="top-aligned-row context-row">
159
- <td class="context-item-name">bcc</td>
160
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
161
- <td class="context-item-desc"></td>
162
- </tr>
163
- <tr class="top-aligned-row context-row">
164
- <td class="context-item-name">cc</td>
165
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
166
- <td class="context-item-desc"></td>
167
- </tr>
168
- <tr class="top-aligned-row context-row">
169
- <td class="context-item-name">content_type</td>
170
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
171
- <td class="context-item-desc"></td>
172
- </tr>
173
- <tr class="top-aligned-row context-row">
174
- <td class="context-item-name">date_sent</td>
175
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
176
- <td class="context-item-desc"></td>
177
- </tr>
178
- <tr class="top-aligned-row context-row">
179
- <td class="context-item-name">from</td>
180
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
181
- <td class="context-item-desc"></td>
182
- </tr>
183
- <tr class="top-aligned-row context-row">
184
- <td class="context-item-name">mime_version</td>
185
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
186
- <td class="context-item-desc"></td>
187
- </tr>
188
- <tr class="top-aligned-row context-row">
189
- <td class="context-item-name">reply_to</td>
190
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
191
- <td class="context-item-desc"></td>
192
- </tr>
193
- <tr class="top-aligned-row context-row">
194
- <td class="context-item-name">subject</td>
195
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
196
- <td class="context-item-desc"></td>
197
- </tr>
198
- <tr class="top-aligned-row context-row">
199
- <td class="context-item-name">to</td>
200
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
201
- <td class="context-item-desc"></td>
202
- </tr>
203
- </table>
204
- </div>
205
- </div>
206
-
207
-
208
-
209
- <!-- if method_list -->
210
- <div id="methods">
211
- <h3 class="section-bar">Public Instance methods</h3>
212
-
213
- <div id="method-M000018" class="method-detail">
214
- <a name="M000018"></a>
215
-
216
- <div class="method-heading">
217
- <a href="#M000018" class="method-signature">
218
- <span class="method-name">adapter</span><span class="method-args">()</span>
219
- </a>
220
- </div>
221
-
222
- <div class="method-description">
223
- <p>
224
- This method returns the <a href="Notifier.html#M000018">adapter</a> that
225
- will transform the <a href="Notifier.html">Mack::Notifier</a> object and
226
- prepare it for delivery. This method returns the app_config.notifier.<a
227
- href="Notifier.html#M000018">adapter</a> parameter. Override this in your
228
- <a href="Notifier.html">Mack::Notifier</a> class to specify a different <a
229
- href="Notifier.html#M000018">adapter</a> or change the app_config parameter
230
- to globally affect all your Notifiers.
231
- </p>
232
- <p>
233
- Default: :tmail
234
- </p>
235
- <p><a class="source-toggle" href="#"
236
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
237
- <div class="method-source-code" id="M000018-source">
238
- <pre>
239
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 135</span>
240
- 135: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">adapter</span>
241
- 136: <span class="ruby-identifier">app_config</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">adapter</span>
242
- 137: <span class="ruby-keyword kw">end</span>
243
- </pre>
244
- </div>
245
- </div>
246
- </div>
247
-
248
- <div id="method-M000011" class="method-detail">
249
- <a name="M000011"></a>
250
-
251
- <div class="method-heading">
252
- <a href="#M000011" class="method-signature">
253
- <span class="method-name">attach</span><span class="method-args">(file)</span>
254
- </a>
255
- </div>
256
-
257
- <div class="method-description">
258
- <p>
259
- Adds a <a href="Notifier/Attachment.html">Mack::Notifier::Attachment</a> to
260
- the notifier. Raise ArgumentError if the parameter is not a <a
261
- href="Notifier/Attachment.html">Mack::Notifier::Attachment</a>
262
- </p>
263
- <p><a class="source-toggle" href="#"
264
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
265
- <div class="method-source-code" id="M000011-source">
266
- <pre>
267
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 86</span>
268
- 86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attach</span>(<span class="ruby-identifier">file</span>)
269
- 87: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Notifier</span><span class="ruby-operator">::</span><span class="ruby-constant">Attachment</span>)
270
- 88: <span class="ruby-identifier">attachments</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>
271
- 89: <span class="ruby-keyword kw">end</span>
272
- </pre>
273
- </div>
274
- </div>
275
- </div>
276
-
277
- <div id="method-M000013" class="method-detail">
278
- <a name="M000013"></a>
279
-
280
- <div class="method-heading">
281
- <a href="#M000013" class="method-signature">
282
- <span class="method-name">attachments</span><span class="method-args">()</span>
283
- </a>
284
- </div>
285
-
286
- <div class="method-description">
287
- <p>
288
- Returns the <a href="Notifier.html#M000013">attachments</a> Array.
289
- </p>
290
- <p><a class="source-toggle" href="#"
291
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
292
- <div class="method-source-code" id="M000013-source">
293
- <pre>
294
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 97</span>
295
- 97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attachments</span>
296
- 98: <span class="ruby-ivar">@attachments</span> <span class="ruby-operator">||=</span> []
297
- 99: <span class="ruby-keyword kw">end</span>
298
- </pre>
299
- </div>
300
- </div>
301
- </div>
302
-
303
- <div id="method-M000006" class="method-detail">
304
- <a name="M000006"></a>
305
-
306
- <div class="method-heading">
307
- <a href="#M000006" class="method-signature">
308
- <span class="method-name">body</span><span class="method-args">(part, value = nil)</span>
309
- </a>
310
- </div>
311
-
312
- <div class="method-description">
313
- <p>
314
- If called with two parameters it will set the value of the <a
315
- href="Notifier.html#M000006">body</a> type to the second parameter.
316
- </p>
317
- <p>
318
- Example:
319
- </p>
320
- <pre>
321
- body(:plain, &quot;hello&quot;) # =&gt; sets the 'plain' body to &quot;hello&quot;
322
- </pre>
323
- <p>
324
- If called with just one parameter it will return the value of that <a
325
- href="Notifier.html#M000006">body</a> type. If the value is nil the
326
- template for that <a href="Notifier.html#M000006">body</a> type will be
327
- rendered.
328
- </p>
329
- <p>
330
- Example:
331
- </p>
332
- <pre>
333
- body(:plain) # =&gt; &quot;hello&quot;
334
- body(:html) # =&gt; will call the html.erb template for this notifier.
335
- </pre>
336
- <p><a class="source-toggle" href="#"
337
- onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
338
- <div class="method-source-code" id="M000006-source">
339
- <pre>
340
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 40</span>
341
- 40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">body</span>(<span class="ruby-identifier">part</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">nil</span>)
342
- 41: <span class="ruby-identifier">part</span> = <span class="ruby-identifier">part</span>.<span class="ruby-identifier">to_sym</span>
343
- 42: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
344
- 43: <span class="ruby-identifier">body</span> = <span class="ruby-identifier">bodies</span>[<span class="ruby-identifier">part</span>]
345
- 44: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">blank?</span>
346
- 45: <span class="ruby-identifier">bodies</span>[<span class="ruby-identifier">part</span>] = <span class="ruby-identifier">build_template</span>(<span class="ruby-identifier">part</span>)
347
- 46: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bodies</span>[<span class="ruby-identifier">part</span>]
348
- 47: <span class="ruby-keyword kw">else</span>
349
- 48: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">body</span>
350
- 49: <span class="ruby-keyword kw">end</span>
351
- 50: <span class="ruby-keyword kw">else</span>
352
- 51: <span class="ruby-identifier">bodies</span>[<span class="ruby-identifier">part</span>] = <span class="ruby-identifier">value</span>
353
- 52: <span class="ruby-keyword kw">end</span>
354
- 53: <span class="ruby-keyword kw">end</span>
355
- </pre>
356
- </div>
357
- </div>
358
- </div>
359
-
360
- <div id="method-M000005" class="method-detail">
361
- <a name="M000005"></a>
362
-
363
- <div class="method-heading">
364
- <a href="#M000005" class="method-signature">
365
- <span class="method-name">build</span><span class="method-args">(options = {})</span>
366
- </a>
367
- </div>
368
-
369
- <div class="method-description">
370
- <p>
371
- A helper method that takes a Hash and will populate the notification with
372
- the key/value pairs of that Hash. Use body_* to set a <a
373
- href="Notifier.html#M000006">body</a> part.
374
- </p>
375
- <p><a class="source-toggle" href="#"
376
- onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
377
- <div class="method-source-code" id="M000005-source">
378
- <pre>
379
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 17</span>
380
- 17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build</span>(<span class="ruby-identifier">options</span> = {})
381
- 18: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
382
- 19: <span class="ruby-identifier">k</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>
383
- 20: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^body_/</span>)
384
- 21: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{k}=&quot;</span>, <span class="ruby-identifier">v</span>)
385
- 22: <span class="ruby-keyword kw">else</span>
386
- 23: <span class="ruby-identifier">k</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-value str">&quot;body_&quot;</span>, <span class="ruby-value str">&quot;&quot;</span>)
387
- 24: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">body</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span>)
388
- 25: <span class="ruby-keyword kw">end</span>
389
- 26: <span class="ruby-keyword kw">end</span>
390
- 27: <span class="ruby-keyword kw">end</span>
391
- </pre>
392
- </div>
393
- </div>
394
- </div>
395
-
396
- <div id="method-M000008" class="method-detail">
397
- <a name="M000008"></a>
398
-
399
- <div class="method-heading">
400
- <a href="#M000008" class="method-signature">
401
- <span class="method-name">content_type</span><span class="method-args">()</span>
402
- </a>
403
- </div>
404
-
405
- <div class="method-description">
406
- <p>
407
- This will attempt to determine the content type of the notification, unless
408
- one is already specified.
409
- </p>
410
- <p><a class="source-toggle" href="#"
411
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
412
- <div class="method-source-code" id="M000008-source">
413
- <pre>
414
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 61</span>
415
- 61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type</span>
416
- 62: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@content_type</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@content_type</span>.<span class="ruby-identifier">blank?</span>
417
- 63: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">has_attachments?</span>
418
- 64: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;multipart/mixed&quot;</span>
419
- 65: <span class="ruby-keyword kw">elsif</span> <span class="ruby-operator">!</span><span class="ruby-identifier">body</span>(<span class="ruby-identifier">:plain</span>).<span class="ruby-identifier">blank?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">body</span>(<span class="ruby-identifier">:html</span>).<span class="ruby-identifier">blank?</span>
420
- 66: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;multipart/alternative&quot;</span>
421
- 67: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">body</span>(<span class="ruby-identifier">:html</span>)
422
- 68: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;text/html&quot;</span>
423
- 69: <span class="ruby-keyword kw">else</span>
424
- 70: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;text/plain&quot;</span>
425
- 71: <span class="ruby-keyword kw">end</span>
426
- 72: <span class="ruby-keyword kw">end</span>
427
- </pre>
428
- </div>
429
- </div>
430
- </div>
431
-
432
- <div id="method-M000009" class="method-detail">
433
- <a name="M000009"></a>
434
-
435
- <div class="method-heading">
436
- <a href="#M000009" class="method-signature">
437
- <span class="method-name">date_sent</span><span class="method-args">()</span>
438
- </a>
439
- </div>
440
-
441
- <div class="method-description">
442
- <p>
443
- Returns the date sent, defaults to Time.now
444
- </p>
445
- <p><a class="source-toggle" href="#"
446
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
447
- <div class="method-source-code" id="M000009-source">
448
- <pre>
449
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 75</span>
450
- 75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">date_sent</span>
451
- 76: (<span class="ruby-ivar">@date_sent</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>)
452
- 77: <span class="ruby-keyword kw">end</span>
453
- </pre>
454
- </div>
455
- </div>
456
- </div>
457
-
458
- <div id="method-M000014" class="method-detail">
459
- <a name="M000014"></a>
460
-
461
- <div class="method-heading">
462
- <a href="#M000014" class="method-signature">
463
- <span class="method-name">deliver</span><span class="method-args">(handler = deliver_with)</span>
464
- </a>
465
- </div>
466
-
467
- <div class="method-description">
468
- <p>
469
- Delivers the notification with the configured
470
- Mack::Notifier::DeliveryHandlers class. Returns false if there are any
471
- errors.
472
- </p>
473
- <p><a class="source-toggle" href="#"
474
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
475
- <div class="method-source-code" id="M000014-source">
476
- <pre>
477
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 103</span>
478
- 103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deliver</span>(<span class="ruby-identifier">handler</span> = <span class="ruby-identifier">deliver_with</span>)
479
- 104: <span class="ruby-keyword kw">begin</span>
480
- 105: <span class="ruby-identifier">deliver!</span>(<span class="ruby-identifier">handler</span>)
481
- 106: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
482
- 107: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
483
- 108: <span class="ruby-keyword kw">end</span>
484
- 109: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
485
- 110: <span class="ruby-keyword kw">end</span>
486
- </pre>
487
- </div>
488
- </div>
489
- </div>
490
-
491
- <div id="method-M000015" class="method-detail">
492
- <a name="M000015"></a>
493
-
494
- <div class="method-heading">
495
- <a href="#M000015" class="method-signature">
496
- <span class="method-name">deliver!</span><span class="method-args">(handler = deliver_with)</span>
497
- </a>
498
- </div>
499
-
500
- <div class="method-description">
501
- <p>
502
- Delivers the email with the configured Mack::Notifier::DeliveryHandlers
503
- class.
504
- </p>
505
- <p><a class="source-toggle" href="#"
506
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
507
- <div class="method-source-code" id="M000015-source">
508
- <pre>
509
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 113</span>
510
- 113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deliver!</span>(<span class="ruby-identifier">handler</span> = <span class="ruby-identifier">deliver_with</span>)
511
- 114: <span class="ruby-node">&quot;Mack::Notifier::DeliveryHandlers::#{handler.to_s.camelcase}&quot;</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">deliver</span>(<span class="ruby-keyword kw">self</span>)
512
- 115: <span class="ruby-keyword kw">end</span>
513
- </pre>
514
- </div>
515
- </div>
516
- </div>
517
-
518
- <div id="method-M000019" class="method-detail">
519
- <a name="M000019"></a>
520
-
521
- <div class="method-heading">
522
- <a href="#M000019" class="method-signature">
523
- <span class="method-name">deliver_with</span><span class="method-args">()</span>
524
- </a>
525
- </div>
526
-
527
- <div class="method-description">
528
- <p>
529
- This method returns the delivery handler that will delivers the <a
530
- href="Notifier.html">Mack::Notifier</a> object. This method returns the
531
- app_config.notifier.<a href="Notifier.html#M000019">deliver_with</a>
532
- parameter. Override this in your <a href="Notifier.html">Mack::Notifier</a>
533
- class to specify a different handler or change the app_config parameter to
534
- globally affect all your Notifiers.
535
- </p>
536
- <p>
537
- Default: :sendmail
538
- </p>
539
- <p><a class="source-toggle" href="#"
540
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
541
- <div class="method-source-code" id="M000019-source">
542
- <pre>
543
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 145</span>
544
- 145: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deliver_with</span>
545
- 146: <span class="ruby-identifier">app_config</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">deliver_with</span>
546
- 147: <span class="ruby-keyword kw">end</span>
547
- </pre>
548
- </div>
549
- </div>
550
- </div>
551
-
552
- <div id="method-M000017" class="method-detail">
553
- <a name="M000017"></a>
554
-
555
- <div class="method-heading">
556
- <a href="#M000017" class="method-signature">
557
- <span class="method-name">deliverable</span><span class="method-args">(adap = adapter)</span>
558
- </a>
559
- </div>
560
-
561
- <div class="method-description">
562
- <p>
563
- Returns a ready to be delivered, encoded, version of the notification.
564
- </p>
565
- <p><a class="source-toggle" href="#"
566
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
567
- <div class="method-source-code" id="M000017-source">
568
- <pre>
569
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 123</span>
570
- 123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deliverable</span>(<span class="ruby-identifier">adap</span> = <span class="ruby-identifier">adapter</span>)
571
- 124: <span class="ruby-identifier">adap</span> = <span class="ruby-node">&quot;Mack::Notifier::Adapters::#{adap.to_s.camelcase}&quot;</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
572
- 125: <span class="ruby-identifier">adap</span>.<span class="ruby-identifier">convert</span>
573
- 126: <span class="ruby-identifier">adap</span>.<span class="ruby-identifier">deliverable</span>
574
- 127: <span class="ruby-keyword kw">end</span>
575
- </pre>
576
- </div>
577
- </div>
578
- </div>
579
-
580
- <div id="method-M000012" class="method-detail">
581
- <a name="M000012"></a>
582
-
583
- <div class="method-heading">
584
- <a href="#M000012" class="method-signature">
585
- <span class="method-name">has_attachments?</span><span class="method-args">()</span>
586
- </a>
587
- </div>
588
-
589
- <div class="method-description">
590
- <p>
591
- Returns true if there are <a href="Notifier.html#M000013">attachments</a>.
592
- </p>
593
- <p><a class="source-toggle" href="#"
594
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
595
- <div class="method-source-code" id="M000012-source">
596
- <pre>
597
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 92</span>
598
- 92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_attachments?</span>
599
- 93: <span class="ruby-operator">!</span><span class="ruby-identifier">attachments</span>.<span class="ruby-identifier">empty?</span>
600
- 94: <span class="ruby-keyword kw">end</span>
601
- </pre>
602
- </div>
603
- </div>
604
- </div>
605
-
606
- <div id="method-M000007" class="method-detail">
607
- <a name="M000007"></a>
608
-
609
- <div class="method-heading">
610
- <a href="#M000007" class="method-signature">
611
- <span class="method-name">mime_version</span><span class="method-args">()</span>
612
- </a>
613
- </div>
614
-
615
- <div class="method-description">
616
- <p>
617
- Returns the <a href="Notifier.html#M000007">mime_version</a> of the
618
- notification, defaults to &quot;1.0&quot;
619
- </p>
620
- <p><a class="source-toggle" href="#"
621
- onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
622
- <div class="method-source-code" id="M000007-source">
623
- <pre>
624
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 56</span>
625
- 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mime_version</span>
626
- 57: (<span class="ruby-ivar">@mime_version</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">&quot;1.0&quot;</span>)
627
- 58: <span class="ruby-keyword kw">end</span>
628
- </pre>
629
- </div>
630
- </div>
631
- </div>
632
-
633
- <div id="method-M000016" class="method-detail">
634
- <a name="M000016"></a>
635
-
636
- <div class="method-heading">
637
- <a href="#M000016" class="method-signature">
638
- <span class="method-name">recipients</span><span class="method-args">()</span>
639
- </a>
640
- </div>
641
-
642
- <div class="method-description">
643
- <p>
644
- Returns all the <a href="Notifier.html#M000016">recipients</a> of this
645
- notifier.
646
- </p>
647
- <p><a class="source-toggle" href="#"
648
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
649
- <div class="method-source-code" id="M000016-source">
650
- <pre>
651
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 118</span>
652
- 118: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recipients</span>
653
- 119: [<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cc</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">bcc</span>].<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">compact</span>
654
- 120: <span class="ruby-keyword kw">end</span>
655
- </pre>
656
- </div>
657
- </div>
658
- </div>
659
-
660
- <div id="method-M000010" class="method-detail">
661
- <a name="M000010"></a>
662
-
663
- <div class="method-heading">
664
- <a href="#M000010" class="method-signature">
665
- <span class="method-name">reply_to</span><span class="method-args">()</span>
666
- </a>
667
- </div>
668
-
669
- <div class="method-description">
670
- <p>
671
- Returns the reply to address, defaults to the from address.
672
- </p>
673
- <p><a class="source-toggle" href="#"
674
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
675
- <div class="method-source-code" id="M000010-source">
676
- <pre>
677
- <span class="ruby-comment cmt"># File lib/mack-notifier/notifier.rb, line 80</span>
678
- 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reply_to</span>
679
- 81: (<span class="ruby-ivar">@reply_to</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">from</span>)
680
- 82: <span class="ruby-keyword kw">end</span>
681
- </pre>
682
- </div>
683
- </div>
684
- </div>
685
-
686
-
687
- </div>
688
-
689
-
690
- </div>
691
-
692
-
693
- <div id="validator-badges">
694
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
695
- </div>
696
-
697
- </body>
698
- </html>