Class: Zinzout::ZoutFile
Instance Attribute Summary
Attributes inherited from ZinFile
Instance Method Summary collapse
Methods inherited from ZinFile
Constructor Details
This class inherits a constructor from Zinzout::ZinFile
Instance Method Details
#io_from_file(filename, encoding) ⇒ Object
69 70 71 72 73 74 75 |
# File 'lib/zinzout.rb', line 69 def io_from_file(filename, encoding) if /\.gz\Z/.match(filename) Zlib::GzipWriter.open(filename, nil, nil, encoding: encoding) else File.open(filename, 'w', encoding: encoding) end end |