doc/Bovem/ShellMethods/Directories.html in bovem-3.0.5 vs doc/Bovem/ShellMethods/Directories.html in bovem-4.0.0

- old
+ new

@@ -4,22 +4,22 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Module: Bovem::ShellMethods::Directories - &mdash; Documentation by YARD 0.8.7.3 + &mdash; Documentation by YARD 0.8.7.6 </title> <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" /> <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" /> <script type="text/javascript" charset="utf-8"> hasFrames = window.top.frames.main ? true : false; relpath = '../../'; - framesUrl = "../../frames.html#!" + escape(window.location.href); + framesUrl = "../../frames.html#!Bovem/ShellMethods/Directories.html"; </script> <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> @@ -114,11 +114,11 @@ <ul class="summary"> <li class="public "> <span class="summary_signature"> - <a href="#create_directories-instance_method" title="#create_directories (instance method)">- (Boolean) <strong>create_directories</strong>(directories, mode = 0755, run = true, show_errors = false, fatal = true) </a> + <a href="#create_directories-instance_method" title="#create_directories (instance method)">- (Boolean) <strong>create_directories</strong>(*directories, mode: 0755, run: true, show_errors: false, fatal_errors: true) </a> </span> @@ -137,11 +137,11 @@ <li class="public "> <span class="summary_signature"> - <a href="#within_directory-instance_method" title="#within_directory (instance method)">- (Boolean) <strong>within_directory</strong>(directory, restore = true, show_messages = false) </a> + <a href="#within_directory-instance_method" title="#within_directory (instance method)">- (Boolean) <strong>within_directory</strong>(directory, restore: true, show_messages: false) </a> </span> @@ -169,11 +169,11 @@ <div class="method_details first"> <h3 class="signature first" id="create_directories-instance_method"> - - (<tt>Boolean</tt>) <strong>create_directories</strong>(directories, mode = 0755, run = true, show_errors = false, fatal = true) + - (<tt>Boolean</tt>) <strong>create_directories</strong>(*directories, mode: 0755, run: true, show_errors: false, fatal_errors: true) @@ -209,13 +209,11 @@ <span class='type'>(<tt>Fixnum</tt>)</span> - <em class="default">(defaults to: <tt>0755</tt>)</em> - &mdash; <div class='inline'><p>Initial permissions for the new directories.</p> </div> </li> @@ -226,13 +224,11 @@ <span class='type'>(<tt>Boolean</tt>)</span> - <em class="default">(defaults to: <tt>true</tt>)</em> - &mdash; <div class='inline'><p>If <code>false</code>, it will just print a list of directories that would be created.</p> </div> </li> @@ -243,30 +239,26 @@ <span class='type'>(<tt>Boolean</tt>)</span> - <em class="default">(defaults to: <tt>false</tt>)</em> - &mdash; <div class='inline'><p>If show errors.</p> </div> </li> <li> - <span class='name'>fatal</span> + <span class='name'>fatal_errors</span> <span class='type'>(<tt>Boolean</tt>)</span> - <em class="default">(defaults to: <tt>true</tt>)</em> - &mdash; <div class='inline'><p>If quit in case of fatal errors.</p> </div> </li> @@ -295,43 +287,43 @@ <tr> <td> <pre class="lines"> -454 -455 -456 -457 -458 -459 -460 -461 -462 -463 -464 -465 -466 -467 -468 -469 -470</pre> +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 454</span> + <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 424</span> -<span class='kw'>def</span> <span class='id identifier rubyid_create_directories'>create_directories</span><span class='lparen'>(</span><span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='int'>0755</span><span class='comma'>,</span> <span class='id identifier rubyid_run'>run</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_show_errors'>show_errors</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span> +<span class='kw'>def</span> <span class='id identifier rubyid_create_directories'>create_directories</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='label'>mode:</span> <span class='int'>0755</span><span class='comma'>,</span> <span class='label'>run:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>show_errors:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>fatal_errors:</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='comment'># Adjust directory -</span> <span class='id identifier rubyid_directories'>directories</span> <span class='op'>=</span> <span class='id identifier rubyid_directories'>directories</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_d'>d</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_d'>d</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='rbrace'>}</span> +</span> <span class='id identifier rubyid_directories'>directories</span> <span class='op'>=</span> <span class='id identifier rubyid_directories'>directories</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='label'>no_duplicates:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>compact:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>flatten:</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_d'>d</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_d'>d</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='rbrace'>}</span> - <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_run'>run</span> <span class='kw'>then</span> <span class='comment'># Just print + <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_run'>run</span> <span class='comment'># Just print </span> <span class='id identifier rubyid_dry_run_directory_creation'>dry_run_directory_creation</span><span class='lparen'>(</span><span class='id identifier rubyid_directories'>directories</span><span class='rparen'>)</span> <span class='kw'>else</span> <span class='id identifier rubyid_directories'>directories</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='op'>|</span> - <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_try_create_directory'>try_create_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_mode'>mode</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='comma'>,</span> <span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='rparen'>)</span> - <span class='kw'>break</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_rv'>rv</span> + <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;=</span> <span class='id identifier rubyid_try_create_directory'>try_create_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_mode'>mode</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal_errors'>fatal_errors</span><span class='comma'>,</span> <span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='rparen'>)</span> + <span class='kw'>break</span> <span class='kw'>unless</span> <span class='id identifier rubyid_rv'>rv</span> <span class='kw'>end</span> <span class='kw'>end</span> <span class='id identifier rubyid_rv'>rv</span> <span class='kw'>end</span></pre> @@ -341,11 +333,11 @@ </div> <div class="method_details "> <h3 class="signature " id="within_directory-instance_method"> - - (<tt>Boolean</tt>) <strong>within_directory</strong>(directory, restore = true, show_messages = false) + - (<tt>Boolean</tt>) <strong>within_directory</strong>(directory, restore: true, show_messages: false) @@ -381,13 +373,11 @@ <span class='type'>(<tt>Boolean</tt>)</span> - <em class="default">(defaults to: <tt>true</tt>)</em> - &mdash; <div class='inline'><p>If to restore the original working directory.</p> </div> </li> @@ -398,13 +388,11 @@ <span class='type'>(<tt>Boolean</tt>)</span> - <em class="default">(defaults to: <tt>false</tt>)</em> - &mdash; <div class='inline'><p>Show informative messages about working directory changes.</p> </div> </li> @@ -433,35 +421,31 @@ <tr> <td> <pre class="lines"> -433 -434 -435 -436 -437 -438 -439 -440 -441 -442 -443 -444</pre> +405 +406 +407 +408 +409 +410 +411 +412 +413 +414</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 433</span> + <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 405</span> -<span class='kw'>def</span> <span class='id identifier rubyid_within_directory'>within_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_restore'>restore</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span> - <span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_shell'>shell</span> - +<span class='kw'>def</span> <span class='id identifier rubyid_within_directory'>within_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='label'>restore:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>show_messages:</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='id identifier rubyid_directory'>directory</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_directory'>directory</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='id identifier rubyid_original'>original</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_pwd'>pwd</span> - <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_enter_directory'>enter_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_move_in'>move_in</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span><span class='rparen'>)</span> + <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_enter_directory'>enter_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span><span class='comma'>,</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_move_in'>move_in</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>yield</span> <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_block_given?'>block_given?</span> - <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_enter_directory'>enter_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_original'>original</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_move_out'>move_out</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_restore'>restore</span> + <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_enter_directory'>enter_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_original'>original</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span><span class='comma'>,</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_move_out'>move_out</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_restore'>restore</span> <span class='id identifier rubyid_rv'>rv</span> <span class='kw'>end</span></pre> </td> </tr> @@ -471,12 +455,12 @@ </div> </div> <div id="footer"> - Generated on Sat Mar 8 10:27:42 2014 by + Generated on Tue Mar 29 20:43:16 2016 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.7.3 (ruby-2.1.0). + 0.8.7.6 (ruby-2.3.0). </div> </body> </html> \ No newline at end of file