class Mdb::Database
Private Instance Methods
open_csv(table) { |csv(stdout, col_sep: delimiter)| ... }
click to toggle source
monkeypatch in order to strip binary data, that only produces errors
# File lib/ara2yml.rb, line 9 def open_csv(table) command = "mdb-export -bstrip -D '%F %T' -d #{Shellwords.escape(delimiter)} #{file_name} #{table}" Open3.popen3(command) do |stdin, stdout, stderr| yield CSV.new(stdout, col_sep: delimiter) end end