mack-distributed 0.7.0 → 0.7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. metadata +2 -33
  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/fr_class_index.html +0 -38
  29. data/doc/fr_file_index.html +0 -39
  30. data/doc/fr_method_index.html +0 -43
  31. data/doc/index.html +0 -24
  32. data/doc/rdoc-style.css +0 -208
@@ -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>
@@ -1,174 +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::Layout</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::Layout</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/layout_rb.html">
59
- lib/mack-distributed/views/rendering/type/layout.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="#M000001">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-M000001" class="method-detail">
112
- <a name="M000001"></a>
113
-
114
- <div class="method-heading">
115
- <a href="#M000001" 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><a class="source-toggle" href="#"
122
- onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
123
- <div class="method-source-code" id="M000001-source">
124
- <pre>
125
- <span class="ruby-comment cmt"># File lib/mack-distributed/views/rendering/type/layout.rb, line 10</span>
126
- 10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
127
- 11: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:layout</span>].<span class="ruby-identifier">starts_with?</span>(<span class="ruby-value str">&quot;distributed&quot;</span>)
128
- 12: <span class="ruby-comment cmt"># this is the regular layout, so call the local_render method</span>
129
- 13: <span class="ruby-identifier">old_render</span>
130
- 14: <span class="ruby-keyword kw">else</span>
131
- 15: <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">options</span>[<span class="ruby-identifier">:layout</span>])
132
- 16: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidAddressableURIFormat</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{self.options[:layout]}&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
- 17:
134
- 18: <span class="ruby-identifier">app_name</span> = <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>
135
- 19: <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-value str">&quot;layouts&quot;</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">path</span>)
136
- 20:
137
- 21: <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
- 22: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span>
139
- 23: <span class="ruby-identifier">raw</span> = <span class="ruby-value str">&quot;&quot;</span>
140
- 24: <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">:layout</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
- 25: <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
- 26:
143
- 27: <span class="ruby-identifier">layout_path</span> = <span class="ruby-node">&quot;#{resource}.#{self.options[:format]}.#{@engine.extension}&quot;</span>
144
- 28: <span class="ruby-identifier">raw</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">layout_path</span>)
145
- 29: <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
- 30: <span class="ruby-keyword kw">end</span>
147
- 31:
148
- 32: <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
- 33:
150
- 34: <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
- 35: <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
- 36: <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
- 37: <span class="ruby-comment cmt"># self.view_template.render_value = old_render_value</span>
154
- 38: <span class="ruby-keyword kw">end</span>
155
- 39: <span class="ruby-keyword kw">end</span>
156
- 40: <span class="ruby-keyword kw">end</span>
157
- </pre>
158
- </div>
159
- </div>
160
- </div>
161
-
162
-
163
- </div>
164
-
165
-
166
- </div>
167
-
168
-
169
- <div id="validator-badges">
170
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
171
- </div>
172
-
173
- </body>
174
- </html>