lib/rbbt/util/excel2tsv.rb in rbbt-util-3.2.1 vs lib/rbbt/util/excel2tsv.rb in rbbt-util-4.0.0

- old
+ new

@@ -1,9 +1,10 @@ require 'spreadsheet' -require 'rbbt/util/tsv' +require 'rbbt/tsv' require 'rbbt/util/tmpfile' -class TSV + +module TSV def self.excel2tsv(file, options = {}) sheet = options.delete :sheet header = options.delete :header header = true unless header == false sheet ||= 0 @@ -24,9 +25,9 @@ end rows.each do |row| f.puts row * "\t" end end - TSV.new(filename, options) + TSV.open(filename, options) end end end