class YnabTw::Cathay::Converter

Public Instance Methods

convert_format(csv) click to toggle source
# File lib/ynab_tw/cathay/converter.rb, line 14
def convert_format(csv)
  csv.each.map do |row|
    [
      DateTime.parse(row["date"]).strftime("%m/%d/%Y"),
      row["info"],
      nil,
      "#{row["memo"]} #{row["extra"]}",
      row["withdraw"],
      row["deposit"],
    ]
  end
end
input_headers() click to toggle source
# File lib/ynab_tw/cathay/converter.rb, line 10
def input_headers
  %w{date withdraw deposit balance info memo extra}
end
useless_header_count() click to toggle source
# File lib/ynab_tw/cathay/converter.rb, line 6
def useless_header_count
  2
end