doc/classes/App.src/M000012.html in js-get-0.1.3 vs doc/classes/App.src/M000012.html in js-get-0.1.4
- old
+ new
@@ -8,20 +8,21 @@
<title>install (App)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre><span class="ruby-comment cmt"># File bin/js-get, line 144</span>
+ <pre><span class="ruby-comment cmt"># File bin/js-get, line 145</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>
<span class="ruby-comment cmt"># Install Javascript</span>
- <span class="ruby-identifier">js_name</span> = <span class="ruby-ivar">@arguments</span>[<span class="ruby-value">1</span>]
- <span class="ruby-identifier">puts</span> <span class="ruby-node">"Installing Javascript - #{js_name}"</span>
- <span class="ruby-identifier">jlib</span> = <span class="ruby-constant">Crack</span><span class="ruby-operator">::</span><span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"#{HOST}/scripts/#{js_name}"</span>))
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkpath</span>(<span class="ruby-constant">JSDIR</span>)
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>([<span class="ruby-constant">JSDIR</span>, <span class="ruby-node">"#{js_name}.js"</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">'/'</span>), <span class="ruby-value str">'w'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">jlib</span>[<span class="ruby-value str">"src_url"</span>]))
+ <span class="ruby-ivar">@arguments</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">js_name</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">"Installing Javascript - #{js_name}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">verbose</span>
+ <span class="ruby-identifier">jlib</span> = <span class="ruby-constant">Crack</span><span class="ruby-operator">::</span><span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"#{HOST}/scripts/#{js_name}"</span>))
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkpath</span>(<span class="ruby-constant">JSDIR</span>)
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>([<span class="ruby-constant">JSDIR</span>, <span class="ruby-node">"#{js_name}.js"</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">'/'</span>), <span class="ruby-value str">'w'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">jlib</span>[<span class="ruby-value str">"src_url"</span>]))
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">"Successfully Installed - #{js_name}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">verbose</span>
<span class="ruby-keyword kw">end</span>
- <span class="ruby-identifier">puts</span> <span class="ruby-node">"Successfully Installed - #{js_name}"</span>
<span class="ruby-keyword kw">rescue</span>
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Could not locate javascript library on #{HOST}"</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file