Sha256: 8f1b105f5ffa3df7903543c6bcf120b27293db7c90c3b2c50590a21f96a880ad
Contents?: true
Size: 1.92 KB
Versions: 8
Compression:
Stored size: 1.92 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>new (DSK)</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 lib/DSK.rb, line 20</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-ivar">@file_bytes</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filename</span>,<span class="ruby-value str">"rb"</span>).<span class="ruby-identifier">read</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@file_bytes</span>.<span class="ruby-identifier">length!</span>=<span class="ruby-value">143360</span>) <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">abort</span>(<span class="ruby-node">"#{filename} is not a valid DSK format file"</span>) <span class="ruby-keyword kw">end</span> <span class="ruby-ivar">@files</span>=[] <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">is_dos33?</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">DOSDisk</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read_catalog</span> <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
8 entries across 8 versions & 1 rubygems