ShogunPanda/bovem

View on GitHub
docs/Bovem/ShellMethods/Write.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Module: Bovem::ShellMethods::Write
  
    &mdash; Documentation by YARD 0.9.7
  
</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">
  pathId = "Bovem::ShellMethods::Write";
  relpath = '../../';
</script>


  <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>


  </head>
  <body>
    <div class="nav_wrap">
      <iframe id="nav" src="../../class_list.html?1"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="../../_index.html">Index (W)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../../Bovem.html" title="Bovem (module)">Bovem</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ShellMethods.html" title="Bovem::ShellMethods (module)">ShellMethods</a></span></span>
     &raquo; 
    <span class="title">Write</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../../class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <div id="content"><h1>Module: Bovem::ShellMethods::Write
  
  
  
</h1>
<div class="box_info">
  

  
  
  
  
  

  
  <dl>
    <dt>Included in:</dt>
    <dd><span class='object_link'><a href="../Shell.html" title="Bovem::Shell (class)">Bovem::Shell</a></span></dd>
  </dl>
  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>lib/bovem/shell.rb</dd>
  </dl>
  
</div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>Methods to copy or move entries.</p>


  </div>
</div>
<div class="tags">
  

</div>






  
    <h2>
      Instance Method Summary
      <small><a href="#" class="summary_toggle">collapse</a></small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#copy-instance_method" title="#copy (instance method)">#<strong>copy</strong>(src, dst, run: true, show_errors: false, fatal_errors: true)  &#x21d2; Boolean </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Copies a set of files or directory to another location.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#move-instance_method" title="#move (instance method)">#<strong>move</strong>(src, dst, run: true, show_errors: false, fatal_errors: true)  &#x21d2; Boolean </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Moves a set of files or directory to another location.</p>
</div></span>
  
</li>

      
    </ul>
  



  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="copy-instance_method">
  
    #<strong>copy</strong>(src, dst, run: true, show_errors: false, fatal_errors: true)  &#x21d2; <tt>Boolean</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Copies a set of files or directory to another location.</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>src</span>
      
      
        <span class='type'>(<tt>String|Array</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The entries to copy. If is an Array, <code>dst</code> is assumed to be a directory.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>dst</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The destination. <strong>Any existing entries will be overwritten.</strong> Any required directory will be created.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>run</span>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>If <code>false</code>, it will just print a list of message that would be copied or moved.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>show_errors</span>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>If show errors.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>fatal_errors</span>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>If quit in case of fatal errors.</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p><code>true</code> if operation succeeded, <code>false</code> otherwise.</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


142
143
144</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 142</span>

<span class='kw'>def</span> <span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</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_copy_or_move'>copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='comma'>,</span> <span class='label'>operation:</span> <span class='symbol'>:copy</span><span class='comma'>,</span> <span class='label'>run:</span> <span class='id identifier rubyid_run'>run</span><span class='comma'>,</span> <span class='label'>show_errors:</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='comma'>,</span> <span class='label'>fatal_errors:</span> <span class='id identifier rubyid_fatal_errors'>fatal_errors</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="move-instance_method">
  
    #<strong>move</strong>(src, dst, run: true, show_errors: false, fatal_errors: true)  &#x21d2; <tt>Boolean</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Moves a set of files or directory to another location.</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>src</span>
      
      
        <span class='type'>(<tt>String|Array</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The entries to move. If is an Array, <code>dst</code> is assumed to be a directory.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>dst</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The destination. <strong>Any existing entries will be overwritten.</strong> Any required directory will be created.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>run</span>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>If <code>false</code>, it will just print a list of message that would be deleted.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>show_errors</span>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>If show errors.</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>fatal_errors</span>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>If quit in case of fatal errors.</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p><code>true</code> if operation succeeded, <code>false</code> otherwise.</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


154
155
156</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 154</span>

<span class='kw'>def</span> <span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</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_copy_or_move'>copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='comma'>,</span> <span class='label'>operation:</span> <span class='symbol'>:move</span><span class='comma'>,</span> <span class='label'>run:</span> <span class='id identifier rubyid_run'>run</span><span class='comma'>,</span> <span class='label'>show_errors:</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='comma'>,</span> <span class='label'>fatal_errors:</span> <span class='id identifier rubyid_fatal_errors'>fatal_errors</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Thu Jan 12 16:10:58 2017 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.7 (ruby-2.3.0).
</div>

    </div>
  </body>
</html>