mack-distributed 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 (33) hide show
  1. metadata +2 -34
  2. data/doc/classes/Mack/Distributable.html +0 -137
  3. data/doc/classes/Mack/Distributed/Errors/ApplicationNameUndefined.html +0 -118
  4. data/doc/classes/Mack/Distributed/Errors/InvalidAddressableURIFormat.html +0 -152
  5. data/doc/classes/Mack/Distributed/Errors/UnknownApplication.html +0 -155
  6. data/doc/classes/Mack/Distributed/Errors/UnknownRouteName.html +0 -156
  7. data/doc/classes/Mack/Distributed/Routes/Urls.html +0 -213
  8. data/doc/classes/Mack/Distributed/Utils/Rinda.html +0 -230
  9. data/doc/classes/Mack/Distributed/View.html +0 -221
  10. data/doc/classes/Mack/Distributed/ViewCache.html +0 -170
  11. data/doc/classes/Mack/Rendering/Type/Distributed.html +0 -173
  12. data/doc/classes/Mack/Rendering/Type/Layout.html +0 -174
  13. data/doc/classes/Mack/Routes/Urls.html +0 -165
  14. data/doc/created.rid +0 -1
  15. data/doc/files/README.html +0 -272
  16. data/doc/files/lib/mack-distributed/distributable_rb.html +0 -101
  17. data/doc/files/lib/mack-distributed/distributed_rb.html +0 -101
  18. data/doc/files/lib/mack-distributed/errors/errors_rb.html +0 -101
  19. data/doc/files/lib/mack-distributed/extensions/route_map_rb.html +0 -101
  20. data/doc/files/lib/mack-distributed/extensions/urls_rb.html +0 -101
  21. data/doc/files/lib/mack-distributed/routes/urls_rb.html +0 -101
  22. data/doc/files/lib/mack-distributed/utils/rinda_rb.html +0 -101
  23. data/doc/files/lib/mack-distributed/views/rendering/type/distributed_rb.html +0 -101
  24. data/doc/files/lib/mack-distributed/views/rendering/type/layout_rb.html +0 -101
  25. data/doc/files/lib/mack-distributed/views/view_cache_rb.html +0 -101
  26. data/doc/files/lib/mack-distributed/views/view_rb.html +0 -101
  27. data/doc/files/lib/mack-distributed_rb.html +0 -110
  28. data/doc/files/lib/mack-distributed_tasks_rb.html +0 -107
  29. data/doc/fr_class_index.html +0 -38
  30. data/doc/fr_file_index.html +0 -40
  31. data/doc/fr_method_index.html +0 -43
  32. data/doc/index.html +0 -24
  33. data/doc/rdoc-style.css +0 -208
