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
@@ -1,419 +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::Validatable</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::Validatable</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/mack-notifier/validations_rb.html">
59
- lib/mack-notifier/validations.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- Includes the validatable gem into your <a
78
- href="../Notifier.html">Notifier</a>. <a
79
- href="http://validatable.rubyforge.org">validatable.rubyforge.org</a>
80
- </p>
81
-
82
- </div>
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="#M000021">common_notifier_validations</a>&nbsp;&nbsp;
92
- <a href="#M000025">deliver</a>&nbsp;&nbsp;
93
- <a href="#M000024">deliver!</a>&nbsp;&nbsp;
94
- <a href="#M000023">email_validation_regex</a>&nbsp;&nbsp;
95
- <a href="#M000020">included</a>&nbsp;&nbsp;
96
- <a href="#M000022">validates_email_format_of</a>&nbsp;&nbsp;
97
- </div>
98
- </div>
99
-
100
- </div>
101
-
102
-
103
- <!-- if includes -->
104
- <div id="includes">
105
- <h3 class="section-bar">Included Modules</h3>
106
-
107
- <div id="includes-list">
108
- <span class="include-name">::Validatable</span>
109
- </div>
110
- </div>
111
-
112
- <div id="section">
113
-
114
-
115
-
116
- <div id="aliases-list">
117
- <h3 class="section-bar">External Aliases</h3>
118
-
119
- <div class="name-list">
120
- <table summary="aliases">
121
- <tr class="top-aligned-row context-row">
122
- <td class="context-item-name">validates_acceptance_of</td>
123
- <td>-&gt;</td>
124
- <td class="context-item-value">validates_is_accepted</td>
125
- </tr>
126
- <tr class="top-aligned-row context-row">
127
- <td>&nbsp;</td>
128
- <td colspan="2" class="context-item-desc">
129
- Alias the <a href="Validatable.html">Validatable</a> methods to look like
130
- DataMapper methods, if that&#8216;s the kind of thing you&#8216;re used to.
131
- :)
132
-
133
- </td>
134
- </tr>
135
- <tr class="top-aligned-row context-row">
136
- <td class="context-item-name">validates_confirmation_of</td>
137
- <td>-&gt;</td>
138
- <td class="context-item-value">validates_is_confirmed</td>
139
- </tr>
140
- <tr class="top-aligned-row context-row">
141
- <td class="context-item-name">validates_format_of</td>
142
- <td>-&gt;</td>
143
- <td class="context-item-value">validates_format</td>
144
- </tr>
145
- <tr class="top-aligned-row context-row">
146
- <td class="context-item-name">validates_length_of</td>
147
- <td>-&gt;</td>
148
- <td class="context-item-value">validates_length</td>
149
- </tr>
150
- <tr class="top-aligned-row context-row">
151
- <td class="context-item-name">validates_numericality_of</td>
152
- <td>-&gt;</td>
153
- <td class="context-item-value">validates_is_number</td>
154
- </tr>
155
- <tr class="top-aligned-row context-row">
156
- <td class="context-item-name">validates_presence_of</td>
157
- <td>-&gt;</td>
158
- <td class="context-item-value">validates_present</td>
159
- </tr>
160
- </table>
161
- </div>
162
- </div>
163
-
164
-
165
-
166
-
167
-
168
- <!-- if method_list -->
169
- <div id="methods">
170
- <h3 class="section-bar">Public Class methods</h3>
171
-
172
- <div id="method-M000021" class="method-detail">
173
- <a name="M000021"></a>
174
-
175
- <div class="method-heading">
176
- <a href="#M000021" class="method-signature">
177
- <span class="method-name">common_notifier_validations</span><span class="method-args">()</span>
178
- </a>
179
- </div>
180
-
181
- <div class="method-description">
182
- <p>
183
- Adds common validations to your <a
184
- href="../Notifier.html">Mack::Notifier</a> class. These include:
185
- </p>
186
- <pre>
187
- validates_presence_of :to
188
- validates_presence_of :from
189
- validates_presence_of :subject
190
- validates_email_format_of :to
191
- validates_email_format_of :from
192
- </pre>
193
- <p><a class="source-toggle" href="#"
194
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
195
- <div class="method-source-code" id="M000021-source">
196
- <pre>
197
- <span class="ruby-comment cmt"># File lib/mack-notifier/validations.rb, line 33</span>
198
- 33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">common_notifier_validations</span>
199
- 34: <span class="ruby-identifier">validates_presence_of</span> <span class="ruby-identifier">:to</span>
200
- 35: <span class="ruby-identifier">validates_presence_of</span> <span class="ruby-identifier">:from</span>
201
- 36: <span class="ruby-identifier">validates_presence_of</span> <span class="ruby-identifier">:subject</span>
202
- 37: <span class="ruby-identifier">validates_email_format_of</span> <span class="ruby-identifier">:to</span>
203
- 38: <span class="ruby-identifier">validates_email_format_of</span> <span class="ruby-identifier">:from</span>
204
- 39: <span class="ruby-keyword kw">end</span>
205
- </pre>
206
- </div>
207
- </div>
208
- </div>
209
-
210
- <div id="method-M000023" class="method-detail">
211
- <a name="M000023"></a>
212
-
213
- <div class="method-heading">
214
- <a href="#M000023" class="method-signature">
215
- <span class="method-name">email_validation_regex</span><span class="method-args">()</span>
216
- </a>
217
- </div>
218
-
219
- <div class="method-description">
220
- <p><a class="source-toggle" href="#"
221
- onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
222
- <div class="method-source-code" id="M000023-source">
223
- <pre>
224
- <span class="ruby-comment cmt"># File lib/mack-notifier/validations.rb, line 52</span>
225
- 52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">email_validation_regex</span>
226
- 53: <span class="ruby-identifier">regex</span> = <span class="ruby-value str">&quot;[a-z0-9!\#$\\%&amp;'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!\#$\\%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\n&quot;</span>
227
- 54: <span class="ruby-node">/#{regex.strip}/</span>
228
- 55: <span class="ruby-keyword kw">end</span>
229
- </pre>
230
- </div>
231
- </div>
232
- </div>
233
-
234
- <div id="method-M000020" class="method-detail">
235
- <a name="M000020"></a>
236
-
237
- <div class="method-heading">
238
- <a href="#M000020" class="method-signature">
239
- <span class="method-name">included</span><span class="method-args">(base)</span>
240
- </a>
241
- </div>
242
-
243
- <div class="method-description">
244
- <p><a class="source-toggle" href="#"
245
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
246
- <div class="method-source-code" id="M000020-source">
247
- <pre>
248
- <span class="ruby-comment cmt"># File lib/mack-notifier/validations.rb, line 7</span>
249
- 7: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
250
- 8: <span class="ruby-identifier">base</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-keyword kw">do</span>
251
- 9: <span class="ruby-identifier">include</span> <span class="ruby-operator">::</span><span class="ruby-constant">Validatable</span>
252
- 10: <span class="ruby-identifier">alias_method</span> <span class="ruby-value str">&quot;unvalidated_deliver!&quot;</span>, <span class="ruby-value str">&quot;deliver!&quot;</span>
253
- 11: <span class="ruby-keyword kw">end</span>
254
- 12:
255
- 13: <span class="ruby-identifier">base</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
256
- 14:
257
- 15: <span class="ruby-keyword kw">class</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword kw">self</span>
258
- 16:
259
- 17: <span class="ruby-comment cmt"># Alias the Validatable methods to look like DataMapper methods,</span>
260
- 18: <span class="ruby-comment cmt"># if that's the kind of thing you're used to. :)</span>
261
- 19: <span class="ruby-identifier">alias_method</span> <span class="ruby-identifier">:validates_is_accepted</span>, <span class="ruby-identifier">:validates_acceptance_of</span>
262
- 20: <span class="ruby-identifier">alias_method</span> <span class="ruby-identifier">:validates_is_confirmed</span>, <span class="ruby-identifier">:validates_confirmation_of</span>
263
- 21: <span class="ruby-identifier">alias_method</span> <span class="ruby-identifier">:validates_format</span>, <span class="ruby-identifier">:validates_format_of</span>
264
- 22: <span class="ruby-identifier">alias_method</span> <span class="ruby-identifier">:validates_length</span>, <span class="ruby-identifier">:validates_length_of</span>
265
- 23: <span class="ruby-identifier">alias_method</span> <span class="ruby-identifier">:validates_is_number</span>, <span class="ruby-identifier">:validates_numericality_of</span>
266
- 24: <span class="ruby-identifier">alias_method</span> <span class="ruby-identifier">:validates_present</span>, <span class="ruby-identifier">:validates_presence_of</span>
267
- 25:
268
- 26: <span class="ruby-comment cmt"># Adds common validations to your Mack::Notifier class.</span>
269
- 27: <span class="ruby-comment cmt"># These include:</span>
270
- 28: <span class="ruby-comment cmt"># validates_presence_of :to</span>
271
- 29: <span class="ruby-comment cmt"># validates_presence_of :from</span>
272
- 30: <span class="ruby-comment cmt"># validates_presence_of :subject</span>
273
- 31: <span class="ruby-comment cmt"># validates_email_format_of :to</span>
274
- 32: <span class="ruby-comment cmt"># validates_email_format_of :from</span>
275
- 33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">common_notifier_validations</span>
276
- 34: <span class="ruby-identifier">validates_presence_of</span> <span class="ruby-identifier">:to</span>
277
- 35: <span class="ruby-identifier">validates_presence_of</span> <span class="ruby-identifier">:from</span>
278
- 36: <span class="ruby-identifier">validates_presence_of</span> <span class="ruby-identifier">:subject</span>
279
- 37: <span class="ruby-identifier">validates_email_format_of</span> <span class="ruby-identifier">:to</span>
280
- 38: <span class="ruby-identifier">validates_email_format_of</span> <span class="ruby-identifier">:from</span>
281
- 39: <span class="ruby-keyword kw">end</span>
282
- 40:
283
- 41: <span class="ruby-comment cmt"># Validates the email format of the column specified against the email_validation_regex method.</span>
284
- 42: <span class="ruby-comment cmt"># This will drill into arrays as well, if that's what your column is.</span>
285
- 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validates_email_format_of</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span> = {})
286
- 44: <span class="ruby-identifier">options</span> = {<span class="ruby-identifier">:logic</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">lambda</span>{
287
- 45: [<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>)].<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">addr</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
288
- 46: <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">column</span>, <span class="ruby-node">&quot;[#{addr}] is not valid&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">addr</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">match</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">email_validation_regex</span>)
289
- 47: <span class="ruby-keyword kw">end</span>
290
- 48: }}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)
291
- 49: <span class="ruby-identifier">validates_each</span> <span class="ruby-identifier">:to</span>, <span class="ruby-identifier">options</span>
292
- 50: <span class="ruby-keyword kw">end</span>
293
- 51:
294
- 52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">email_validation_regex</span>
295
- 53: <span class="ruby-identifier">regex</span> = <span class="ruby-value str">&quot;[a-z0-9!\#$\\%&amp;'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!\#$\\%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\n&quot;</span>
296
- 54: <span class="ruby-node">/#{regex.strip}/</span>
297
- 55: <span class="ruby-keyword kw">end</span>
298
- 56:
299
- 57: <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt"># class &lt;&lt; self</span>
300
- 58: <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt"># class_eval</span>
301
- 59: <span class="ruby-keyword kw">end</span>
302
- </pre>
303
- </div>
304
- </div>
305
- </div>
306
-
307
- <div id="method-M000022" class="method-detail">
308
- <a name="M000022"></a>
309
-
310
- <div class="method-heading">
311
- <a href="#M000022" class="method-signature">
312
- <span class="method-name">validates_email_format_of</span><span class="method-args">(column, options = {})</span>
313
- </a>
314
- </div>
315
-
316
- <div class="method-description">
317
- <p>
318
- Validates the email format of the column specified against the <a
319
- href="Validatable.html#M000023">email_validation_regex</a> method. This
320
- will drill into arrays as well, if that&#8216;s what your column is.
321
- </p>
322
- <p><a class="source-toggle" href="#"
323
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
324
- <div class="method-source-code" id="M000022-source">
325
- <pre>
326
- <span class="ruby-comment cmt"># File lib/mack-notifier/validations.rb, line 43</span>
327
- 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validates_email_format_of</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span> = {})
328
- 44: <span class="ruby-identifier">options</span> = {<span class="ruby-identifier">:logic</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">lambda</span>{
329
- 45: [<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>)].<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">addr</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
330
- 46: <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">column</span>, <span class="ruby-node">&quot;[#{addr}] is not valid&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">addr</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">match</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">email_validation_regex</span>)
331
- 47: <span class="ruby-keyword kw">end</span>
332
- 48: }}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)
333
- 49: <span class="ruby-identifier">validates_each</span> <span class="ruby-identifier">:to</span>, <span class="ruby-identifier">options</span>
334
- 50: <span class="ruby-keyword kw">end</span>
335
- </pre>
336
- </div>
337
- </div>
338
- </div>
339
-
340
- <h3 class="section-bar">Public Instance methods</h3>
341
-
342
- <div id="method-M000025" class="method-detail">
343
- <a name="M000025"></a>
344
-
345
- <div class="method-heading">
346
- <a href="#M000025" class="method-signature">
347
- <span class="method-name">deliver</span><span class="method-args">(handler = deliver_with)</span>
348
- </a>
349
- </div>
350
-
351
- <div class="method-description">
352
- <p>
353
- Returns false if the email is not valid. If the email is valid and an
354
- exception is raised when trying to <a
355
- href="Validatable.html#M000025">deliver</a> it false is returned and the
356
- exception is added to the errors array, with the key :<a
357
- href="Validatable.html#M000025">deliver</a>.
358
- </p>
359
- <p><a class="source-toggle" href="#"
360
- onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
361
- <div class="method-source-code" id="M000025-source">
362
- <pre>
363
- <span class="ruby-comment cmt"># File lib/mack-notifier/validations.rb, line 74</span>
364
- 74: <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>)
365
- 75: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">valid?</span>
366
- 76: <span class="ruby-keyword kw">begin</span>
367
- 77: <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>)
368
- 78: <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>
369
- 79: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">:deliver</span>, <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>)
370
- 80: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
371
- 81: <span class="ruby-keyword kw">end</span>
372
- 82: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
373
- 83: <span class="ruby-keyword kw">end</span>
374
- </pre>
375
- </div>
376
- </div>
377
- </div>
378
-
379
- <div id="method-M000024" class="method-detail">
380
- <a name="M000024"></a>
381
-
382
- <div class="method-heading">
383
- <a href="#M000024" class="method-signature">
384
- <span class="method-name">deliver!</span><span class="method-args">(handler = deliver_with)</span>
385
- </a>
386
- </div>
387
-
388
- <div class="method-description">
389
- <p>
390
- Raises a RuntimeError if the email you are trying to <a
391
- href="Validatable.html#M000025">deliver</a> is not valid.
392
- </p>
393
- <p><a class="source-toggle" href="#"
394
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
395
- <div class="method-source-code" id="M000024-source">
396
- <pre>
397
- <span class="ruby-comment cmt"># File lib/mack-notifier/validations.rb, line 65</span>
398
- 65: <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>)
399
- 66: <span class="ruby-identifier">raise</span> <span class="ruby-value str">'Notification is Invalid!'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">valid?</span>
400
- 67: <span class="ruby-identifier">unvalidated_deliver!</span>(<span class="ruby-identifier">handler</span>)
401
- 68: <span class="ruby-keyword kw">end</span>
402
- </pre>
403
- </div>
404
- </div>
405
- </div>
406
-
407
-
408
- </div>
409
-
410
-
411
- </div>
412
-
413
-
414
- <div id="validator-badges">
415
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
416
- </div>
417
-
418
- </body>
419
- </html>
@@ -1,197 +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::Paths</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::Paths</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/mack-notifier/paths_rb.html">
59
- lib/mack-notifier/paths.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
-
76
-
77
- </div>
78
-
79
- <div id="method-list">
80
- <h3 class="section-bar">Methods</h3>
81
-
82
- <div class="name-list">
83
- <a href="#M000003">notifier_templates</a>&nbsp;&nbsp;
84
- <a href="#M000004">notifier_tests</a>&nbsp;&nbsp;
85
- <a href="#M000002">notifiers</a>&nbsp;&nbsp;
86
- </div>
87
- </div>
88
-
89
- </div>
90
-
91
-
92
- <!-- if includes -->
93
-
94
- <div id="section">
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
- <!-- if method_list -->
104
- <div id="methods">
105
- <h3 class="section-bar">Public Class methods</h3>
106
-
107
- <div id="method-M000003" class="method-detail">
108
- <a name="M000003"></a>
109
-
110
- <div class="method-heading">
111
- <a href="#M000003" class="method-signature">
112
- <span class="method-name">notifier_templates</span><span class="method-args">(*args)</span>
113
- </a>
114
- </div>
115
-
116
- <div class="method-description">
117
- <p>
118
- The path to the app/notifiers/templates directory.
119
- </p>
120
- <p><a class="source-toggle" href="#"
121
- onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
122
- <div class="method-source-code" id="M000003-source">
123
- <pre>
124
- <span class="ruby-comment cmt"># File lib/mack-notifier/paths.rb, line 10</span>
125
- 10: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">notifier_templates</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
126
- 11: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Paths</span>.<span class="ruby-identifier">notifiers</span>(<span class="ruby-value str">&quot;templates&quot;</span>, <span class="ruby-identifier">args</span>)
127
- 12: <span class="ruby-keyword kw">end</span>
128
- </pre>
129
- </div>
130
- </div>
131
- </div>
132
-
133
- <div id="method-M000004" class="method-detail">
134
- <a name="M000004"></a>
135
-
136
- <div class="method-heading">
137
- <a href="#M000004" class="method-signature">
138
- <span class="method-name">notifier_tests</span><span class="method-args">(*args)</span>
139
- </a>
140
- </div>
141
-
142
- <div class="method-description">
143
- <p>
144
- The path the test/notifiers directory
145
- </p>
146
- <p><a class="source-toggle" href="#"
147
- onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
148
- <div class="method-source-code" id="M000004-source">
149
- <pre>
150
- <span class="ruby-comment cmt"># File lib/mack-notifier/paths.rb, line 15</span>
151
- 15: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">notifier_tests</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
152
- 16: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Paths</span>.<span class="ruby-identifier">test</span>(<span class="ruby-value str">&quot;notifiers&quot;</span>, <span class="ruby-identifier">args</span>)
153
- 17: <span class="ruby-keyword kw">end</span>
154
- </pre>
155
- </div>
156
- </div>
157
- </div>
158
-
159
- <div id="method-M000002" class="method-detail">
160
- <a name="M000002"></a>
161
-
162
- <div class="method-heading">
163
- <a href="#M000002" class="method-signature">
164
- <span class="method-name">notifiers</span><span class="method-args">(*args)</span>
165
- </a>
166
- </div>
167
-
168
- <div class="method-description">
169
- <p>
170
- The path to the app/notifiers directory.
171
- </p>
172
- <p><a class="source-toggle" href="#"
173
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
174
- <div class="method-source-code" id="M000002-source">
175
- <pre>
176
- <span class="ruby-comment cmt"># File lib/mack-notifier/paths.rb, line 5</span>
177
- 5: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">notifiers</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
178
- 6: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Paths</span>.<span class="ruby-identifier">app</span>(<span class="ruby-value str">&quot;notifiers&quot;</span>, <span class="ruby-identifier">args</span>)
179
- 7: <span class="ruby-keyword kw">end</span>
180
- </pre>
181
- </div>
182
- </div>
183
- </div>
184
-
185
-
186
- </div>
187
-
188
-
189
- </div>
190
-
191
-
192
- <div id="validator-badges">
193
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
194
- </div>
195
-
196
- </body>
197
- </html>