closure 1.5.3 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -132,7 +132,7 @@
132
132
  <li class="public ">
133
133
  <span class="summary_signature">
134
134
 
135
- <a href="#add_dependency-instance_method" title="#add_dependency (instance method)">- <strong>add_dependency</strong>(dependency) </a>
135
+ <a href="#add_dependency-instance_method" title="#add_dependency (instance method)">- <strong>add_dependency</strong>(dependency, root = nil) </a>
136
136
 
137
137
 
138
138
 
@@ -180,7 +180,7 @@
180
180
  <li class="public ">
181
181
  <span class="summary_signature">
182
182
 
183
- <a href="#compile-instance_method" title="#compile (instance method)">- (Compilation) <strong>compile</strong>(args) </a>
183
+ <a href="#compile-instance_method" title="#compile (instance method)">- (Compilation) <strong>compile</strong>(args, root = nil) </a>
184
184
 
185
185
 
186
186
 
@@ -320,6 +320,30 @@
320
320
  <p>A new instance of Goog.</p>
321
321
  </div></span>
322
322
 
323
+ </li>
324
+
325
+
326
+ <li class="public ">
327
+ <span class="summary_signature">
328
+
329
+ <a href="#path%3D-instance_method" title="#path= (instance method)">- <strong>path=</strong>(p) </a>
330
+
331
+
332
+
333
+ </span>
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+ <span class="summary_desc"><div class='inline'>
344
+ <p>Specify an explicit host or path for loading scripts.</p>
345
+ </div></span>
346
+
323
347
  </li>
324
348
 
325
349
 
@@ -341,7 +365,7 @@
341
365
 
342
366
 
343
367
  <span class="summary_desc"><div class='inline'>
344
- <p>If you change any javascript sources then you need to tell Script.</p>
368
+ <p>If your Script changes any javascript sources then call this.</p>
345
369
  </div></span>
346
370
 
347
371
  </li>
@@ -350,7 +374,7 @@
350
374
  <li class="public ">
351
375
  <span class="summary_signature">
352
376
 
353
- <a href="#soy_to_js-instance_method" title="#soy_to_js (instance method)">- <strong>soy_to_js</strong>(args) </a>
377
+ <a href="#soy_to_js-instance_method" title="#soy_to_js (instance method)">- <strong>soy_to_js</strong>(args, root = nil) </a>
354
378
 
355
379
 
356
380
 
@@ -433,7 +457,8 @@
433
457
  24
434
458
  25
435
459
  26
436
- 27</pre>
460
+ 27
461
+ 28</pre>
437
462
  </td>
438
463
  <td>
439
464
  <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 22</span>
@@ -443,6 +468,7 @@
443
468
  <span class='ivar'>@env</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span>
444
469
  <span class='ivar'>@render_stack</span> <span class='op'>=</span> <span class='id identifier rubyid_render_stack'>render_stack</span>
445
470
  <span class='ivar'>@dependencies</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
471
+ <span class='ivar'>@path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
446
472
  <span class='kw'>end</span></pre>
447
473
  </td>
448
474
  </tr>
@@ -459,7 +485,7 @@
459
485
  <div class="method_details first">
460
486
  <h3 class="signature first" id="add_dependency-instance_method">
461
487
 
462
- - <strong>add_dependency</strong>(dependency)
488
+ - <strong>add_dependency</strong>(dependency, root = nil)
463
489
 
464
490
 
465
491
 
@@ -477,7 +503,29 @@ script that calls compile.</p>
477
503
  </div>
478
504
  </div>
479
505
  <div class="tags">
506
+ <p class="tag_title">Parameters:</p>
507
+ <ul class="param">
508
+
509
+ <li>
510
+
511
+ <span class='name'>root</span>
512
+
513
+
514
+ <span class='type'>(<tt>String</tt>)</span>
515
+
516
+
517
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
518
+
519
+
520
+ &mdash;
521
+ <div class='inline'>
522
+ <p>of file paths, optional</p>
523
+ </div>
524
+
525
+ </li>
480
526
 
527
+ </ul>
528
+
481
529
 
482
530
  </div><table class="source_code">
483
531
  <tr>
