]> git.donarmstrong.com Git - biopieces.git/blob - code_ruby/Maasha/lib/doc/classes/OptionHandler.src/M000022.html
add dist option to find_adaptor
[biopieces.git] / code_ruby / Maasha / lib / doc / classes / OptionHandler.src / M000022.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5   <title>options_check_dir (OptionHandler)</title>
6   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7   <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
8 </head>
9 <body class="standalone-code">
10   <pre><span class="ruby-comment cmt"># File biopieces.rb, line 442</span>
11   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options_check_dir</span>(<span class="ruby-identifier">cast</span>)
12     <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'dir!'</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]
13       <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;No such directory: '#{@options[cast[:long]]}'&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">cast</span>[<span class="ruby-identifier">:long</span>]]
14     <span class="ruby-keyword kw">end</span>
15   <span class="ruby-keyword kw">end</span></pre>
16 </body>
17 </html>