mail_engine 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/.yardoc/checksums +9 -7
  2. data/.yardoc/objects/ActionMailer/Base/collect_responses_and_parts_order_i.dat +0 -0
  3. data/.yardoc/objects/ActionMailer/Base/mail_i.dat +0 -0
  4. data/.yardoc/objects/ActionMailer/Base/origin_mail_i.dat +0 -0
  5. data/.yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat +0 -0
  6. data/.yardoc/objects/ActionMailer/Base.dat +0 -0
  7. data/.yardoc/objects/ActionMailer/Collector/custom_i.dat +0 -0
  8. data/.yardoc/objects/ActionMailer/Collector.dat +0 -0
  9. data/.yardoc/objects/ActionMailer.dat +0 -0
  10. data/.yardoc/objects/LiquidView/PROTECTED_ASSIGNS.dat +0 -0
  11. data/.yardoc/objects/LiquidView/PROTECTED_INSTANCE_VARIABLES.dat +0 -0
  12. data/.yardoc/objects/LiquidView/call_c.dat +0 -0
  13. data/.yardoc/objects/LiquidView/compilable_3F_i.dat +0 -0
  14. data/.yardoc/objects/LiquidView/initialize_i.dat +0 -0
  15. data/.yardoc/objects/LiquidView/render_i.dat +0 -0
  16. data/.yardoc/objects/LiquidView.dat +0 -0
  17. data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods/acts_as_mail_receiver_i.dat +0 -0
  18. data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods/check_method_existance_21_i.dat +0 -0
  19. data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods.dat +0 -0
  20. data/.yardoc/objects/MailEngine/ActsAsMailReceiver.dat +0 -0
  21. data/.yardoc/objects/MailEngine/Base/_40_40configurations.dat +0 -0
  22. data/.yardoc/objects/MailEngine/Base/current_config_c.dat +0 -0
  23. data/.yardoc/objects/MailEngine/Base/send_marketing_mail_c.dat +0 -0
  24. data/.yardoc/objects/MailEngine/Base.dat +0 -0
  25. data/.yardoc/objects/MailEngine/Configuration/load_c.dat +0 -0
  26. data/.yardoc/objects/MailEngine/Configuration.dat +0 -0
  27. data/.yardoc/objects/MailEngine/CopyMigrations/copy_migrations_i.dat +0 -0
  28. data/.yardoc/objects/MailEngine/CopyMigrations.dat +0 -0
  29. data/.yardoc/objects/MailEngine/CopyResources/copy_resources_i.dat +0 -0
  30. data/.yardoc/objects/MailEngine/CopyResources.dat +0 -0
  31. data/.yardoc/objects/MailEngine/CreateConfig/create_config_file_i.dat +0 -0
  32. data/.yardoc/objects/MailEngine/CreateConfig.dat +0 -0
  33. data/.yardoc/objects/MailEngine/Engine.dat +0 -0
  34. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/check_21_c.dat +0 -0
  35. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/get_resource_url_c.dat +0 -0
  36. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/process_c.dat +0 -0
  37. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/replace_resource_in_html_c.dat +0 -0
  38. data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer.dat +0 -0
  39. data/.yardoc/objects/MailEngine/Install/copy_migrations_i.dat +0 -0
  40. data/.yardoc/objects/MailEngine/Install/copy_resources_i.dat +0 -0
  41. data/.yardoc/objects/MailEngine/Install/create_config_i.dat +0 -0
  42. data/.yardoc/objects/MailEngine/Install.dat +0 -0
  43. data/.yardoc/objects/MailEngine/MailLogSubscriber/deliver_i.dat +0 -0
  44. data/.yardoc/objects/MailEngine/MailLogSubscriber.dat +0 -0
  45. data/.yardoc/objects/MailEngine/MailTemplateResolver/find_templates_i.dat +0 -0
  46. data/.yardoc/objects/MailEngine/MailTemplateResolver/initialize_template_i.dat +0 -0
  47. data/.yardoc/objects/MailEngine/MailTemplateResolver/normalize_array_i.dat +0 -0
  48. data/.yardoc/objects/MailEngine/MailTemplateResolver/normalize_path_i.dat +0 -0
  49. data/.yardoc/objects/MailEngine/MailTemplateResolver/virtual_path_i.dat +0 -0
  50. data/.yardoc/objects/MailEngine/MailTemplateResolver.dat +0 -0
  51. data/.yardoc/objects/MailEngine/PLACEHOLDERS_IN_LAYOUT.dat +0 -0
  52. data/.yardoc/objects/MailEngine/Sendgrid/Base/ClassMethods/sendgrid_header_i.dat +0 -0
  53. data/.yardoc/objects/MailEngine/Sendgrid/Base/ClassMethods.dat +0 -0
  54. data/.yardoc/objects/MailEngine/Sendgrid/Base/InstanceMethods.dat +0 -0
  55. data/.yardoc/objects/MailEngine/Sendgrid/Base.dat +0 -0
  56. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/data_3D_i.dat +0 -0
  57. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/data_i.dat +0 -0
  58. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/initialize_i.dat +0 -0
  59. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/validate_config_21_i.dat +0 -0
  60. data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting.dat +0 -0
  61. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/blocks_c.dat +0 -0
  62. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/bounces_c.dat +0 -0
  63. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/invalidemails_c.dat +0 -0
  64. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/spamreports_c.dat +0 -0
  65. data/.yardoc/objects/MailEngine/Sendgrid/RestApi/stats_c.dat +0 -0
  66. data/.yardoc/objects/MailEngine/Sendgrid/RestApi.dat +0 -0
  67. data/.yardoc/objects/MailEngine/Sendgrid/RestApiError.dat +0 -0
  68. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/add_sub_val_i.dat +0 -0
  69. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/add_to_i.dat +0 -0
  70. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/category_i.dat +0 -0
  71. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/filters_i.dat +0 -0
  72. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/initialize_i.dat +0 -0
  73. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/set_send_to_i.dat +0 -0
  74. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/set_unique_args_i.dat +0 -0
  75. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_hash_i.dat +0 -0
  76. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_json_i.dat +0 -0
  77. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_s_i.dat +0 -0
  78. data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi.dat +0 -0
  79. data/.yardoc/objects/MailEngine/Sendgrid.dat +0 -0
  80. data/.yardoc/objects/MailEngine/VERSION.dat +0 -0
  81. data/.yardoc/objects/MailEngine/ZipProcessor/extract_all_files_c.dat +0 -0
  82. data/.yardoc/objects/MailEngine/ZipProcessor.dat +0 -0
  83. data/.yardoc/objects/MailEngine.dat +0 -0
  84. data/.yardoc/objects/root.dat +0 -0
  85. data/.yardoc/proxy_types +0 -0
  86. data/Gemfile +0 -1
  87. data/VERSION +1 -1
  88. data/app/controllers/mail_engine/application_controller.rb +0 -2
  89. data/doc/ActionMailer/Base.html +48 -4
  90. data/doc/ActionMailer/Collector.html +11 -11
  91. data/doc/ActionMailer.html +1 -1
  92. data/doc/LiquidView.html +453 -0
  93. data/doc/MailEngine/ActsAsMailReceiver/ClassMethods.html +1 -1
  94. data/doc/MailEngine/ActsAsMailReceiver.html +1 -1
  95. data/doc/MailEngine/Base.html +14 -12
  96. data/doc/MailEngine/Configuration.html +1 -1
  97. data/doc/MailEngine/CopyMigrations.html +1 -1
  98. data/doc/MailEngine/CopyResources.html +1 -1
  99. data/doc/MailEngine/CreateConfig.html +1 -1
  100. data/doc/MailEngine/Engine.html +1 -1
  101. data/doc/MailEngine/HtmlDocumentAssetsReplacer.html +1 -1
  102. data/doc/MailEngine/Install.html +1 -1
  103. data/doc/MailEngine/MailLogSubscriber.html +1 -1
  104. data/doc/MailEngine/MailTemplateResolver.html +502 -0
  105. data/doc/MailEngine/Sendgrid/Base/ClassMethods.html +1 -1
  106. data/doc/MailEngine/Sendgrid/Base/InstanceMethods.html +1 -1
  107. data/doc/MailEngine/Sendgrid/Base.html +1 -1
  108. data/doc/MailEngine/Sendgrid/FilterSetting.html +1 -1
  109. data/doc/MailEngine/Sendgrid/RestApi.html +1 -1
  110. data/doc/MailEngine/Sendgrid/RestApiError.html +1 -1
  111. data/doc/MailEngine/Sendgrid/SmtpApi.html +99 -30
  112. data/doc/MailEngine/Sendgrid.html +1 -1
  113. data/doc/MailEngine/ZipProcessor.html +1 -1
  114. data/doc/MailEngine.html +3 -3
  115. data/doc/_index.html +25 -5
  116. data/doc/class_list.html +1 -1
  117. data/doc/file.README.html +70 -2
  118. data/doc/index.html +70 -2
  119. data/doc/method_list.html +88 -8
  120. data/doc/top-level-namespace.html +3 -1
  121. data/lib/mail_engine/action_mailer_patch.rb +2 -2
  122. data/lib/mail_engine/engine.rb +3 -7
  123. data/mail_engine.gemspec +18 -5
  124. data/test/functional/user_mailer_test.rb +2 -5
  125. metadata +27 -25
