mack-javascript 0.6.1.1 → 0.6.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/JavascriptGenerator.html +162 -0
- data/doc/classes/Mack.html +141 -0
- data/doc/classes/Mack/JavaScript/Framework/Jquery.html +491 -0
- data/doc/classes/Mack/JavaScript/Framework/Prototype.html +438 -0
- data/doc/classes/Mack/JavaScript/ScriptGenerator.html +367 -0
- data/doc/classes/Mack/Rendering/Engine/Rjs.html +185 -0
- data/doc/classes/Mack/Rendering/Engine/Rjs/ViewTemplateHelpers.html +140 -0
- data/doc/classes/Mack/Rendering/Type/Js.html +180 -0
- data/doc/classes/Mack/Testing/Helpers.html +144 -0
- data/doc/classes/Mack/ViewHelpers/HtmlHelpers.html +240 -0
- data/doc/classes/Mack/ViewHelpers/StringHelpers.html +143 -0
- data/doc/created.rid +1 -0
- data/doc/files/README.html +111 -0
- data/doc/files/lib/mack-javascript/generators/javascript_generator_rb.html +113 -0
- data/doc/files/lib/mack-javascript/helpers/jquery_helper_rb.html +101 -0
- data/doc/files/lib/mack-javascript/helpers/prototype_helper_rb.html +101 -0
- data/doc/files/lib/mack-javascript/helpers/script_generator_rb.html +101 -0
- data/doc/files/lib/mack-javascript/helpers/testing_helpers_rb.html +101 -0
- data/doc/files/lib/mack-javascript/rendering/engine/rjs_rb.html +101 -0
- data/doc/files/lib/mack-javascript/rendering/type/js_rb.html +101 -0
- data/doc/files/lib/mack-javascript/view_helpers/html_helpers_rb.html +101 -0
- data/doc/files/lib/mack-javascript/view_helpers/string_helpers_rb.html +101 -0
- data/doc/files/lib/mack-javascript_rb.html +107 -0
- data/doc/fr_class_index.html +41 -0
- data/doc/fr_file_index.html +37 -0
- data/doc/fr_method_index.html +69 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- metadata +30 -2
@@ -0,0 +1,438 @@
|
|
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::JavaScript::Framework::Prototype</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::JavaScript::Framework::Prototype</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/mack-javascript/helpers/prototype_helper_rb.html">
|
59
|
+
lib/mack-javascript/helpers/prototype_helper.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="#M000032">build_callbacks</a>
|
90
|
+
<a href="#M000023">insert_html</a>
|
91
|
+
<a href="#M000030">options_for_ajax</a>
|
92
|
+
<a href="#M000031">options_for_javascript</a>
|
93
|
+
<a href="#M000029">remote_function</a>
|
94
|
+
<a href="#M000026">remove</a>
|
95
|
+
<a href="#M000025">replace</a>
|
96
|
+
<a href="#M000024">replace_html</a>
|
97
|
+
<a href="#M000027">show</a>
|
98
|
+
<a href="#M000028">toggle</a>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
<!-- if includes -->
|
106
|
+
|
107
|
+
<div id="section">
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<!-- if method_list -->
|
117
|
+
<div id="methods">
|
118
|
+
<h3 class="section-bar">Public Class methods</h3>
|
119
|
+
|
120
|
+
<div id="method-M000023" class="method-detail">
|
121
|
+
<a name="M000023"></a>
|
122
|
+
|
123
|
+
<div class="method-heading">
|
124
|
+
<a href="#M000023" class="method-signature">
|
125
|
+
<span class="method-name">insert_html</span><span class="method-args">(position, id, html)</span>
|
126
|
+
</a>
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<div class="method-description">
|
130
|
+
<p><a class="source-toggle" href="#"
|
131
|
+
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
|
132
|
+
<div class="method-source-code" id="M000023-source">
|
133
|
+
<pre>
|
134
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 8</span>
|
135
|
+
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert_html</span>(<span class="ruby-identifier">position</span>, <span class="ruby-identifier">id</span>, <span class="ruby-identifier">html</span>)
|
136
|
+
9: <span class="ruby-identifier">insertion</span> = <span class="ruby-identifier">position</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">camelcase</span>
|
137
|
+
10: <span class="ruby-node">"new Insertion.#{insertion}('#{id}', '#{html}')"</span>
|
138
|
+
11: <span class="ruby-keyword kw">end</span>
|
139
|
+
</pre>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
<div id="method-M000029" class="method-detail">
|
145
|
+
<a name="M000029"></a>
|
146
|
+
|
147
|
+
<div class="method-heading">
|
148
|
+
<a href="#M000029" class="method-signature">
|
149
|
+
<span class="method-name">remote_function</span><span class="method-args">(options)</span>
|
150
|
+
</a>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
<div class="method-description">
|
154
|
+
<p>
|
155
|
+
def draggable(id, options = {})
|
156
|
+
</p>
|
157
|
+
<pre>
|
158
|
+
record @context.send(:draggable_element_js, id, options)
|
159
|
+
</pre>
|
160
|
+
<p>
|
161
|
+
end
|
162
|
+
</p>
|
163
|
+
<p>
|
164
|
+
def visual_effect(name, id = nil, options = {})
|
165
|
+
</p>
|
166
|
+
<pre>
|
167
|
+
record @context.send(:visual_effect, name, id, options)
|
168
|
+
</pre>
|
169
|
+
<p>
|
170
|
+
end
|
171
|
+
</p>
|
172
|
+
<p>
|
173
|
+
def drop_receiving(id, options = {})
|
174
|
+
</p>
|
175
|
+
<pre>
|
176
|
+
record @context.send(:drop_receiving_element_js, id, options)
|
177
|
+
</pre>
|
178
|
+
<p>
|
179
|
+
end
|
180
|
+
</p>
|
181
|
+
<p><a class="source-toggle" href="#"
|
182
|
+
onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
|
183
|
+
<div class="method-source-code" id="M000029-source">
|
184
|
+
<pre>
|
185
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 45</span>
|
186
|
+
45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remote_function</span>(<span class="ruby-identifier">options</span>)
|
187
|
+
46: <span class="ruby-identifier">javascript_options</span> = <span class="ruby-identifier">options_for_ajax</span>(<span class="ruby-identifier">options</span>)
|
188
|
+
47: <span class="ruby-node">"new Ajax.Request('#{options[:url]}', #{javascript_options.to_json})"</span>
|
189
|
+
48: <span class="ruby-identifier">update</span> = <span class="ruby-value str">''</span>
|
190
|
+
49: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:update</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:update</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
191
|
+
50: <span class="ruby-identifier">update</span> = []
|
192
|
+
51: <span class="ruby-identifier">update</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"success:'#{options[:update][:success]}'"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:update</span>][<span class="ruby-identifier">:success</span>]
|
193
|
+
52: <span class="ruby-identifier">update</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"failure:'#{options[:update][:failure]}'"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:update</span>][<span class="ruby-identifier">:failure</span>]
|
194
|
+
53: <span class="ruby-identifier">update</span> = <span class="ruby-value str">'{'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">update</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">','</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'}'</span>
|
195
|
+
54: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:update</span>]
|
196
|
+
55: <span class="ruby-identifier">update</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"'#{options[:update]}'"</span>
|
197
|
+
56: <span class="ruby-keyword kw">end</span>
|
198
|
+
57:
|
199
|
+
58: <span class="ruby-identifier">function</span> = <span class="ruby-identifier">update</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-value">? </span>
|
200
|
+
59: <span class="ruby-value str">"new Ajax.Request("</span> <span class="ruby-operator">:</span>
|
201
|
+
60: <span class="ruby-node">"new Ajax.Updater(#{update}, "</span>
|
202
|
+
61:
|
203
|
+
62: <span class="ruby-identifier">url_options</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:url</span>]
|
204
|
+
63: <span class="ruby-identifier">url_options</span> = <span class="ruby-identifier">url_options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">:escape</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">url_options</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
205
|
+
64: <span class="ruby-identifier">function</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"'#{url_options}'"</span>
|
206
|
+
65: <span class="ruby-identifier">function</span> <span class="ruby-operator"><<</span> <span class="ruby-node">", #{javascript_options})"</span>
|
207
|
+
66:
|
208
|
+
67: <span class="ruby-identifier">function</span> = <span class="ruby-node">"#{options[:before]}; #{function}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:before</span>]
|
209
|
+
68: <span class="ruby-identifier">function</span> = <span class="ruby-node">"#{function}; #{options[:after]}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:after</span>]
|
210
|
+
69: <span class="ruby-identifier">function</span> = <span class="ruby-node">"if (#{options[:condition]}) { #{function}; }"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:condition</span>]
|
211
|
+
70: <span class="ruby-identifier">function</span> = <span class="ruby-node">"if (confirm('#{escape_javascript(options[:confirm])}')) { #{function}; }"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:confirm</span>]
|
212
|
+
71:
|
213
|
+
72: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">function</span>
|
214
|
+
73: <span class="ruby-keyword kw">end</span>
|
215
|
+
</pre>
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div id="method-M000026" class="method-detail">
|
221
|
+
<a name="M000026"></a>
|
222
|
+
|
223
|
+
<div class="method-heading">
|
224
|
+
<a href="#M000026" class="method-signature">
|
225
|
+
<span class="method-name">remove</span><span class="method-args">(*ids)</span>
|
226
|
+
</a>
|
227
|
+
</div>
|
228
|
+
|
229
|
+
<div class="method-description">
|
230
|
+
<p><a class="source-toggle" href="#"
|
231
|
+
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
232
|
+
<div class="method-source-code" id="M000026-source">
|
233
|
+
<pre>
|
234
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 21</span>
|
235
|
+
21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ids</span>)
|
236
|
+
22: <span class="ruby-node">"#{ids.to_json}.each(Element.remove)"</span>
|
237
|
+
23: <span class="ruby-keyword kw">end</span>
|
238
|
+
</pre>
|
239
|
+
</div>
|
240
|
+
</div>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
<div id="method-M000025" class="method-detail">
|
244
|
+
<a name="M000025"></a>
|
245
|
+
|
246
|
+
<div class="method-heading">
|
247
|
+
<a href="#M000025" class="method-signature">
|
248
|
+
<span class="method-name">replace</span><span class="method-args">(id, html)</span>
|
249
|
+
</a>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<div class="method-description">
|
253
|
+
<p><a class="source-toggle" href="#"
|
254
|
+
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
255
|
+
<div class="method-source-code" id="M000025-source">
|
256
|
+
<pre>
|
257
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 17</span>
|
258
|
+
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">replace</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">html</span>)
|
259
|
+
18: <span class="ruby-node">"Element.replace('#{id}', '#{html}')"</span>
|
260
|
+
19: <span class="ruby-keyword kw">end</span>
|
261
|
+
</pre>
|
262
|
+
</div>
|
263
|
+
</div>
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<div id="method-M000024" class="method-detail">
|
267
|
+
<a name="M000024"></a>
|
268
|
+
|
269
|
+
<div class="method-heading">
|
270
|
+
<a href="#M000024" class="method-signature">
|
271
|
+
<span class="method-name">replace_html</span><span class="method-args">(id, html)</span>
|
272
|
+
</a>
|
273
|
+
</div>
|
274
|
+
|
275
|
+
<div class="method-description">
|
276
|
+
<p><a class="source-toggle" href="#"
|
277
|
+
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
|
278
|
+
<div class="method-source-code" id="M000024-source">
|
279
|
+
<pre>
|
280
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 13</span>
|
281
|
+
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">replace_html</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">html</span>)
|
282
|
+
14: <span class="ruby-node">"Element.update('#{id}', '#{html}')"</span>
|
283
|
+
15: <span class="ruby-keyword kw">end</span>
|
284
|
+
</pre>
|
285
|
+
</div>
|
286
|
+
</div>
|
287
|
+
</div>
|
288
|
+
|
289
|
+
<div id="method-M000027" class="method-detail">
|
290
|
+
<a name="M000027"></a>
|
291
|
+
|
292
|
+
<div class="method-heading">
|
293
|
+
<a href="#M000027" class="method-signature">
|
294
|
+
<span class="method-name">show</span><span class="method-args">(*ids)</span>
|
295
|
+
</a>
|
296
|
+
</div>
|
297
|
+
|
298
|
+
<div class="method-description">
|
299
|
+
<p><a class="source-toggle" href="#"
|
300
|
+
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
|
301
|
+
<div class="method-source-code" id="M000027-source">
|
302
|
+
<pre>
|
303
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 25</span>
|
304
|
+
25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ids</span>)
|
305
|
+
26: <span class="ruby-node">"#{ids.to_json}.each(Element.show)"</span>
|
306
|
+
27: <span class="ruby-keyword kw">end</span>
|
307
|
+
</pre>
|
308
|
+
</div>
|
309
|
+
</div>
|
310
|
+
</div>
|
311
|
+
|
312
|
+
<div id="method-M000028" class="method-detail">
|
313
|
+
<a name="M000028"></a>
|
314
|
+
|
315
|
+
<div class="method-heading">
|
316
|
+
<a href="#M000028" class="method-signature">
|
317
|
+
<span class="method-name">toggle</span><span class="method-args">(*ids)</span>
|
318
|
+
</a>
|
319
|
+
</div>
|
320
|
+
|
321
|
+
<div class="method-description">
|
322
|
+
<p><a class="source-toggle" href="#"
|
323
|
+
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
|
324
|
+
<div class="method-source-code" id="M000028-source">
|
325
|
+
<pre>
|
326
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 29</span>
|
327
|
+
29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">toggle</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ids</span>)
|
328
|
+
30: <span class="ruby-node">"#{ids.to_json}.each(Element.toggle)"</span>
|
329
|
+
31: <span class="ruby-keyword kw">end</span>
|
330
|
+
</pre>
|
331
|
+
</div>
|
332
|
+
</div>
|
333
|
+
</div>
|
334
|
+
|
335
|
+
<h3 class="section-bar">Protected Class methods</h3>
|
336
|
+
|
337
|
+
<div id="method-M000032" class="method-detail">
|
338
|
+
<a name="M000032"></a>
|
339
|
+
|
340
|
+
<div class="method-heading">
|
341
|
+
<a href="#M000032" class="method-signature">
|
342
|
+
<span class="method-name">build_callbacks</span><span class="method-args">(options)</span>
|
343
|
+
</a>
|
344
|
+
</div>
|
345
|
+
|
346
|
+
<div class="method-description">
|
347
|
+
<p><a class="source-toggle" href="#"
|
348
|
+
onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
|
349
|
+
<div class="method-source-code" id="M000032-source">
|
350
|
+
<pre>
|
351
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 97</span>
|
352
|
+
97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_callbacks</span>(<span class="ruby-identifier">options</span>)
|
353
|
+
98: <span class="ruby-identifier">callbacks</span> = {}
|
354
|
+
99: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">callback</span>, <span class="ruby-identifier">code</span><span class="ruby-operator">|</span>
|
355
|
+
100: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@callbacks</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">callback</span>)
|
356
|
+
101: <span class="ruby-identifier">name</span> = <span class="ruby-value str">'on'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">callback</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">capitalize</span>
|
357
|
+
102: <span class="ruby-identifier">callbacks</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-node">"function(request){#{code}}"</span>
|
358
|
+
103: <span class="ruby-keyword kw">end</span>
|
359
|
+
104: <span class="ruby-keyword kw">end</span>
|
360
|
+
105: <span class="ruby-identifier">callbacks</span>
|
361
|
+
106: <span class="ruby-keyword kw">end</span>
|
362
|
+
</pre>
|
363
|
+
</div>
|
364
|
+
</div>
|
365
|
+
</div>
|
366
|
+
|
367
|
+
<div id="method-M000030" class="method-detail">
|
368
|
+
<a name="M000030"></a>
|
369
|
+
|
370
|
+
<div class="method-heading">
|
371
|
+
<a href="#M000030" class="method-signature">
|
372
|
+
<span class="method-name">options_for_ajax</span><span class="method-args">(options)</span>
|
373
|
+
</a>
|
374
|
+
</div>
|
375
|
+
|
376
|
+
<div class="method-description">
|
377
|
+
<p><a class="source-toggle" href="#"
|
378
|
+
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
379
|
+
<div class="method-source-code" id="M000030-source">
|
380
|
+
<pre>
|
381
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 76</span>
|
382
|
+
76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_for_ajax</span>(<span class="ruby-identifier">options</span>)
|
383
|
+
77: <span class="ruby-identifier">js_options</span> = <span class="ruby-identifier">build_callbacks</span>(<span class="ruby-identifier">options</span>)
|
384
|
+
78: <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'asynchronous'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">!=</span> <span class="ruby-identifier">:synchronous</span>
|
385
|
+
79: <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'method'</span>] = <span class="ruby-node">"'#{options[:method]}'"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:method</span>]
|
386
|
+
80: <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'insertion'</span>] = <span class="ruby-node">"Insertion.#{options[:position].to_s.camelize}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:position</span>]
|
387
|
+
81: <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'evalScripts'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:script</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:script</span>]
|
388
|
+
82:
|
389
|
+
83: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:form</span>]
|
390
|
+
84: <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'parameters'</span>] = <span class="ruby-value str">'Form.serialize(this)'</span>
|
391
|
+
85: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:submit</span>]
|
392
|
+
86: <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'parameters'</span>] = <span class="ruby-node">"Form.serialize('#{options[:submit]}')"</span>
|
393
|
+
87: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:with</span>]
|
394
|
+
88: <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'parameters'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:with</span>]
|
395
|
+
89: <span class="ruby-keyword kw">end</span>
|
396
|
+
90: <span class="ruby-identifier">options_for_javascript</span>(<span class="ruby-identifier">js_options</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>})
|
397
|
+
91: <span class="ruby-keyword kw">end</span>
|
398
|
+
</pre>
|
399
|
+
</div>
|
400
|
+
</div>
|
401
|
+
</div>
|
402
|
+
|
403
|
+
<div id="method-M000031" class="method-detail">
|
404
|
+
<a name="M000031"></a>
|
405
|
+
|
406
|
+
<div class="method-heading">
|
407
|
+
<a href="#M000031" class="method-signature">
|
408
|
+
<span class="method-name">options_for_javascript</span><span class="method-args">(options)</span>
|
409
|
+
</a>
|
410
|
+
</div>
|
411
|
+
|
412
|
+
<div class="method-description">
|
413
|
+
<p><a class="source-toggle" href="#"
|
414
|
+
onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
|
415
|
+
<div class="method-source-code" id="M000031-source">
|
416
|
+
<pre>
|
417
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/prototype_helper.rb, line 93</span>
|
418
|
+
93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_for_javascript</span>(<span class="ruby-identifier">options</span>)
|
419
|
+
94: <span class="ruby-value str">'{'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-node">"#{k}:#{v}"</span>}.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">', '</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'}'</span>
|
420
|
+
95: <span class="ruby-keyword kw">end</span>
|
421
|
+
</pre>
|
422
|
+
</div>
|
423
|
+
</div>
|
424
|
+
</div>
|
425
|
+
|
426
|
+
|
427
|
+
</div>
|
428
|
+
|
429
|
+
|
430
|
+
</div>
|
431
|
+
|
432
|
+
|
433
|
+
<div id="validator-badges">
|
434
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
435
|
+
</div>
|
436
|
+
|
437
|
+
</body>
|
438
|
+
</html>
|
@@ -0,0 +1,367 @@
|
|
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::JavaScript::ScriptGenerator</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::JavaScript::ScriptGenerator</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/mack-javascript/helpers/script_generator_rb.html">
|
59
|
+
lib/mack-javascript/helpers/script_generator.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="#M000035"><<</a>
|
90
|
+
<a href="#M000037">alert</a>
|
91
|
+
<a href="#M000039">assign</a>
|
92
|
+
<a href="#M000038">call</a>
|
93
|
+
<a href="#M000040">delay</a>
|
94
|
+
<a href="#M000041">framework</a>
|
95
|
+
<a href="#M000042">framework=</a>
|
96
|
+
<a href="#M000034">method_missing</a>
|
97
|
+
<a href="#M000033">new</a>
|
98
|
+
<a href="#M000036">to_s</a>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
<!-- if includes -->
|
106
|
+
|
107
|
+
<div id="section">
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<!-- if method_list -->
|
117
|
+
<div id="methods">
|
118
|
+
<h3 class="section-bar">Public Class methods</h3>
|
119
|
+
|
120
|
+
<div id="method-M000041" class="method-detail">
|
121
|
+
<a name="M000041"></a>
|
122
|
+
|
123
|
+
<div class="method-heading">
|
124
|
+
<a href="#M000041" class="method-signature">
|
125
|
+
<span class="method-name">framework</span><span class="method-args">()</span>
|
126
|
+
</a>
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<div class="method-description">
|
130
|
+
<p><a class="source-toggle" href="#"
|
131
|
+
onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
|
132
|
+
<div class="method-source-code" id="M000041-source">
|
133
|
+
<pre>
|
134
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 41</span>
|
135
|
+
41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">framework</span>
|
136
|
+
42: <span class="ruby-node">"Mack::JavaScript::Framework::#{framework_name}"</span>.<span class="ruby-identifier">constantize</span>
|
137
|
+
43: <span class="ruby-keyword kw">end</span>
|
138
|
+
</pre>
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
|
143
|
+
<div id="method-M000042" class="method-detail">
|
144
|
+
<a name="M000042"></a>
|
145
|
+
|
146
|
+
<div class="method-heading">
|
147
|
+
<a href="#M000042" class="method-signature">
|
148
|
+
<span class="method-name">framework=</span><span class="method-args">(args)</span>
|
149
|
+
</a>
|
150
|
+
</div>
|
151
|
+
|
152
|
+
<div class="method-description">
|
153
|
+
<p><a class="source-toggle" href="#"
|
154
|
+
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
155
|
+
<div class="method-source-code" id="M000042-source">
|
156
|
+
<pre>
|
157
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 45</span>
|
158
|
+
45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">framework=</span>(<span class="ruby-identifier">args</span>)
|
159
|
+
46: <span class="ruby-ivar">@@framework_name</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">camelcase</span>
|
160
|
+
47: <span class="ruby-keyword kw">end</span>
|
161
|
+
</pre>
|
162
|
+
</div>
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
<div id="method-M000033" class="method-detail">
|
167
|
+
<a name="M000033"></a>
|
168
|
+
|
169
|
+
<div class="method-heading">
|
170
|
+
<a href="#M000033" class="method-signature">
|
171
|
+
<span class="method-name">new</span><span class="method-args">()</span>
|
172
|
+
</a>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
<div class="method-description">
|
176
|
+
<p><a class="source-toggle" href="#"
|
177
|
+
onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
|
178
|
+
<div class="method-source-code" id="M000033-source">
|
179
|
+
<pre>
|
180
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 4</span>
|
181
|
+
4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
182
|
+
5: <span class="ruby-ivar">@lines</span> = <span class="ruby-value str">''</span>
|
183
|
+
6: <span class="ruby-keyword kw">end</span>
|
184
|
+
</pre>
|
185
|
+
</div>
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
190
|
+
|
191
|
+
<div id="method-M000035" class="method-detail">
|
192
|
+
<a name="M000035"></a>
|
193
|
+
|
194
|
+
<div class="method-heading">
|
195
|
+
<a href="#M000035" class="method-signature">
|
196
|
+
<span class="method-name"><<</span><span class="method-args">(s)</span>
|
197
|
+
</a>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
<div class="method-description">
|
201
|
+
<p><a class="source-toggle" href="#"
|
202
|
+
onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
|
203
|
+
<div class="method-source-code" id="M000035-source">
|
204
|
+
<pre>
|
205
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 12</span>
|
206
|
+
12: <span class="ruby-keyword kw">def</span> <span class="ruby-operator"><<</span>(<span class="ruby-identifier">s</span>)
|
207
|
+
13: <span class="ruby-ivar">@lines</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">";"</span>
|
208
|
+
14: <span class="ruby-keyword kw">end</span>
|
209
|
+
</pre>
|
210
|
+
</div>
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
|
214
|
+
<div id="method-M000037" class="method-detail">
|
215
|
+
<a name="M000037"></a>
|
216
|
+
|
217
|
+
<div class="method-heading">
|
218
|
+
<a href="#M000037" class="method-signature">
|
219
|
+
<span class="method-name">alert</span><span class="method-args">(message)</span>
|
220
|
+
</a>
|
221
|
+
</div>
|
222
|
+
|
223
|
+
<div class="method-description">
|
224
|
+
<p><a class="source-toggle" href="#"
|
225
|
+
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
226
|
+
<div class="method-source-code" id="M000037-source">
|
227
|
+
<pre>
|
228
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 20</span>
|
229
|
+
20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alert</span>(<span class="ruby-identifier">message</span>)
|
230
|
+
21: <span class="ruby-keyword kw">self</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"alert('#{message}')"</span>
|
231
|
+
22: <span class="ruby-keyword kw">end</span>
|
232
|
+
</pre>
|
233
|
+
</div>
|
234
|
+
</div>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<div id="method-M000039" class="method-detail">
|
238
|
+
<a name="M000039"></a>
|
239
|
+
|
240
|
+
<div class="method-heading">
|
241
|
+
<a href="#M000039" class="method-signature">
|
242
|
+
<span class="method-name">assign</span><span class="method-args">(variable, value)</span>
|
243
|
+
</a>
|
244
|
+
</div>
|
245
|
+
|
246
|
+
<div class="method-description">
|
247
|
+
<p><a class="source-toggle" href="#"
|
248
|
+
onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
|
249
|
+
<div class="method-source-code" id="M000039-source">
|
250
|
+
<pre>
|
251
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 31</span>
|
252
|
+
31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign</span>(<span class="ruby-identifier">variable</span>, <span class="ruby-identifier">value</span>)
|
253
|
+
32: <span class="ruby-keyword kw">self</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{variable} = #{value.to_json}"</span>
|
254
|
+
33: <span class="ruby-keyword kw">end</span>
|
255
|
+
</pre>
|
256
|
+
</div>
|
257
|
+
</div>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
<div id="method-M000038" class="method-detail">
|
261
|
+
<a name="M000038"></a>
|
262
|
+
|
263
|
+
<div class="method-heading">
|
264
|
+
<a href="#M000038" class="method-signature">
|
265
|
+
<span class="method-name">call</span><span class="method-args">(*args, &block)</span>
|
266
|
+
</a>
|
267
|
+
</div>
|
268
|
+
|
269
|
+
<div class="method-description">
|
270
|
+
<p><a class="source-toggle" href="#"
|
271
|
+
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
272
|
+
<div class="method-source-code" id="M000038-source">
|
273
|
+
<pre>
|
274
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 24</span>
|
275
|
+
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
276
|
+
25: <span class="ruby-identifier">s</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'('</span>
|
277
|
+
26: <span class="ruby-identifier">a</span> = []
|
278
|
+
27: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">to_json</span>}
|
279
|
+
28: <span class="ruby-keyword kw">self</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">','</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">')'</span>
|
280
|
+
29: <span class="ruby-keyword kw">end</span>
|
281
|
+
</pre>
|
282
|
+
</div>
|
283
|
+
</div>
|
284
|
+
</div>
|
285
|
+
|
286
|
+
<div id="method-M000040" class="method-detail">
|
287
|
+
<a name="M000040"></a>
|
288
|
+
|
289
|
+
<div class="method-heading">
|
290
|
+
<a href="#M000040" class="method-signature">
|
291
|
+
<span class="method-name">delay</span><span class="method-args">(seconds = 1) {|Mack::JavaScript::ScriptGenerator.new| ...}</span>
|
292
|
+
</a>
|
293
|
+
</div>
|
294
|
+
|
295
|
+
<div class="method-description">
|
296
|
+
<p><a class="source-toggle" href="#"
|
297
|
+
onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
|
298
|
+
<div class="method-source-code" id="M000040-source">
|
299
|
+
<pre>
|
300
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 35</span>
|
301
|
+
35: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delay</span>(<span class="ruby-identifier">seconds</span> = <span class="ruby-value">1</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
302
|
+
36: <span class="ruby-keyword kw">self</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"setTimeout(function() {\n\n"</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">JavaScript</span><span class="ruby-operator">::</span><span class="ruby-constant">ScriptGenerator</span>.<span class="ruby-identifier">new</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"}, #{(seconds * 1000).to_i})"</span>
|
303
|
+
37: <span class="ruby-keyword kw">end</span>
|
304
|
+
</pre>
|
305
|
+
</div>
|
306
|
+
</div>
|
307
|
+
</div>
|
308
|
+
|
309
|
+
<div id="method-M000034" class="method-detail">
|
310
|
+
<a name="M000034"></a>
|
311
|
+
|
312
|
+
<div class="method-heading">
|
313
|
+
<a href="#M000034" class="method-signature">
|
314
|
+
<span class="method-name">method_missing</span><span class="method-args">(sym, *args)</span>
|
315
|
+
</a>
|
316
|
+
</div>
|
317
|
+
|
318
|
+
<div class="method-description">
|
319
|
+
<p><a class="source-toggle" href="#"
|
320
|
+
onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
|
321
|
+
<div class="method-source-code" id="M000034-source">
|
322
|
+
<pre>
|
323
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 8</span>
|
324
|
+
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
325
|
+
9: <span class="ruby-keyword kw">self</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">framework</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
326
|
+
10: <span class="ruby-keyword kw">end</span>
|
327
|
+
</pre>
|
328
|
+
</div>
|
329
|
+
</div>
|
330
|
+
</div>
|
331
|
+
|
332
|
+
<div id="method-M000036" class="method-detail">
|
333
|
+
<a name="M000036"></a>
|
334
|
+
|
335
|
+
<div class="method-heading">
|
336
|
+
<a href="#M000036" class="method-signature">
|
337
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
338
|
+
</a>
|
339
|
+
</div>
|
340
|
+
|
341
|
+
<div class="method-description">
|
342
|
+
<p><a class="source-toggle" href="#"
|
343
|
+
onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
|
344
|
+
<div class="method-source-code" id="M000036-source">
|
345
|
+
<pre>
|
346
|
+
<span class="ruby-comment cmt"># File lib/mack-javascript/helpers/script_generator.rb, line 16</span>
|
347
|
+
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
348
|
+
17: <span class="ruby-ivar">@lines</span>
|
349
|
+
18: <span class="ruby-keyword kw">end</span>
|
350
|
+
</pre>
|
351
|
+
</div>
|
352
|
+
</div>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
|
356
|
+
</div>
|
357
|
+
|
358
|
+
|
359
|
+
</div>
|
360
|
+
|
361
|
+
|
362
|
+
<div id="validator-badges">
|
363
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
364
|
+
</div>
|
365
|
+
|
366
|
+
</body>
|
367
|
+
</html>
|