@@ -485,16 +533,18 @@ script that calls compile.</p>
485
533
  <pre class="lines">
486
534
 
487
535
 
488
- 33
489
- 34
490
- 35
491
- 36</pre>
536
+ 47
537
+ 48
538
+ 49
539
+ 50
540
+ 51</pre>
492
541
  </td>
493
542
  <td>
494
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 33</span>
543
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 47</span>
495
544
 
496
- <span class='kw'>def</span> <span class='id identifier rubyid_add_dependency'>add_dependency</span><span class='lparen'>(</span><span class='id identifier rubyid_dependency'>dependency</span><span class='rparen'>)</span>
497
- <span class='id identifier rubyid_dependency'>dependency</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_dependency'>dependency</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@render_stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
545
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_dependency'>add_dependency</span><span class='lparen'>(</span><span class='id identifier rubyid_dependency'>dependency</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
546
+ <span class='id identifier rubyid_root'>root</span> <span class='op'>||=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@render_stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
547
+ <span class='id identifier rubyid_dependency'>dependency</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_dependency'>dependency</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span>
498
548
  <span class='ivar'>@dependencies</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_dependency'>dependency</span> <span class='kw'>unless</span> <span class='ivar'>@dependencies</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_dependency'>dependency</span>
499
549
  <span class='kw'>end</span></pre>
500
550
  </td>
@@ -555,12 +605,12 @@ without updating every html fixture page.</p>
555
605
  <pre class="lines">
556
606
 
557
607
 
558
- 159
559
- 160
560
- 161</pre>
608
+ 174
609
+ 175
610
+ 176</pre>
561
611
  </td>
562
612
  <td>
563
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 159</span>
613
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 174</span>
564
614
 
565
615
  <span class='kw'>def</span> <span class='id identifier rubyid_base_js'>base_js</span>
566
616
  <span class='ivar'>@sources</span><span class='period'>.</span><span class='id identifier rubyid_base_js'>base_js</span><span class='lparen'>(</span><span class='ivar'>@env</span><span class='rparen'>)</span>
@@ -573,7 +623,7 @@ without updating every html fixture page.</p>
573
623
  <div class="method_details ">
574
624
  <h3 class="signature " id="compile-instance_method">
575
625
 
576
- - (<tt>Compilation</tt>) <strong>compile</strong>(args)
626
+ - (<tt>Compilation</tt>) <strong>compile</strong>(args, root = nil)
577
627
 
578
628
 
579
629
 
@@ -632,6 +682,24 @@ determine if compilation is to be performed.</p>
632
682
 
633
683
  </li>
634
684
 
685
+ <li>
686
+
687
+ <span class='name'>root</span>
688
+
689
+
690
+ <span class='type'>(<tt>String</tt>)</span>
691
+
692
+
693
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
694
+
695
+
696
+ &mdash;
697
+ <div class='inline'>
698
+ <p>of file paths, optional</p>
699
+ </div>
700
+
701
+ </li>
702
+
635
703
  </ul>
636
704
 
637
705
  <p class="tag_title">Returns:</p>
@@ -654,24 +722,6 @@ determine if compilation is to be performed.</p>
654
722
  <pre class="lines">
655
723
 
656
724
 
657
- 70
658
- 71
659
- 72
660
- 73
661
- 74
662
- 75
663
- 76
664
- 77
665
- 78
666
- 79
667
- 80
668
- 81
669
- 82
670
- 83
671
- 84
672
- 85
673
- 86
674
- 87
675
725
  88
676
726
  89
677
727
  90
@@ -715,72 +765,84 @@ determine if compilation is to be performed.</p>
715
765
  128
716
766
  129
717
767
  130
718
- 131</pre>
768
+ 131
769
+ 132
770
+ 133
771
+ 134
772
+ 135
773
+ 136
774
+ 137
775
+ 138
776
+ 139
777
+ 140
778
+ 141
779
+ 142
780
+ 143
781
+ 144
782
+ 145
783
+ 146</pre>
719
784
  </td>
720
785
  <td>
721
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 70</span>
786
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 88</span>
722
787
 
