closure 1.4.3 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +12 -12
- data/closure-compiler/README.md +503 -0
- data/closure-compiler/compiler.jar +0 -0
- data/closure-templates/SoyToJsSrcCompiler.jar +0 -0
- data/closure-templates/soyutils.js +1593 -469
- data/closure-templates/soyutils_usegoog.js +1105 -223
- data/docs/SCRIPT.md +5 -5
- data/docs/closure/Closure/BeanShell.html +63 -54
- data/docs/closure/Closure/Compiler/Compilation.html +124 -107
- data/docs/closure/Closure/Compiler/Error.html +28 -21
- data/docs/closure/Closure/Compiler.html +81 -76
- data/docs/closure/Closure/FileResponse.html +113 -98
- data/docs/closure/Closure/Goog.html +264 -253
- data/docs/closure/Closure/Middleware.html +66 -55
- data/docs/closure/Closure/Script/NotFound.html +28 -21
- data/docs/closure/Closure/Script/RenderStackOverflow.html +28 -21
- data/docs/closure/Closure/Script.html +212 -203
- data/docs/closure/Closure/Server.html +100 -90
- data/docs/closure/Closure/ShowExceptions.html +63 -52
- data/docs/closure/Closure/Sources.html +254 -246
- data/docs/closure/Closure/Templates/Error.html +28 -21
- data/docs/closure/Closure/Templates.html +88 -80
- data/docs/closure/Closure.html +181 -163
- data/docs/closure/_index.html +42 -38
- data/docs/closure/class_list.html +19 -8
- data/docs/closure/css/full_list.css +4 -2
- data/docs/closure/css/style.css +68 -51
- data/docs/closure/file.LICENSE.html +24 -217
- data/docs/closure/file.README.html +54 -47
- data/docs/closure/file_list.html +20 -9
- data/docs/closure/frames.html +18 -5
- data/docs/closure/index.html +54 -47
- data/docs/closure/js/app.js +60 -46
- data/docs/closure/js/full_list.js +24 -10
- data/docs/closure/js/jquery.js +4 -16
- data/docs/closure/method_list.html +74 -175
- data/docs/closure/top-level-namespace.html +29 -20
- data/lib/closure/compiler.rb +32 -42
- data/lib/closure/goog.rb +12 -12
- data/lib/closure/server.rb +6 -6
- data/lib/closure/show_exceptions.rb +15 -12
- data/lib/closure/version.rb +1 -1
- data/scripts/git.erb +183 -0
- data/scripts/hello/compiler.js.erb +2 -2
- data/scripts/hello/hello.js +1 -1
- data/scripts/hello/index.erb +6 -0
- data/scripts/hello/legume.js +12 -7
- data/scripts/index.erb +15 -13
- data/scripts/modules/compiler.js.erb +3 -3
- data/scripts/modules/compiler_build.js +3 -3
- data/scripts/modules/compiler_build.map +13 -12159
- data/scripts/modules/compiler_build_api.js +1 -1
- data/scripts/modules/compiler_build_app.js +74 -71
- data/scripts/modules/compiler_build_settings.js +2 -2
- data/scripts/modules/index.erb +5 -3
- data/scripts/modules/settings.js +1 -1
- data/scripts/svn.erb +11 -11
- data/scripts/welcome.erb +7 -6
- metadata +65 -81
- data/closure-compiler/README +0 -292
- data/scripts/hello/compiler_build.js +0 -5
- data/scripts/hello/compiler_build.map +0 -748
- data/scripts/hello/compiler_debug.js +0 -119
- data/scripts/modules/compiler_debug.js +0 -6
- data/scripts/modules/compiler_debug_api.js +0 -11
- data/scripts/modules/compiler_debug_app.js +0 -2414
- data/scripts/modules/compiler_debug_settings.js +0 -39
- data/scripts/rails/index.erb +0 -46
- data/scripts/rails/rails_ujs.js +0 -96
@@ -6,19 +6,21 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Closure::Compiler::Compilation
|
8
8
|
|
9
|
-
— Documentation by YARD 0.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
19
|
-
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!Closure/Compiler/Compilation.html";
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
@@ -26,36 +28,41 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="../../_index.html">Index (C)</a> »
|
34
|
+
<a href="../../_index.html">Index (C)</a> »
|
37
35
|
<span class='title'><span class='object_link'><a href="../../Closure.html" title="Closure (class)">Closure</a></span></span> » <span class='title'><span class='object_link'><a href="../Compiler.html" title="Closure::Compiler (class)">Compiler</a></span></span>
|
38
36
|
»
|
39
37
|
<span class="title">Compilation</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
65
|
+
|
59
66
|
<div id="content"><h1>Class: Closure::Compiler::Compilation
|
60
67
|
|
61
68
|
|
@@ -94,6 +101,8 @@
|
|
94
101
|
|
95
102
|
|
96
103
|
|
104
|
+
|
105
|
+
|
97
106
|
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
98
107
|
<ul class="summary">
|
99
108
|
|
@@ -107,7 +116,10 @@
|
|
107
116
|
</span>
|
108
117
|
|
109
118
|
|
110
|
-
|
119
|
+
|
120
|
+
|
121
|
+
<span class="note title readonly">readonly</span>
|
122
|
+
|
111
123
|
|
112
124
|
|
113
125
|
|
@@ -116,9 +128,8 @@
|
|
116
128
|
|
117
129
|
|
118
130
|
|
119
|
-
<span class="summary_desc"><div class='inline'
|
120
|
-
Returns the value of attribute js_output_file
|
121
|
-
</p>
|
131
|
+
<span class="summary_desc"><div class='inline'>
|
132
|
+
<p>Returns the value of attribute js_output_file.</p>
|
122
133
|
</div></span>
|
123
134
|
|
124
135
|
</li>
|
@@ -134,7 +145,10 @@ Returns the value of attribute js_output_file.
|
|
134
145
|
</span>
|
135
146
|
|
136
147
|
|
137
|
-
|
148
|
+
|
149
|
+
|
150
|
+
<span class="note title readonly">readonly</span>
|
151
|
+
|
138
152
|
|
139
153
|
|
140
154
|
|
@@ -143,9 +157,8 @@ Returns the value of attribute js_output_file.
|
|
143
157
|
|
144
158
|
|
145
159
|
|
146
|
-
<span class="summary_desc"><div class='inline'
|
147
|
-
Returns the value of attribute log
|
148
|
-
</p>
|
160
|
+
<span class="summary_desc"><div class='inline'>
|
161
|
+
<p>Returns the value of attribute log.</p>
|
149
162
|
</div></span>
|
150
163
|
|
151
164
|
</li>
|
@@ -178,11 +191,11 @@ Returns the value of attribute log.
|
|
178
191
|
|
179
192
|
|
180
193
|
|
194
|
+
|
181
195
|
|
182
196
|
|
183
|
-
<span class="summary_desc"><div class='inline'
|
184
|
-
Appends a string to the javascript
|
185
|
-
</p>
|
197
|
+
<span class="summary_desc"><div class='inline'>
|
198
|
+
<p>Appends a string to the javascript.</p>
|
186
199
|
</div></span>
|
187
200
|
|
188
201
|
</li>
|
@@ -197,6 +210,7 @@ Appends a string to the javascript.
|
|
197
210
|
|
198
211
|
</span>
|
199
212
|
|
213
|
+
|
200
214
|
<span class="note title constructor">constructor</span>
|
201
215
|
|
202
216
|
|
@@ -206,9 +220,8 @@ Appends a string to the javascript.
|
|
206
220
|
|
207
221
|
|
208
222
|
|
209
|
-
<span class="summary_desc"><div class='inline'
|
210
|
-
A new instance of Compilation
|
211
|
-
</p>
|
223
|
+
<span class="summary_desc"><div class='inline'>
|
224
|
+
<p>A new instance of Compilation.</p>
|
212
225
|
</div></span>
|
213
226
|
|
214
227
|
</li>
|
@@ -230,11 +243,11 @@ A new instance of Compilation.
|
|
230
243
|
|
231
244
|
|
232
245
|
|
246
|
+
|
233
247
|
|
234
248
|
|
235
|
-
<span class="summary_desc"><div class='inline'
|
236
|
-
Always returns the compiled javascript (possibly an empty string)
|
237
|
-
</p>
|
249
|
+
<span class="summary_desc"><div class='inline'>
|
250
|
+
<p>Always returns the compiled javascript (possibly an empty string).</p>
|
238
251
|
</div></span>
|
239
252
|
|
240
253
|
</li>
|
@@ -254,11 +267,11 @@ Always returns the compiled javascript (possibly an empty string).
|
|
254
267
|
|
255
268
|
|
256
269
|
|
270
|
+
|
257
271
|
|
258
272
|
|
259
|
-
<span class="summary_desc"><div class='inline'
|
260
|
-
Turn the compiled javascript into a Rack::Response object
|
261
|
-
</p>
|
273
|
+
<span class="summary_desc"><div class='inline'>
|
274
|
+
<p>Turn the compiled javascript into a Rack::Response object.</p>
|
262
275
|
</div></span>
|
263
276
|
|
264
277
|
</li>
|
@@ -271,17 +284,18 @@ Turn the compiled javascript into a Rack::Response object.
|
|
271
284
|
<h2>Constructor Details</h2>
|
272
285
|
|
273
286
|
<div class="method_details first">
|
274
|
-
<
|
287
|
+
<h3 class="signature first" id="initialize-instance_method">
|
275
288
|
|
276
289
|
- (<tt><span class='object_link'><a href="" title="Closure::Compiler::Compilation (class)">Compilation</a></span></tt>) <strong>initialize</strong>(env, js_output_file = nil, log = nil)
|
277
290
|
|
278
291
|
|
279
292
|
|
280
|
-
|
293
|
+
|
294
|
+
|
295
|
+
</h3><div class="docstring">
|
281
296
|
<div class="discussion">
|
282
|
-
|
283
|
-
|
284
|
-
</p>
|
297
|
+
|
298
|
+
<p>Returns a new instance of Compilation</p>
|
285
299
|
|
286
300
|
|
287
301
|
</div>
|
@@ -305,11 +319,11 @@ A new instance of Compilation
|
|
305
319
|
<td>
|
306
320
|
<pre class="code"><span class="info file"># File 'lib/closure/compiler.rb', line 97</span>
|
307
321
|
|
308
|
-
<span class='kw'>def</span> <span class='id
|
322
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='comma'>,</span> <span class='id identifier rubyid_js_output_file'>js_output_file</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_log'>log</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
309
323
|
<span class='ivar'>@javascript</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
310
|
-
<span class='ivar'>@env</span> <span class='op'>=</span> <span class='id
|
311
|
-
<span class='ivar'>@js_output_file</span> <span class='op'>=</span> <span class='id
|
312
|
-
<span class='ivar'>@log</span> <span class='op'>=</span> <span class='id
|
324
|
+
<span class='ivar'>@env</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span>
|
325
|
+
<span class='ivar'>@js_output_file</span> <span class='op'>=</span> <span class='id identifier rubyid_js_output_file'>js_output_file</span>
|
326
|
+
<span class='ivar'>@log</span> <span class='op'>=</span> <span class='id identifier rubyid_log'>log</span>
|
313
327
|
<span class='kw'>end</span></pre>
|
314
328
|
</td>
|
315
329
|
</tr>
|
@@ -323,19 +337,19 @@ A new instance of Compilation
|
|
323
337
|
|
324
338
|
|
325
339
|
<span id=""></span>
|
326
|
-
<span id="js_output_file-instance_method"></span>
|
327
340
|
<div class="method_details first">
|
328
|
-
<
|
341
|
+
<h3 class="signature first" id="js_output_file-instance_method">
|
329
342
|
|
330
343
|
- <strong>js_output_file</strong> <span class="extras">(readonly)</span>
|
331
344
|
|
332
345
|
|
333
346
|
|
334
|
-
|
347
|
+
|
348
|
+
|
349
|
+
</h3><div class="docstring">
|
335
350
|
<div class="discussion">
|
336
|
-
|
337
|
-
Returns the value of attribute js_output_file
|
338
|
-
</p>
|
351
|
+
|
352
|
+
<p>Returns the value of attribute js_output_file</p>
|
339
353
|
|
340
354
|
|
341
355
|
</div>
|
@@ -356,7 +370,7 @@ Returns the value of attribute js_output_file
|
|
356
370
|
<td>
|
357
371
|
<pre class="code"><span class="info file"># File 'lib/closure/compiler.rb', line 95</span>
|
358
372
|
|
359
|
-
<span class='kw'>def</span> <span class='id
|
373
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_js_output_file'>js_output_file</span>
|
360
374
|
<span class='ivar'>@js_output_file</span>
|
361
375
|
<span class='kw'>end</span></pre>
|
362
376
|
</td>
|
@@ -366,19 +380,19 @@ Returns the value of attribute js_output_file
|
|
366
380
|
|
367
381
|
|
368
382
|
<span id=""></span>
|
369
|
-
<span id="log-instance_method"></span>
|
370
383
|
<div class="method_details ">
|
371
|
-
<
|
384
|
+
<h3 class="signature " id="log-instance_method">
|
372
385
|
|
373
386
|
- <strong>log</strong> <span class="extras">(readonly)</span>
|
374
387
|
|
375
388
|
|
376
389
|
|
377
|
-
|
390
|
+
|
391
|
+
|
392
|
+
</h3><div class="docstring">
|
378
393
|
<div class="discussion">
|
379
|
-
|
380
|
-
Returns the value of attribute log
|
381
|
-
</p>
|
394
|
+
|
395
|
+
<p>Returns the value of attribute log</p>
|
382
396
|
|
383
397
|
|
384
398
|
</div>
|
@@ -399,7 +413,7 @@ Returns the value of attribute log
|
|
399
413
|
<td>
|
400
414
|
<pre class="code"><span class="info file"># File 'lib/closure/compiler.rb', line 94</span>
|
401
415
|
|
402
|
-
<span class='kw'>def</span> <span class='id
|
416
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_log'>log</span>
|
403
417
|
<span class='ivar'>@log</span>
|
404
418
|
<span class='kw'>end</span></pre>
|
405
419
|
</td>
|
@@ -412,26 +426,27 @@ Returns the value of attribute log
|
|
412
426
|
|
413
427
|
<div id="instance_method_details" class="method_details_list">
|
414
428
|
<h2>Instance Method Details</h2>
|
415
|
-
|
429
|
+
|
416
430
|
|
417
431
|
<div class="method_details first">
|
418
|
-
<
|
432
|
+
<h3 class="signature first" id="<<-instance_method">
|
419
433
|
|
420
434
|
- <strong><<</strong>(javascript)
|
421
435
|
|
422
436
|
|
423
437
|
|
424
|
-
|
438
|
+
|
439
|
+
|
440
|
+
</h3><div class="docstring">
|
425
441
|
<div class="discussion">
|
426
|
-
|
427
|
-
Appends a string to the javascript
|
428
|
-
</p>
|
442
|
+
|
443
|
+
<p>Appends a string to the javascript.</p>
|
429
444
|
|
430
445
|
|
431
446
|
</div>
|
432
447
|
</div>
|
433
448
|
<div class="tags">
|
434
|
-
<
|
449
|
+
<p class="tag_title">Parameters:</p>
|
435
450
|
<ul class="param">
|
436
451
|
|
437
452
|
<li>
|
@@ -462,8 +477,8 @@ Appends a string to the javascript.
|
|
462
477
|
<td>
|
463
478
|
<pre class="code"><span class="info file"># File 'lib/closure/compiler.rb', line 142</span>
|
464
479
|
|
465
|
-
<span class='kw'>def</span> <span class='op'><<</span><span class='lparen'>(</span><span class='id
|
466
|
-
<span class='ivar'>@javascript</span> <span class='op'><<</span> <span class='id
|
480
|
+
<span class='kw'>def</span> <span class='op'><<</span><span class='lparen'>(</span><span class='id identifier rubyid_javascript'>javascript</span><span class='rparen'>)</span>
|
481
|
+
<span class='ivar'>@javascript</span> <span class='op'><<</span> <span class='id identifier rubyid_javascript'>javascript</span>
|
467
482
|
<span class='kw'>self</span>
|
468
483
|
<span class='kw'>end</span></pre>
|
469
484
|
</td>
|
@@ -472,7 +487,7 @@ Appends a string to the javascript.
|
|
472
487
|
</div>
|
473
488
|
|
474
489
|
<div class="method_details ">
|
475
|
-
<
|
490
|
+
<h3 class="signature " id="javascript-instance_method">
|
476
491
|
|
477
492
|
- <strong>javascript</strong>
|
478
493
|
|
@@ -482,11 +497,12 @@ Appends a string to the javascript.
|
|
482
497
|
<span class="names"><span id='to_s-instance_method'>to_s</span></span>
|
483
498
|
</span>
|
484
499
|
|
485
|
-
|
500
|
+
|
501
|
+
|
502
|
+
</h3><div class="docstring">
|
486
503
|
<div class="discussion">
|
487
|
-
|
488
|
-
Always returns the compiled javascript (possibly an empty string)
|
489
|
-
</p>
|
504
|
+
|
505
|
+
<p>Always returns the compiled javascript (possibly an empty string).</p>
|
490
506
|
|
491
507
|
|
492
508
|
</div>
|
@@ -494,10 +510,10 @@ Always returns the compiled javascript (possibly an empty string).
|
|
494
510
|
<div class="tags">
|
495
511
|
|
496
512
|
<div class="examples">
|
497
|
-
<
|
513
|
+
<p class="tag_title">Examples:</p>
|
498
514
|
|
499
|
-
|
500
|
-
<pre class="example code"><%= goog.compile(args) %></pre>
|
515
|
+
|
516
|
+
<pre class="example code"><code><%= goog.compile(args) %></code></pre>
|
501
517
|
|
502
518
|
</div>
|
503
519
|
|
@@ -520,12 +536,12 @@ Always returns the compiled javascript (possibly an empty string).
|
|
520
536
|
<td>
|
521
537
|
<pre class="code"><span class="info file"># File 'lib/closure/compiler.rb', line 150</span>
|
522
538
|
|
523
|
-
<span class='kw'>def</span> <span class='id
|
539
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_javascript'>javascript</span>
|
524
540
|
<span class='kw'>if</span> <span class='ivar'>@js_output_file</span>
|
525
|
-
<span class='id
|
526
|
-
<span class='lparen'>(</span><span class='lbracket'>[</span><span class='id
|
541
|
+
<span class='id identifier rubyid_file_js'>file_js</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='ivar'>@js_output_file</span><span class='rparen'>)</span> <span class='kw'>rescue</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
542
|
+
<span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_file_js'>file_js</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='ivar'>@javascript</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='kw'>nil</span>
|
527
543
|
<span class='kw'>else</span>
|
528
|
-
<span class='ivar'>@javascript</span><span class='period'>.</span><span class='id
|
544
|
+
<span class='ivar'>@javascript</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='kw'>nil</span>
|
529
545
|
<span class='kw'>end</span>
|
530
546
|
<span class='kw'>end</span></pre>
|
531
547
|
</td>
|
@@ -534,19 +550,20 @@ Always returns the compiled javascript (possibly an empty string).
|
|
534
550
|
</div>
|
535
551
|
|
536
552
|
<div class="method_details ">
|
537
|
-
<
|
553
|
+
<h3 class="signature " id="to_response-instance_method">
|
538
554
|
|
539
555
|
- (<tt>Rack::Response</tt>) <strong>to_response</strong>
|
540
556
|
|
541
557
|
|
542
558
|
|
543
|
-
|
559
|
+
|
560
|
+
|
561
|
+
</h3><div class="docstring">
|
544
562
|
<div class="discussion">
|
545
|
-
|
546
|
-
Turn the compiled javascript into a Rack::Response object. Success and
|
547
|
-
warning messages, which aren&#
|
548
|
-
the javascript console
|
549
|
-
</p>
|
563
|
+
|
564
|
+
<p>Turn the compiled javascript into a Rack::Response object. Success and
|
565
|
+
warning messages, which aren't raised like errors, will be logged to
|
566
|
+
the javascript console.</p>
|
550
567
|
|
551
568
|
|
552
569
|
</div>
|
@@ -554,14 +571,14 @@ the javascript console.
|
|
554
571
|
<div class="tags">
|
555
572
|
|
556
573
|
<div class="examples">
|
557
|
-
<
|
574
|
+
<p class="tag_title">Examples:</p>
|
558
575
|
|
559
|
-
|
560
|
-
<pre class="example code"><% @response = goog.compile(args).to_response %></pre>
|
576
|
+
|
577
|
+
<pre class="example code"><code><% @response = goog.compile(args).to_response %></code></pre>
|
561
578
|
|
562
579
|
</div>
|
563
580
|
|
564
|
-
<
|
581
|
+
<p class="tag_title">Returns:</p>
|
565
582
|
<ul class="return">
|
566
583
|
|
567
584
|
<li>
|
@@ -604,24 +621,24 @@ the javascript console.
|
|
604
621
|
<td>
|
605
622
|
<pre class="code"><span class="info file"># File 'lib/closure/compiler.rb', line 120</span>
|
606
623
|
|
607
|
-
<span class='kw'>def</span> <span class='id
|
608
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='id
|
609
|
-
<span class='id
|
624
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_response'>to_response</span>
|
625
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_log'>log</span> <span class='kw'>and</span> <span class='ivar'>@javascript</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='kw'>and</span> <span class='ivar'>@js_output_file</span>
|
626
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>FileResponse</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='ivar'>@env</span><span class='comma'>,</span> <span class='ivar'>@js_output_file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>application/javascript</span><span class='tstring_end'>'</span></span>
|
610
627
|
<span class='kw'>else</span>
|
611
|
-
<span class='id
|
612
|
-
<span class='id
|
613
|
-
<span class='id
|
614
|
-
<span class='kw'>if</span> <span class='id
|
615
|
-
<span class='id
|
616
|
-
<span class='kw'>if</span> <span class='id
|
617
|
-
<span class='id
|
628
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
629
|
+
<span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Content-Type</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>application/javascript</span><span class='tstring_end'>'</span></span>
|
630
|
+
<span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Cache-Control</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>max-age=0, private, must-revalidate</span><span class='tstring_end'>'</span></span>
|
631
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_log'>log</span>
|
632
|
+
<span class='id identifier rubyid_consolable_log'>consolable_log</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>"Closure Compiler: %s\n\n", </span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_rstrip'>rstrip</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span>
|
633
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_log'>log</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'> 0 warn</span><span class='regexp_end'>/i</span></span>
|
634
|
+
<span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>try{console.log(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_consolable_log'>consolable_log</span><span class='embexpr_end'>}</span><span class='tstring_content'>)}catch(err){};\n</span><span class='tstring_end'>"</span></span>
|
618
635
|
<span class='kw'>else</span>
|
619
|
-
<span class='id
|
636
|
+
<span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>try{console.warn(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_consolable_log'>consolable_log</span><span class='embexpr_end'>}</span><span class='tstring_content'>)}catch(err){};\n</span><span class='tstring_end'>"</span></span>
|
620
637
|
<span class='kw'>end</span>
|
621
638
|
<span class='kw'>end</span>
|
622
|
-
<span class='id
|
639
|
+
<span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_javascript'>javascript</span>
|
623
640
|
<span class='kw'>end</span>
|
624
|
-
<span class='id
|
641
|
+
<span class='id identifier rubyid_response'>response</span>
|
625
642
|
<span class='kw'>end</span></pre>
|
626
643
|
</td>
|
627
644
|
</tr>
|
@@ -631,11 +648,11 @@ the javascript console.
|
|
631
648
|
</div>
|
632
649
|
|
633
650
|
</div>
|
634
|
-
|
651
|
+
|
635
652
|
<div id="footer">
|
636
|
-
Generated on Sun
|
653
|
+
Generated on Sun Mar 20 12:44:17 2016 by
|
637
654
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
638
|
-
0.7.
|
655
|
+
0.8.7.6 (ruby-2.2.1).
|
639
656
|
</div>
|
640
657
|
|
641
658
|
</body>
|
@@ -6,19 +6,21 @@
|
|
6
6
|
<title>
|
7
7
|
Exception: Closure::Compiler::Error
|
8
8
|
|
9
|
-
— Documentation by YARD 0.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
19
|
-
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!Closure/Compiler/Error.html";
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
@@ -26,36 +28,41 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="../../_index.html">Index (E)</a> »
|
34
|
+
<a href="../../_index.html">Index (E)</a> »
|
37
35
|
<span class='title'><span class='object_link'><a href="../../Closure.html" title="Closure (class)">Closure</a></span></span> » <span class='title'><span class='object_link'><a href="../Compiler.html" title="Closure::Compiler (class)">Compiler</a></span></span>
|
38
36
|
»
|
39
37
|
<span class="title">Error</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
65
|
+
|
59
66
|
<div id="content"><h1>Exception: Closure::Compiler::Error
|
60
67
|
|
61
68
|
|
@@ -96,20 +103,20 @@
|
|
96
103
|
|
97
104
|
|
98
105
|
|
99
|
-
|
100
106
|
|
101
107
|
|
102
|
-
|
108
|
+
|
109
|
+
|
103
110
|
|
104
111
|
|
105
112
|
|
106
113
|
|
107
114
|
</div>
|
108
|
-
|
115
|
+
|
109
116
|
<div id="footer">
|
110
|
-
Generated on Sun
|
117
|
+
Generated on Sun Mar 20 12:44:17 2016 by
|
111
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
112
|
-
0.7.
|
119
|
+
0.8.7.6 (ruby-2.2.1).
|
113
120
|
</div>
|
114
121
|
|
115
122
|
</body>
|