]> git.donarmstrong.com Git - biopieces.git/commitdiff
filesys now polished
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 18 Mar 2011 17:03:43 +0000 (17:03 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 18 Mar 2011 17:03:43 +0000 (17:03 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1295 74ccb610-7750-0410-82ae-013aeee3265d

code_ruby/Maasha/lib/filesys.rb

index f7d2b9b2c0ce4b547b6c0c41c33d0c7dcd0ac554..6f6d8cc210d1d64d52c18d4645f6dcddc7fa4197 100644 (file)
@@ -33,21 +33,19 @@ class Filesys
   # Class method allowing open to be used on (zipped) files.
   # See File.open.
   def self.open(*args)
-    pp *args
+    args = *args
+    file = args.first
 
-    tyt = *args
-    if tyt.first == "-"
+    if file == "-"
       ios = self.new(STDIN)
-    elsif File.pipe? *args.first
+    elsif File.pipe? file
       ios = self.new(File.open(*args))
     else
       ios = self.zopen(*args)
     end
 
     if block_given?
-      puts "BLOCK"
       begin
-        puts "YIELD"
         yield ios
       ensure
         ios.close