723
- <span class='kw'>def</span> <span class='id identifier rubyid_compile'>compile</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
788
+ <span class='kw'>def</span> <span class='id identifier rubyid_compile'>compile</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
724
789
  <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='const'>Array</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_args'>args</span> <span class='comment'># work on a copy
725
- </span> <span class='id identifier rubyid_pre_js_tempfile'>pre_js_tempfile</span> <span class='op'>=</span> <span class='kw'>nil</span>
726
- <span class='kw'>begin</span>
727
- <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_expand_paths'>expand_paths</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@render_stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
728
- <span class='id identifier rubyid_mods'>mods</span> <span class='op'>=</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_augment'>augment</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='ivar'>@sources</span><span class='comma'>,</span> <span class='ivar'>@env</span>
729
- <span class='kw'>if</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_arg_values'>arg_values</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--compilation_level</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
730
- <span class='comment'># Raw mode
731
- </span> <span class='id identifier rubyid_comp'>comp</span> <span class='op'>=</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Compilation</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='ivar'>@env</span>
732
- <span class='kw'>if</span> <span class='id identifier rubyid_mods'>mods</span>
733
- <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_info'>module_info</span><span class='lparen'>(</span><span class='id identifier rubyid_mods'>mods</span><span class='rparen'>)</span>
734
- <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_uris_raw'>module_uris_raw</span><span class='lparen'>(</span><span class='id identifier rubyid_mods'>mods</span><span class='comma'>,</span> <span class='ivar'>@sources</span><span class='rparen'>)</span>
735
- <span class='kw'>end</span>
736
- <span class='id identifier rubyid_js_counter'>js_counter</span> <span class='op'>=</span> <span class='int'>0</span>
737
- <span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>=</span> <span class='int'>0</span>
738
- <span class='kw'>while</span> <span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
739
- <span class='id identifier rubyid_option'>option</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_args_index'>args_index</span><span class='comma'>,</span> <span class='int'>2</span><span class='rbracket'>]</span>
740
- <span class='kw'>if</span> <span class='id identifier rubyid_option'>option</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--js</span><span class='tstring_end'>&#39;</span></span>
741
- <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@render_stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
742
- <span class='id identifier rubyid_script_tag'>script_tag</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&lt;script src=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_src_for'>src_for</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='embexpr_end'>}</span><span class='tstring_content'>&gt;&lt;/script&gt;</span><span class='tstring_end'>&quot;</span></span>
743
- <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>document.write(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_script_tag'>script_tag</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='embexpr_end'>}</span><span class='tstring_content'>);\n</span><span class='tstring_end'>&quot;</span></span>
744
- <span class='id identifier rubyid_js_counter'>js_counter</span> <span class='op'>+=</span> <span class='int'>1</span>
745
- <span class='comment'># For modules, just the files for the first module
746
- </span> <span class='kw'>break</span> <span class='kw'>if</span> <span class='id identifier rubyid_mods'>mods</span> <span class='kw'>and</span> <span class='id identifier rubyid_js_counter'>js_counter</span> <span class='op'>&gt;=</span> <span class='id identifier rubyid_mods'>mods</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:files</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
747
- <span class='kw'>end</span>
748
- <span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>=</span> <span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>+</span> <span class='int'>2</span>
749
- <span class='kw'>end</span>
750
- <span class='kw'>else</span>
751
- <span class='comment'># Compiled mode
752
- </span> <span class='id identifier rubyid_module_output_path_prefix'>module_output_path_prefix</span> <span class='op'>=</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_arg_values'>arg_values</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--module_output_path_prefix</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
753
- <span class='kw'>if</span> <span class='id identifier rubyid_mods'>mods</span> <span class='kw'>and</span> <span class='op'>!</span><span class='id identifier rubyid_module_output_path_prefix'>module_output_path_prefix</span>
754
- <span class='comment'># raise this before compilation so we don&#39;t write to a weird place
755
- </span> <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--module_output_path_prefix is required when using --module</span><span class='tstring_end'>&quot;</span></span>
756
- <span class='kw'>end</span>
757
- <span class='id identifier rubyid_comp'>comp</span> <span class='op'>=</span> <span class='const'>Compiler</span><span class='period'>.</span><span class='id identifier rubyid_compile'>compile</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='ivar'>@dependencies</span><span class='comma'>,</span> <span class='ivar'>@env</span>
758
- <span class='kw'>if</span> <span class='id identifier rubyid_mods'>mods</span>
759
- <span class='id identifier rubyid_refresh'>refresh</span> <span class='comment'># compilation may add new files, module_uris_compiled uses src_for
760
- </span> <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_module_output_path_prefix'>module_output_path_prefix</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@render_stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
761
- <span class='kw'>if</span> <span class='id identifier rubyid_comp'>comp</span><span class='period'>.</span><span class='id identifier rubyid_js_output_file'>js_output_file</span>
762
- <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span> <span class='id identifier rubyid_comp'>comp</span><span class='period'>.</span><span class='id identifier rubyid_js_output_file'>js_output_file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>w</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
763
- <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_info'>module_info</span> <span class='id identifier rubyid_mods'>mods</span>
764
- <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_uris_compiled'>module_uris_compiled</span> <span class='id identifier rubyid_mods'>mods</span><span class='comma'>,</span> <span class='ivar'>@sources</span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span>
765
- <span class='kw'>end</span>
766
- <span class='kw'>else</span>
767
- <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_info'>module_info</span><span class='lparen'>(</span><span class='id identifier rubyid_mods'>mods</span><span class='rparen'>)</span>
768
- <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_uris_compiled'>module_uris_compiled</span><span class='lparen'>(</span><span class='id identifier rubyid_mods'>mods</span><span class='comma'>,</span> <span class='ivar'>@sources</span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span><span class='rparen'>)</span>
769
- <span class='kw'>end</span>
770
- <span class='comment'># Load the first module
771
- </span> <span class='id identifier rubyid_first_module_file'>first_module_file</span> <span class='op'>=</span> <span class='id identifier rubyid_module_output_path_prefix'>module_output_path_prefix</span> <span class='op'>+</span> <span class='id identifier rubyid_mods'>mods</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.js</span><span class='tstring_end'>&#39;</span></span>
772
- <span class='id identifier rubyid_first_module_file'>first_module_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_first_module_file'>first_module_file</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@render_stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
773
- <span class='id identifier rubyid_script_tag'>script_tag</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&lt;script src=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_src_for'>src_for</span><span class='lparen'>(</span><span class='id identifier rubyid_first_module_file'>first_module_file</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='embexpr_end'>}</span><span class='tstring_content'>&gt;&lt;/script&gt;</span><span class='tstring_end'>&quot;</span></span>
790
+ </span> <span class='id identifier rubyid_root'>root</span> <span class='op'>||=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@render_stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
791
+ <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_expand_paths'>expand_paths</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span>
792
+ <span class='id identifier rubyid_mods'>mods</span> <span class='op'>=</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_augment'>augment</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='ivar'>@sources</span><span class='comma'>,</span> <span class='ivar'>@env</span>
793
+ <span class='kw'>if</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_arg_values'>arg_values</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--compilation_level</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
794
+ <span class='comment'># Raw mode
795
+ </span> <span class='id identifier rubyid_comp'>comp</span> <span class='op'>=</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Compilation</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='ivar'>@env</span>
796
+ <span class='kw'>if</span> <span class='id identifier rubyid_mods'>mods</span>
797
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_path'>module_path</span><span class='lparen'>(</span><span class='ivar'>@path</span><span class='rparen'>)</span>
798
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_info'>module_info</span><span class='lparen'>(</span><span class='id identifier rubyid_mods'>mods</span><span class='rparen'>)</span>
799
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_uris_raw'>module_uris_raw</span><span class='lparen'>(</span><span class='id identifier rubyid_mods'>mods</span><span class='comma'>,</span> <span class='ivar'>@sources</span><span class='rparen'>)</span>
800
+ <span class='kw'>end</span>
801
+ <span class='id identifier rubyid_js_counter'>js_counter</span> <span class='op'>=</span> <span class='int'>0</span>
802
+ <span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>=</span> <span class='int'>0</span>
803
+ <span class='kw'>while</span> <span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
804
+ <span class='id identifier rubyid_option'>option</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_args_index'>args_index</span><span class='comma'>,</span> <span class='int'>2</span><span class='rbracket'>]</span>
805
+ <span class='kw'>if</span> <span class='id identifier rubyid_option'>option</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--js</span><span class='tstring_end'>&#39;</span></span>
806
+ <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span><span class='rparen'>)</span>
807
+ <span class='id identifier rubyid_script_tag'>script_tag</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&lt;script src=</span><span class='embexpr_beg'>#{</span><span class='lparen'>(</span><span class='ivar'>@path</span><span class='op'>+</span><span class='id identifier rubyid_src_for'>src_for</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='embexpr_end'>}</span><span class='tstring_content'>&gt;&lt;/script&gt;</span><span class='tstring_end'>&quot;</span></span>
774
808
  <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>document.write(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_script_tag'>script_tag</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='embexpr_end'>}</span><span class='tstring_content'>);\n</span><span class='tstring_end'>&quot;</span></span>
809
+ <span class='id identifier rubyid_js_counter'>js_counter</span> <span class='op'>+=</span> <span class='int'>1</span>
810
+ <span class='comment'># For modules, just the files for the first module
811
+ </span> <span class='kw'>break</span> <span class='kw'>if</span> <span class='id identifier rubyid_mods'>mods</span> <span class='kw'>and</span> <span class='id identifier rubyid_js_counter'>js_counter</span> <span class='op'>&gt;=</span> <span class='id identifier rubyid_mods'>mods</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:files</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
775
812
  <span class='kw'>end</span>
813
+ <span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>=</span> <span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>+</span> <span class='int'>2</span>
776
814
  <span class='kw'>end</span>
777
- <span class='id identifier rubyid_comp'>comp</span>
778
- <span class='kw'>ensure</span>
779
- <span class='kw'>if</span> <span class='id identifier rubyid_pre_js_tempfile'>pre_js_tempfile</span>
780
- <span class='id identifier rubyid_pre_js_tempfile'>pre_js_tempfile</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
781
- <span class='id identifier rubyid_pre_js_tempfile'>pre_js_tempfile</span><span class='period'>.</span><span class='id identifier rubyid_unlink'>unlink</span>
815
+ <span class='kw'>else</span>
816
+ <span class='comment'># Compiled mode
817
+ </span> <span class='id identifier rubyid_module_output_path_prefix'>module_output_path_prefix</span> <span class='op'>=</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_arg_values'>arg_values</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>--module_output_path_prefix</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
818
+ <span class='kw'>if</span> <span class='id identifier rubyid_mods'>mods</span> <span class='kw'>and</span> <span class='op'>!</span><span class='id identifier rubyid_module_output_path_prefix'>module_output_path_prefix</span>
819
+ <span class='comment'># raise this before compilation so we don&#39;t write to a weird place
820
+ </span> <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--module_output_path_prefix is required when using --module</span><span class='tstring_end'>&quot;</span></span>
821
+ <span class='kw'>end</span>
822
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>=</span> <span class='const'>Compiler</span><span class='period'>.</span><span class='id identifier rubyid_compile'>compile</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='ivar'>@dependencies</span><span class='comma'>,</span> <span class='ivar'>@env</span>
823
+ <span class='kw'>if</span> <span class='id identifier rubyid_mods'>mods</span>
824
+ <span class='id identifier rubyid_refresh'>refresh</span> <span class='comment'># compilation may add new files, module_uris_compiled uses src_for
825
+ </span> <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_module_output_path_prefix'>module_output_path_prefix</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span>
826
+ <span class='kw'>if</span> <span class='id identifier rubyid_comp'>comp</span><span class='period'>.</span><span class='id identifier rubyid_js_output_file'>js_output_file</span>
827
+ <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span> <span class='id identifier rubyid_comp'>comp</span><span class='period'>.</span><span class='id identifier rubyid_js_output_file'>js_output_file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>w</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
828
+ <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_path'>module_path</span> <span class='ivar'>@path</span>
829
+ <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_info'>module_info</span> <span class='id identifier rubyid_mods'>mods</span>
830
+ <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_uris_compiled'>module_uris_compiled</span> <span class='id identifier rubyid_mods'>mods</span><span class='comma'>,</span> <span class='ivar'>@sources</span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span>
831
+ <span class='kw'>end</span>
832
+ <span class='kw'>else</span>
833
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_path'>module_path</span><span class='lparen'>(</span><span class='ivar'>@path</span><span class='rparen'>)</span>
834
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_info'>module_info</span><span class='lparen'>(</span><span class='id identifier rubyid_mods'>mods</span><span class='rparen'>)</span>
835
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='const'>Compiler</span><span class='op'>::</span><span class='const'>Util</span><span class='period'>.</span><span class='id identifier rubyid_module_uris_compiled'>module_uris_compiled</span><span class='lparen'>(</span><span class='id identifier rubyid_mods'>mods</span><span class='comma'>,</span> <span class='ivar'>@sources</span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span><span class='rparen'>)</span>
836
+ <span class='kw'>end</span>
837
+ <span class='comment'># Load the first module
838
+ </span> <span class='id identifier rubyid_first_module_file'>first_module_file</span> <span class='op'>=</span> <span class='id identifier rubyid_module_output_path_prefix'>module_output_path_prefix</span> <span class='op'>+</span> <span class='id identifier rubyid_mods'>mods</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.js</span><span class='tstring_end'>&#39;</span></span>
839
+ <span class='id identifier rubyid_first_module_file'>first_module_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_first_module_file'>first_module_file</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span>
840
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>(function(){var e=document.createElement(&quot;script&quot;);e.type=&quot;text/javascript&quot;;e.src=</span><span class='tstring_end'>&#39;</span></span>
841
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='lparen'>(</span><span class='ivar'>@path</span> <span class='op'>+</span> <span class='id identifier rubyid_src_for'>src_for</span><span class='lparen'>(</span><span class='id identifier rubyid_first_module_file'>first_module_file</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span>
842
+ <span class='id identifier rubyid_comp'>comp</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>;document.body.appendChild(e);})();\n</span><span class='tstring_end'>&quot;</span></span>
782
843
  <span class='kw'>end</span>
783
844
  <span class='kw'>end</span>
845
+ <span class='id identifier rubyid_comp'>comp</span>
784
846
  <span class='kw'>end</span></pre>
785
847
  </td>
786
848
  </tr>
@@ -830,12 +892,12 @@ looking, or manually set CLOSURE_BASE_PATH.</p>
830
892
  <pre class="lines">
831
893
 
832
894
 
833
- 169
834
- 170
835
- 171</pre>
895
+ 184
896
+ 185
897
+ 186</pre>
836
898
  </td>
837
899
  <td>
838
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 169</span>
900
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 184</span>
839
901
 
840
902
  <span class='kw'>def</span> <span class='id identifier rubyid_deps_js'>deps_js</span>
841
903
  <span class='ivar'>@sources</span><span class='period'>.</span><span class='id identifier rubyid_deps_js'>deps_js</span><span class='lparen'>(</span><span class='ivar'>@env</span><span class='rparen'>)</span>
@@ -896,12 +958,12 @@ looking, or manually set CLOSURE_BASE_PATH.</p>
896
958
  <pre class="lines">
897
959
 
898
960
 
899
- 177
900
- 178
901
- 179</pre>
961
+ 192
962
+ 193
963
+ 194</pre>
902
964
  </td>
903
965
  <td>
904
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 177</span>
966
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 192</span>
905
967
 
906
968
  <span class='kw'>def</span> <span class='id identifier rubyid_deps_response'>deps_response</span>
907
969
  <span class='ivar'>@sources</span><span class='period'>.</span><span class='id identifier rubyid_deps_response'>deps_response</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='const'>Rack</span><span class='op'>::</span><span class='const'>Utils</span><span class='period'>.</span><span class='id identifier rubyid_unescape'>unescape</span><span class='lparen'>(</span><span class='ivar'>@env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='ivar'>@env</span><span class='rparen'>)</span>
@@ -946,17 +1008,17 @@ potential for a source browser, editor, and more.</p>
946
1008
  <pre class="lines">
947
1009
 
948
1010
 
949
- 185
950
- 186
951
- 187
952
- 188
953
- 189</pre>
1011
+ 200
1012
+ 201
1013
+ 202
1014
+ 203
1015
+ 204</pre>
954
1016
  </td>
955
1017
  <td>
956
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 185</span>
1018
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 200</span>
957
1019
 
958
1020
  <span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span>
959
- <span class='ivar'>@sources</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
1021
+ <span class='ivar'>@sources</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
960
1022
  <span class='kw'>yield</span> <span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span>
961
1023
  <span class='kw'>end</span>
962
1024
  <span class='kw'>end</span></pre>
@@ -1019,12 +1081,12 @@ namespace.</p>
1019
1081
  <pre class="lines">
1020
1082
 
1021
1083
 
1022
- 149
1023
- 150
1024
- 151</pre>
1084
+ 164
1085
+ 165
1086
+ 166</pre>
1025
1087
  </td>
1026
1088
  <td>
1027
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 149</span>
1089
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 164</span>
1028
1090
 
1029
1091
  <span class='kw'>def</span> <span class='id identifier rubyid_files_for'>files_for</span><span class='lparen'>(</span><span class='id identifier rubyid_namespace'>namespace</span><span class='comma'>,</span> <span class='id identifier rubyid_filenames'>filenames</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
1030
1092
  <span class='ivar'>@sources</span><span class='period'>.</span><span class='id identifier rubyid_files_for'>files_for</span><span class='lparen'>(</span><span class='id identifier rubyid_namespace'>namespace</span><span class='comma'>,</span> <span class='id identifier rubyid_filenames'>filenames</span><span class='comma'>,</span> <span class='ivar'>@env</span><span class='rparen'>)</span>
@@ -1032,6 +1094,57 @@ namespace.</p>
1032
1094
  </td>
1033
1095
  </tr>
1034
1096
  </table>
1097
+ </div>
1098
+
1099
+ <div class="method_details ">
1100
+ <h3 class="signature " id="path=-instance_method">
1101
+
1102
+ - <strong>path=</strong>(p)
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+ </h3><div class="docstring">
1109
+ <div class="discussion">
1110
+
1111
+ <p>Specify an explicit host or path for loading scripts. e.g.
1112
+ &#39;//example.com&#39; or &#39;/proxy/path&#39; You may also include a
1113
+ protocol and path if necessary. e.g. &#39;<a
1114
+ href="http://example.com:8080/proxy/path">example.com:8080/proxy/path</a>&#39;
1115
+ attr_reader :path</p>
1116
+
1117
+
1118
+ </div>
1119
+ </div>
1120
+ <div class="tags">
1121
+
1122
+
1123
+ </div><table class="source_code">
1124
+ <tr>
1125
+ <td>
1126
+ <pre class="lines">
1127
+
1128
+
1129
+ 35
1130
+ 36
1131
+ 37
1132
+ 38
1133
+ 39
1134
+ 40</pre>
1135
+ </td>
1136
+ <td>
1137
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 35</span>
1138
+
1139
+ <span class='kw'>def</span> <span class='id identifier rubyid_path='>path=</span> <span class='id identifier rubyid_p'>p</span>
1140
+ <span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_p'>p</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1141
+ <span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_p'>p</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>http://</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1142
+ <span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_p'>p</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https://</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1143
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>goog.path not valid</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='ivar'>@path</span> <span class='op'>==</span> <span class='id identifier rubyid_p'>p</span>
1144
+ <span class='kw'>end</span></pre>
1145
+ </td>
1146
+ </tr>
1147
+ </table>
1035
1148
  </div>
1036
1149
 
1037
1150
  <div class="method_details ">
@@ -1046,8 +1159,8 @@ namespace.</p>
1046
1159
  </h3><div class="docstring">
1047
1160
  <div class="discussion">
1048
1161
 
1049
- <p>If you change any javascript sources then you need to tell Script. This is
1050
- a lazy refresh, you may call it repeatedly.</p>
1162
+ <p>If your Script changes any javascript sources then call this. This is a
1163
+ lazy refresh, you may call it repeatedly.</p>
1051
1164
 
1052
1165
 
1053
1166
  </div>
@@ -1061,12 +1174,12 @@ a lazy refresh, you may call it repeatedly.</p>
1061
1174
  <pre class="lines">
1062
1175
 
1063
1176
 
1064
- 40
1065
- 41
1066
- 42</pre>
1177
+ 55
1178
+ 56
1179
+ 57</pre>
1067
1180
  </td>
1068
1181
  <td>
1069
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 40</span>
1182
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 55</span>
1070
1183
 
1071
1184
  <span class='kw'>def</span> <span class='id identifier rubyid_refresh'>refresh</span>
1072
1185
  <span class='ivar'>@sources</span><span class='period'>.</span><span class='id identifier rubyid_invalidate'>invalidate</span> <span class='ivar'>@env</span>
@@ -1079,7 +1192,7 @@ a lazy refresh, you may call it repeatedly.</p>
1079
1192
  <div class="method_details ">
1080
1193
  <h3 class="signature " id="soy_to_js-instance_method">
1081
1194
 
1082
- - <strong>soy_to_js</strong>(args)
1195
+ - <strong>soy_to_js</strong>(args, root = nil)
1083
1196
 
1084
1197
 
1085
1198
 
@@ -1110,6 +1223,24 @@ filenames are relative to the script calling #soy_to_js.</p>
1110
1223
 
1111
1224
  </li>
1112
1225
 
1226
+ <li>
1227
+
1228
+ <span class='name'>root</span>
1229
+
1230
+
1231
+ <span class='type'>(<tt>String</tt>)</span>
1232
+
1233
+
1234
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1235
+
1236
+
1237
+ &mdash;
1238
+ <div class='inline'>
1239
+ <p>of file paths, optional</p>
1240
+ </div>
1241
+
1242
+ </li>
1243
+
1113
1244
  </ul>
1114
1245
 
1115
1246
 
@@ -1119,16 +1250,18 @@ filenames are relative to the script calling #soy_to_js.</p>
1119
1250
  <pre class="lines">
1120
1251
 
1121
1252
 
1122
- 48
1123
- 49
1124
- 50
1125
- 51</pre>
1253
+ 64
1254
+ 65
1255
+ 66
1256
+ 67
1257
+ 68</pre>
1126
1258
  </td>
1127
1259
  <td>
1128
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 48</span>
1260
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 64</span>
1129
1261
 
1130
- <span class='kw'>def</span> <span class='id identifier rubyid_soy_to_js'>soy_to_js</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
1131
- <span class='const'>Templates</span><span class='op'>::</span><span class='id identifier rubyid_compile'>compile</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@render_stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span><span class='rparen'>)</span>
1262
+ <span class='kw'>def</span> <span class='id identifier rubyid_soy_to_js'>soy_to_js</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1263
+ <span class='id identifier rubyid_root'>root</span> <span class='op'>||=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@render_stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
1264
+ <span class='const'>Templates</span><span class='op'>::</span><span class='id identifier rubyid_compile'>compile</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_root'>root</span><span class='rparen'>)</span>
1132
1265
  <span class='id identifier rubyid_refresh'>refresh</span>
1133
1266
  <span class='kw'>end</span></pre>
1134
1267
  </td>
@@ -1195,13 +1328,13 @@ filenames are relative to the script calling #soy_to_js.</p>
1195
1328
  <pre class="lines">
1196
1329
 
1197
1330
 
1198
- 136
1199
- 137
1200
- 138
1201
- 139</pre>
1331
+ 151
1332
+ 152
1333
+ 153
1334
+ 154</pre>
1202
1335
  </td>
1203
1336
  <td>
1204
- <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 136</span>
1337
+ <pre class="code"><span class="info file"># File 'lib/closure/goog.rb', line 151</span>
1205
1338
 
1206
1339
  <span class='kw'>def</span> <span class='id identifier rubyid_src_for'>src_for</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span>
1207
1340
  <span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_filename'>filename</span>
@@ -1217,9 +1350,9 @@ filenames are relative to the script calling #soy_to_js.</p>
1217
1350
  </div>
1218
1351
 
1219
1352
  <div id="footer">
1220
- Generated on Fri Mar 18 15:12:13 2016 by
1353
+ Generated on Wed Jan 25 12:33:30 2017 by
1221
1354
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1222
- 0.8.7.6 (ruby-2.2.1).
1355
+ 0.8.7.6 (ruby-2.1.8).
1223
1356
  </div>
1224
1357
 
1225
1358
  </body>