@@ -0,0 +1,502 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Class: MailEngine::MailTemplateResolver</title>
7
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="../_index.html">Index (M)</a> &raquo;
27
+ <span class='title'><span class='object_link'><a href="../MailEngine.html" title="MailEngine (module)">MailEngine</a></span></span>
28
+ &raquo;
29
+ <span class="title">MailTemplateResolver</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Class: MailEngine::MailTemplateResolver
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+ <dt class="r1">Inherits:</dt>
55
+ <dd class="r1">
56
+ <span class="inheritName">ActionView::Resolver</span>
57
+
58
+ <ul class="fullTree">
59
+ <li>Object</li>
60
+
61
+ <li class="next">ActionView::Resolver</li>
62
+
63
+ <li class="next">MailEngine::MailTemplateResolver</li>
64
+
65
+ </ul>
66
+ <a href="#" class="inheritanceTree">show all</a>
67
+
68
+ </dd>
69
+
70
+
71
+
72
+
73
+
74
+
75
+ <dt class="r2">Includes:</dt>
76
+ <dd class="r2">Singleton</dd>
77
+
78
+
79
+
80
+
81
+
82
+ <dt class="r1 last">Defined in:</dt>
83
+ <dd class="r1 last">lib/mail_engine/mail_template_resolver.rb</dd>
84
+
85
+ </dl>
86
+ <div class="clear"></div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+ <p>
91
+ path resolver, used for find template by provided path.
92
+ </p>
93
+
94
+
95
+ </div>
96
+ </div>
97
+ <div class="tags">
98
+
99
+ </div>
100
+
101
+
102
+
103
+
104
+
105
+ <h2>
106
+ Instance Method Summary
107
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
108
+ </h2>
109
+
110
+ <ul class="summary">
111
+
112
+ <li class="public ">
113
+ <span class="summary_signature">
114
+
115
+ <a href="#find_templates-instance_method" title="#find_templates (instance method)">- (Object) <strong>find_templates</strong>(name, prefix, partial, details) </a>
116
+
117
+
118
+
119
+ </span>
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+ <span class="summary_desc"><div class='inline'></div></span>
129
+
130
+ </li>
131
+
132
+
133
+ <li class="public ">
134
+ <span class="summary_signature">
135
+
136
+ <a href="#initialize_template-instance_method" title="#initialize_template (instance method)">- (Object) <strong>initialize_template</strong>(record) </a>
137
+
138
+
139
+
140
+ </span>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'><p>
150
+ Initialize an ActionView::Template object based on the record found.
151
+ </p>
152
+ </div></span>
153
+
154
+ </li>
155
+
156
+
157
+ <li class="public ">
158
+ <span class="summary_signature">
159
+
160
+ <a href="#normalize_array-instance_method" title="#normalize_array (instance method)">- (Object) <strong>normalize_array</strong>(array) </a>
161
+
162
+
163
+
164
+ </span>
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ <span class="summary_desc"><div class='inline'><p>
174
+ Normalize arrays by converting all symbols to strings.
175
+ </p>
176
+ </div></span>
177
+
178
+ </li>
179
+
180
+
181
+ <li class="public ">
182
+ <span class="summary_signature">
183
+
184
+ <a href="#normalize_path-instance_method" title="#normalize_path (instance method)">- (Object) <strong>normalize_path</strong>(name, prefix) </a>
185
+
186
+
187
+
188
+ </span>
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+ <span class="summary_desc"><div class='inline'><p>
198
+ Normalize name and prefix, so the tuple [&quot;index&quot;,
199
+ &quot;users&quot;] becomes &quot;users/index&quot; and the tuple
200
+ [&quot;template&quot;, nil] becomes &quot;template&quot;.
201
+ </p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
210
+ <a href="#virtual_path-instance_method" title="#virtual_path (instance method)">- (Object) <strong>virtual_path</strong>(path, partial) </a>
211
+
212
+
213
+
214
+ </span>
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+ <span class="summary_desc"><div class='inline'><p>
224
+ Make paths as &quot;users/user&quot; become &quot;users/_user&quot; for
225
+ partials.
226
+ </p>
227
+ </div></span>
228
+
229
+ </li>
230
+
231
+
232
+ </ul>
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <div id="instance_method_details" class="method_details_list">
240
+ <h2>Instance Method Details</h2>
241
+
242
+
243
+ <div class="method_details first">
244
+ <p class="signature first" id="find_templates-instance_method">
245
+
246
+ - (<tt>Object</tt>) <strong>find_templates</strong>(name, prefix, partial, details)
247
+
248
+
249
+
250
+ </p><table class="source_code">
251
+ <tr>
252
+ <td>
253
+ <pre class="lines">
254
+
255
+
256
+ 9
257
+ 10
258
+ 11
259
+ 12
260
+ 13
261
+ 14
262
+ 15
263
+ 16
264
+ 17
265
+ 18
266
+ 19
267
+ 20
268
+ 21
269
+ 22
270
+ 23</pre>
271
+ </td>
272
+ <td>
273
+ <pre class="code"><span class="info file"># File 'lib/mail_engine/mail_template_resolver.rb', line 9</span>
274
+
275
+ <span class='def def kw'>def</span> <span class='find_templates identifier id'>find_templates</span><span class='lparen token'>(</span><span class='name identifier id'>name</span><span class='comma token'>,</span> <span class='prefix identifier id'>prefix</span><span class='comma token'>,</span> <span class='partial identifier id'>partial</span><span class='comma token'>,</span> <span class='details identifier id'>details</span><span class='rparen token'>)</span>
276
+ <span class='template_path_and_name identifier id'>template_path_and_name</span> <span class='assign token'>=</span> <span class='prefix identifier id'>prefix</span><span class='dot token'>.</span><span class='include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;mail_engine/mail_dispatcher&quot;</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='normalize_path identifier id'>normalize_path</span><span class='lparen token'>(</span><span class='name identifier id'>name</span><span class='comma token'>,</span> <span class='nil nil kw'>nil</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='normalize_path identifier id'>normalize_path</span><span class='lparen token'>(</span><span class='name identifier id'>name</span><span class='comma token'>,</span> <span class='prefix identifier id'>prefix</span><span class='rparen token'>)</span>
277
+
278
+ <span class='conditions identifier id'>conditions</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
279
+ <span class='symbol val'>:path</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='template_path_and_name identifier id'>template_path_and_name</span><span class='comma token'>,</span>
280
+ <span class='symbol val'>:locale</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='normalize_array identifier id'>normalize_array</span><span class='lparen token'>(</span><span class='details identifier id'>details</span><span class='lbrack token'>[</span><span class='symbol val'>:locale</span><span class='rbrack token'>]</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='comma token'>,</span>
281
+ <span class='symbol val'>:format</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='normalize_array identifier id'>normalize_array</span><span class='lparen token'>(</span><span class='details identifier id'>details</span><span class='lbrack token'>[</span><span class='symbol val'>:formats</span><span class='rbrack token'>]</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='comma token'>,</span>
282
+ <span class='symbol val'>:handler</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='normalize_array identifier id'>normalize_array</span><span class='lparen token'>(</span><span class='details identifier id'>details</span><span class='lbrack token'>[</span><span class='symbol val'>:handlers</span><span class='rbrack token'>]</span><span class='rparen token'>)</span><span class='comma token'>,</span>
283
+ <span class='symbol val'>:partial</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='partial identifier id'>partial</span> <span class='orop op'>||</span> <span class='false false kw'>false</span>
284
+ <span class='rbrace token'>}</span>
285
+
286
+ <span class='MailTemplate constant id'>MailTemplate</span><span class='dot token'>.</span><span class='where identifier id'>where</span><span class='lparen token'>(</span><span class='conditions identifier id'>conditions</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='map identifier id'>map</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='record identifier id'>record</span><span class='bitor op'>|</span>
287
+ <span class='initialize_template identifier id'>initialize_template</span><span class='lparen token'>(</span><span class='record identifier id'>record</span><span class='rparen token'>)</span>
288
+ <span class='end end kw'>end</span>
289
+ <span class='end end kw'>end</span>
290
+ </pre>
291
+ </td>
292
+ </tr>
293
+ </table>
294
+ </div>
295
+
296
+ <div class="method_details ">
297
+ <p class="signature " id="initialize_template-instance_method">
298
+
299
+ - (<tt>Object</tt>) <strong>initialize_template</strong>(record)
300
+
301
+
302
+
303
+ </p><div class="docstring">
304
+ <div class="discussion">
305
+ <p>
306
+ Initialize an ActionView::Template object based on the record found.
307
+ </p>
308
+
309
+
310
+ </div>
311
+ </div>
312
+ <div class="tags">
313
+
314
+ </div><table class="source_code">
315
+ <tr>
316
+ <td>
317
+ <pre class="lines">
318
+
319
+
320
+ 37
321
+ 38
322
+ 39
323
+ 40
324
+ 41
325
+ 42
326
+ 43
327
+ 44
328
+ 45
329
+ 46
330
+ 47
331
+ 48
332
+ 49
333
+ 50</pre>
334
+ </td>
335
+ <td>
336
+ <pre class="code"><span class="info file"># File 'lib/mail_engine/mail_template_resolver.rb', line 37</span>
337
+
338
+ <span class='def def kw'>def</span> <span class='initialize_template identifier id'>initialize_template</span><span class='lparen token'>(</span><span class='record identifier id'>record</span><span class='rparen token'>)</span>
339
+ <span class='source identifier id'>source</span> <span class='assign token'>=</span> <span class='record identifier id'>record</span><span class='dot token'>.</span><span class='body identifier id'>body</span>
340
+
341
+ <span class='identifier identifier id'>identifier</span> <span class='assign token'>=</span> <span class='dstring node'>&quot;mail template - #{record.id} - #{record.path.inspect}&quot;</span>
342
+ <span class='handler identifier id'>handler</span> <span class='assign token'>=</span> <span class='ActionView constant id'>ActionView</span><span class='colon2 op'>::</span><span class='Template constant id'>Template</span><span class='dot token'>.</span><span class='registered_template_handler identifier id'>registered_template_handler</span><span class='lparen token'>(</span><span class='record identifier id'>record</span><span class='dot token'>.</span><span class='handler identifier id'>handler</span><span class='rparen token'>)</span>
343
+
344
+ <span class='details identifier id'>details</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
345
+ <span class='symbol val'>:format</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='Mime constant id'>Mime</span><span class='lbrack token'>[</span><span class='record identifier id'>record</span><span class='dot token'>.</span><span class='format identifier id'>format</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
346
+ <span class='symbol val'>:updated_at</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='record identifier id'>record</span><span class='dot token'>.</span><span class='updated_at identifier id'>updated_at</span><span class='comma token'>,</span>
347
+ <span class='symbol val'>:virtual_path</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='virtual_path identifier id'>virtual_path</span><span class='lparen token'>(</span><span class='record identifier id'>record</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='record identifier id'>record</span><span class='dot token'>.</span><span class='partial identifier id'>partial</span><span class='rparen token'>)</span>
348
+ <span class='rbrace token'>}</span>
349
+
350
+ <span class='ActionView constant id'>ActionView</span><span class='colon2 op'>::</span><span class='Template constant id'>Template</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='source identifier id'>source</span><span class='comma token'>,</span> <span class='identifier identifier id'>identifier</span><span class='comma token'>,</span> <span class='handler identifier id'>handler</span><span class='comma token'>,</span> <span class='details identifier id'>details</span><span class='rparen token'>)</span>
351
+ <span class='end end kw'>end</span>
352
+ </pre>
353
+ </td>
354
+ </tr>
355
+ </table>
356
+ </div>
357
+
358
+ <div class="method_details ">
359
+ <p class="signature " id="normalize_array-instance_method">
360
+
361
+ - (<tt>Object</tt>) <strong>normalize_array</strong>(array)
362
+
363
+
364
+
365
+ </p><div class="docstring">
366
+ <div class="discussion">
367
+ <p>
368
+ Normalize arrays by converting all symbols to strings.
369
+ </p>
370
+
371
+
372
+ </div>
373
+ </div>
374
+ <div class="tags">
375
+
376
+ </div><table class="source_code">
377
+ <tr>
378
+ <td>
379
+ <pre class="lines">
380
+
381
+
382
+ 32
383
+ 33
384
+ 34</pre>
385
+ </td>
386
+ <td>
387
+ <pre class="code"><span class="info file"># File 'lib/mail_engine/mail_template_resolver.rb', line 32</span>
388
+
389
+ <span class='def def kw'>def</span> <span class='normalize_array identifier id'>normalize_array</span><span class='lparen token'>(</span><span class='array identifier id'>array</span><span class='rparen token'>)</span>
390
+ <span class='array identifier id'>array</span><span class='dot token'>.</span><span class='map identifier id'>map</span><span class='lparen token'>(</span><span class='bitand op'>&amp;</span><span class='symbol val'>:to_s</span><span class='rparen token'>)</span>
391
+ <span class='end end kw'>end</span>
392
+ </pre>
393
+ </td>
394
+ </tr>
395
+ </table>
396
+ </div>
397
+
398
+ <div class="method_details ">
399
+ <p class="signature " id="normalize_path-instance_method">
400
+
401
+ - (<tt>Object</tt>) <strong>normalize_path</strong>(name, prefix)
402
+
403
+
404
+
405
+ </p><div class="docstring">
406
+ <div class="discussion">
407
+ <p>
408
+ Normalize name and prefix, so the tuple [&quot;index&quot;,
409
+ &quot;users&quot;] becomes &quot;users/index&quot; and the tuple
410
+ [&quot;template&quot;, nil] becomes &quot;template&quot;.
411
+ </p>
412
+
413
+
414
+ </div>
415
+ </div>
416
+ <div class="tags">
417
+
418
+ </div><table class="source_code">
419
+ <tr>
420
+ <td>
421
+ <pre class="lines">
422
+
423
+
424
+ 27
425
+ 28
426
+ 29</pre>
427
+ </td>
428
+ <td>
429
+ <pre class="code"><span class="info file"># File 'lib/mail_engine/mail_template_resolver.rb', line 27</span>
430
+
431
+ <span class='def def kw'>def</span> <span class='normalize_path identifier id'>normalize_path</span><span class='lparen token'>(</span><span class='name identifier id'>name</span><span class='comma token'>,</span> <span class='prefix identifier id'>prefix</span><span class='rparen token'>)</span>
432
+ <span class='prefix identifier id'>prefix</span><span class='dot token'>.</span><span class='present? fid id'>present?</span> <span class='integer val'>? </span><span class='dstring node'>&quot;#{prefix}/#{name}&quot;</span> <span class='colon op'>:</span> <span class='name identifier id'>name</span>
433
+ <span class='end end kw'>end</span>
434
+ </pre>
435
+ </td>
436
+ </tr>
437
+ </table>
438
+ </div>
439
+
440
+ <div class="method_details ">
441
+ <p class="signature " id="virtual_path-instance_method">
442
+
443
+ - (<tt>Object</tt>) <strong>virtual_path</strong>(path, partial)
444
+
445
+
446
+
447
+ </p><div class="docstring">
448
+ <div class="discussion">
449
+ <p>
450
+ Make paths as &quot;users/user&quot; become &quot;users/_user&quot; for
451
+ partials.
452
+ </p>
453
+
454
+
455
+ </div>
456
+ </div>
457
+ <div class="tags">
458
+
459
+ </div><table class="source_code">
460
+ <tr>
461
+ <td>
462
+ <pre class="lines">
463
+
464
+
465
+ 53
466
+ 54
467
+ 55
468
+ 56
469
+ 57
470
+ 58
471
+ 59
472
+ 60</pre>
473
+ </td>
474
+ <td>
475
+ <pre class="code"><span class="info file"># File 'lib/mail_engine/mail_template_resolver.rb', line 53</span>
476
+
477
+ <span class='def def kw'>def</span> <span class='virtual_path identifier id'>virtual_path</span><span class='lparen token'>(</span><span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='partial identifier id'>partial</span><span class='rparen token'>)</span>
478
+ <span class='return return kw'>return</span> <span class='path identifier id'>path</span> <span class='unless unless_mod kw'>unless</span> <span class='partial identifier id'>partial</span>
479
+ <span class='if if kw'>if</span> <span class='index identifier id'>index</span> <span class='assign token'>=</span> <span class='path identifier id'>path</span><span class='dot token'>.</span><span class='rindex identifier id'>rindex</span><span class='lparen token'>(</span><span class='string val'>&quot;/&quot;</span><span class='rparen token'>)</span>
480
+ <span class='path identifier id'>path</span><span class='dot token'>.</span><span class='insert identifier id'>insert</span><span class='lparen token'>(</span><span class='index identifier id'>index</span> <span class='plus op'>+</span> <span class='integer val'>1</span><span class='comma token'>,</span> <span class='string val'>&quot;_&quot;</span><span class='rparen token'>)</span>
481
+ <span class='else else kw'>else</span>
482
+ <span class='dstring node'>&quot;_#{path}&quot;</span>
483
+ <span class='end end kw'>end</span>
484
+ <span class='end end kw'>end</span>
485
+ </pre>
486
+ </td>
487
+ </tr>
488
+ </table>
489
+ </div>
490
+
491
+ </div>
492
+
493
+ </div>
494
+
495
+ <div id="footer">
496
+ Generated on Mon Mar 14 22:31:44 2011 by
497
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
498
+ 0.6.4 (ruby-1.8.7).
499
+ </div>
500
+
501
+ </body>
502
+ </html>
@@ -141,7 +141,7 @@
141
141
  </div>
142
142
 
143
143
  <div id="footer">
144
- Generated on Fri Mar 4 17:56:26 2011 by
144
+ Generated on Mon Mar 14 22:31:45 2011 by
145
145
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
146
146
  0.6.4 (ruby-1.8.7).
147
147
  </div>
@@ -72,7 +72,7 @@
72
72
  </div>
73
73
 
74
74
  <div id="footer">
75
- Generated on Fri Mar 4 17:56:25 2011 by
75
+ Generated on Mon Mar 14 22:31:45 2011 by
76
76
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
77
77
  0.6.4 (ruby-1.8.7).
78
78
  </div>
@@ -88,7 +88,7 @@
88
88
  </div>
89
89
 
90
90
  <div id="footer">
91
- Generated on Fri Mar 4 17:56:27 2011 by
91
+ Generated on Mon Mar 14 22:31:45 2011 by
92
92
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
93
93
  0.6.4 (ruby-1.8.7).
94
94
  </div>
@@ -248,7 +248,7 @@ Returns the value of attribute data
248
248
  </div>
249
249
 
250
250
  <div id="footer">
251
- Generated on Fri Mar 4 17:56:26 2011 by
251
+ Generated on Mon Mar 14 22:31:44 2011 by
252
252
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
253
253
  0.6.4 (ruby-1.8.7).
254
254
  </div>
@@ -467,7 +467,7 @@
467
467
  </div>
468
468
 
469
469
  <div id="footer">
470
- Generated on Fri Mar 4 17:56:25 2011 by
470
+ Generated on Mon Mar 14 22:31:45 2011 by
471
471
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
472
472
  0.6.4 (ruby-1.8.7).
473
473
  </div>
@@ -91,7 +91,7 @@
91
91
  </div>
92
92
 
93
93
  <div id="footer">
94
- Generated on Fri Mar 4 17:56:26 2011 by
94
+ Generated on Mon Mar 14 22:31:44 2011 by
95
95
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
96
96
  0.6.4 (ruby-1.8.7).
97
97
  </div>