@@ -1,221 +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::Distributed::View</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::Distributed::View</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/mack-distributed/views/view_rb.html">
59
- lib/mack-distributed/views/view.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
- Object
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
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000014">get</a>&nbsp;&nbsp;
90
- <a href="#M000016">ref</a>&nbsp;&nbsp;
91
- <a href="#M000015">register</a>&nbsp;&nbsp;
92
- </div>
93
- </div>
94
-
95
- </div>
96
-
97
-
98
- <!-- if includes -->
99
- <div id="includes">
100
- <h3 class="section-bar">Included Modules</h3>
101
-
102
- <div id="includes-list">
103
- <span class="include-name">Singleton</span>
104
- <span class="include-name">DRbUndumped</span>
105
- </div>
106
- </div>
107
-
108
- <div id="section">
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
- <!-- if method_list -->
118
- <div id="methods">
119
- <h3 class="section-bar">Public Class methods</h3>
120
-
121
- <div id="method-M000016" class="method-detail">
122
- <a name="M000016"></a>
123
-
124
- <div class="method-heading">
125
- <a href="#M000016" class="method-signature">
126
- <span class="method-name">ref</span><span class="method-args">(app_name)</span>
127
- </a>
128
- </div>
129
-
130
- <div class="method-description">
131
- <p><a class="source-toggle" href="#"
132
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
133
- <div class="method-source-code" id="M000016-source">
134
- <pre>
135
- <span class="ruby-comment cmt"># File lib/mack-distributed/views/view.rb, line 26</span>
136
- 26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ref</span>(<span class="ruby-identifier">app_name</span>)
137
- 27: <span class="ruby-keyword kw">begin</span>
138
- 28: <span class="ruby-identifier">obj</span> = <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Distributed</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">Rinda</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">:space</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">app_name</span>.<span class="ruby-identifier">to_sym</span>,
139
- 29: <span class="ruby-identifier">:klass_def</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:distributed_views</span>)
140
- 30: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">obj</span>
141
- 31: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Rinda</span><span class="ruby-operator">::</span><span class="ruby-constant">RequestExpiredError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">er</span>
142
- 32: <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">er</span>)
143
- 33: <span class="ruby-keyword kw">end</span>
144
- 34:
145
- 35: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
146
- 36: <span class="ruby-keyword kw">end</span>
147
- </pre>
148
- </div>
149
- </div>
150
- </div>
151
-
152
- <div id="method-M000015" class="method-detail">
153
- <a name="M000015"></a>
154
-
155
- <div class="method-heading">
156
- <a href="#M000015" class="method-signature">
157
- <span class="method-name">register</span><span class="method-args">()</span>
158
- </a>
159
- </div>
160
-
161
- <div class="method-description">
162
- <p><a class="source-toggle" href="#"
163
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
164
- <div class="method-source-code" id="M000015-source">
165
- <pre>
166
- <span class="ruby-comment cmt"># File lib/mack-distributed/views/view.rb, line 15</span>
167
- 15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register</span>
168
- 16: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_config</span>.<span class="ruby-identifier">mack</span>.<span class="ruby-identifier">share_views</span>
169
- 17: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Distributed</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span><span class="ruby-operator">::</span><span class="ruby-constant">ApplicationNameUndefined</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_config</span>.<span class="ruby-identifier">mack</span>.<span class="ruby-identifier">distributed_app_name</span>.<span class="ruby-identifier">nil?</span>
170
- 18: <span class="ruby-comment cmt"># Mack.logger.info &quot;Registering Mack::Distributed::View for '#{app_config.mack.distributed_app_name}' with Rinda&quot;</span>
171
- 19:
172
- 20: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Distributed</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">Rinda</span>.<span class="ruby-identifier">register_or_renew</span>(<span class="ruby-identifier">:space</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">app_config</span>.<span class="ruby-identifier">mack</span>.<span class="ruby-identifier">distributed_app_name</span>.<span class="ruby-identifier">to_sym</span>,
173
- 21: <span class="ruby-identifier">:klass_def</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:distributed_views</span>,
174
- 22: <span class="ruby-identifier">:object</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Distributed</span><span class="ruby-operator">::</span><span class="ruby-constant">View</span>.<span class="ruby-identifier">instance</span>)
175
- 23: <span class="ruby-keyword kw">end</span>
176
- 24: <span class="ruby-keyword kw">end</span>
177
- </pre>
178
- </div>
179
- </div>
180
- </div>
181
-
182
- <h3 class="section-bar">Public Instance methods</h3>
183
-
184
- <div id="method-M000014" class="method-detail">
185
- <a name="M000014"></a>
186
-
187
- <div class="method-heading">
188
- <a href="#M000014" class="method-signature">
189
- <span class="method-name">get</span><span class="method-args">(resource)</span>
190
- </a>
191
- </div>
192
-
193
- <div class="method-description">
194
- <p><a class="source-toggle" href="#"
195
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
196
- <div class="method-source-code" id="M000014-source">
197
- <pre>
198
- <span class="ruby-comment cmt"># File lib/mack-distributed/views/view.rb, line 8</span>
199
- 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">resource</span>)
200
- 9: <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Mack</span>.<span class="ruby-identifier">root</span>, <span class="ruby-identifier">resource</span>)
201
- 10: <span class="ruby-identifier">raw</span> = <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Distributed</span><span class="ruby-operator">::</span><span class="ruby-constant">ViewCache</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">path</span>)
202
- 11: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">raw</span>
203
- 12: <span class="ruby-keyword kw">end</span>
204
- </pre>
205
- </div>
206
- </div>
207
- </div>
208
-
209
-
210
- </div>
211
-
212
-
213
- </div>
214
-
215
-
216
- <div id="validator-badges">
217
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
218
- </div>
219
-
220
- </body>
221
- </html>
@@ -1,170 +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::Distributed::ViewCache</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::Distributed::ViewCache</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/mack-distributed/views/view_cache_rb.html">
59
- lib/mack-distributed/views/view_cache.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
- Cachetastic::Caches::Base
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
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000013">get</a>&nbsp;&nbsp;
90
- </div>
91
- </div>
92
-
93
- </div>
94
-
95
-
96
- <!-- if includes -->
97
- <div id="includes">
98
- <h3 class="section-bar">Included Modules</h3>
99
-
100
- <div id="includes-list">
101
- <span class="include-name">Mack::ViewHelpers::LinkHelpers</span>
102
- </div>
103
- </div>
104
-
105
- <div id="section">
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
- <!-- if method_list -->
115
- <div id="methods">
116
- <h3 class="section-bar">Public Class methods</h3>
117
-
118
- <div id="method-M000013" class="method-detail">
119
- <a name="M000013"></a>
120
-
121
- <div class="method-heading">
122
- <a href="#M000013" class="method-signature">
123
- <span class="method-name">get</span><span class="method-args">(path)</span>
124
- </a>
125
- </div>
126
-
127
- <div class="method-description">
128
- <p><a class="source-toggle" href="#"
129
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
130
- <div class="method-source-code" id="M000013-source">
131
- <pre>
132
- <span class="ruby-comment cmt"># File lib/mack-distributed/views/view_cache.rb, line 8</span>
133
- 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">path</span>)
134
- 9: <span class="ruby-identifier">raw</span> = <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span>
135
- 10: <span class="ruby-identifier">raw</span> = <span class="ruby-value str">&quot;&quot;</span>
136
- 11: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">path</span>)
137
- 12: <span class="ruby-identifier">raw</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">path</span>)
138
- 13:
139
- 14: <span class="ruby-comment cmt"># preprocess the raw content so we can resolve css/javascript/image path</span>
140
- 15: <span class="ruby-identifier">arr</span> = <span class="ruby-identifier">raw</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/&lt;%=.*?%&gt;/</span>)
141
- 16: <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">scriptlet</span><span class="ruby-operator">|</span>
142
- 17: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">scriptlet</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/stylesheet/</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">scriptlet</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/javascript/</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">scriptlet</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/image/</span>)
143
- 18: <span class="ruby-identifier">res</span> = <span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">scriptlet</span>).<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>)
144
- 19: <span class="ruby-identifier">raw</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-identifier">scriptlet</span>, <span class="ruby-identifier">res</span>)
145
- 20: <span class="ruby-keyword kw">end</span>
146
- 21: <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt"># if arr.each</span>
147
- 22: <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt"># if File.exists?</span>
148
- 23:
149
- 24: <span class="ruby-identifier">set</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">raw</span>)
150
- 25: <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt"># super(key)</span>
151
- 26: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">raw</span>
152
- 27: <span class="ruby-keyword kw">end</span>
153
- </pre>
154
- </div>
155
- </div>
156
- </div>
157
-
158
-
159
- </div>
160
-
161
-
162
- </div>
163
-
164
-
165
- <div id="validator-badges">
166
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
167
- </div>
168
-
169
- </body>
170
- </html>
@@ -1,173 +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::Rendering::Type::Distributed</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::Rendering::Type::Distributed</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../../files/lib/mack-distributed/views/rendering/type/distributed_rb.html">
59
- lib/mack-distributed/views/rendering/type/distributed.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
- Mack::Rendering::Type::Base
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
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000002">render</a>&nbsp;&nbsp;
90
- </div>
91
- </div>
92
-
93
- </div>
94
-
95
-
96
- <!-- if includes -->
97
-
98
- <div id="section">
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
- <!-- if method_list -->
108
- <div id="methods">
109
- <h3 class="section-bar">Public Instance methods</h3>
110
-
111
- <div id="method-M000002" class="method-detail">
112
- <a name="M000002"></a>
113
-
114
- <div class="method-heading">
115
- <a href="#M000002" class="method-signature">
116
- <span class="method-name">render</span><span class="method-args">()</span>
117
- </a>
118
- </div>
119
-
120
- <div class="method-description">
121
- <p>
122
- <a href="Distributed.html#M000002">render</a>(:distributed,
123
- &quot;distributed://host/resource&quot;)
124
- </p>
125
- <p><a class="source-toggle" href="#"
126
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
127
- <div class="method-source-code" id="M000002-source">
128
- <pre>
129
- <span class="ruby-comment cmt"># File lib/mack-distributed/views/rendering/type/distributed.rb, line 7</span>
130
- 7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
131
- 8: <span class="ruby-identifier">uri</span> = <span class="ruby-constant">Addressable</span><span class="ruby-operator">::</span><span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">render_value</span>)
132
- 9: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidAddressableURIFormat</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{self.render_value}&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">path</span>.<span class="ruby-identifier">nil?</span>
133
- 10:
134
- 11: <span class="ruby-identifier">app_name</span> = <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>
135
- 12: <span class="ruby-identifier">resource</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;app&quot;</span>, <span class="ruby-value str">&quot;views&quot;</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">path</span>)
136
- 13:
137
- 14: <span class="ruby-identifier">data</span> = <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Distributed</span><span class="ruby-operator">::</span><span class="ruby-constant">View</span>.<span class="ruby-identifier">ref</span>(<span class="ruby-identifier">app_name</span>)
138
- 15: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span>
139
- 16: <span class="ruby-identifier">raw</span> = <span class="ruby-value str">&quot;&quot;</span>
140
- 17: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Rendering</span><span class="ruby-operator">::</span><span class="ruby-constant">Engine</span><span class="ruby-operator">::</span><span class="ruby-constant">Registry</span>.<span class="ruby-identifier">engines</span>[<span class="ruby-identifier">:distributed</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
141
- 18: <span class="ruby-ivar">@engine</span> = <span class="ruby-identifier">find_engine</span>(<span class="ruby-identifier">e</span>).<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">view_template</span>)
142
- 19:
143
- 20: <span class="ruby-identifier">view_path</span> = <span class="ruby-node">&quot;#{resource}.#{self.options[:format]}.#{@engine.extension}&quot;</span>
144
- 21: <span class="ruby-identifier">raw</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">view_path</span>)
145
- 22: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">raw</span>.<span class="ruby-identifier">nil?</span>
146
- 23: <span class="ruby-keyword kw">end</span>
147
- 24:
148
- 25: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span><span class="ruby-operator">::</span><span class="ruby-constant">ResourceNotFound</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{self.options[:distributed]}&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">raw</span>.<span class="ruby-identifier">nil?</span>
149
- 26:
150
- 27: <span class="ruby-identifier">old_render_value</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">view_template</span>.<span class="ruby-identifier">render_value</span>.<span class="ruby-identifier">dup</span>
151
- 28: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">view_template</span>.<span class="ruby-identifier">render_value</span> = <span class="ruby-identifier">raw</span>
152
- 29: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Rendering</span><span class="ruby-operator">::</span><span class="ruby-constant">Type</span><span class="ruby-operator">::</span><span class="ruby-constant">Inline</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">view_template</span>).<span class="ruby-identifier">render</span>
153
- 30: <span class="ruby-comment cmt"># self.view_template.render_value = old_render_value</span>
154
- 31: <span class="ruby-keyword kw">end</span>
155
- 32: <span class="ruby-keyword kw">end</span>
156
- </pre>
157
- </div>
158
- </div>
159
- </div>
160
-
161
-
162
- </div>
163
-
164
-
165
- </div>
166
-
167
-
168
- <div id="validator-badges">
169
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
170
- </div>
171
-
172
- </body>
173
- </html>