Class: YnabTw::Cathay::Converter
- Inherits:
-
Object
- Object
- YnabTw::Cathay::Converter
- Includes:
- YnabTw::Converter
- Defined in:
- lib/ynab_tw/cathay/converter.rb
Instance Method Summary collapse
Methods included from YnabTw::Converter
Instance Method Details
#convert_format(csv) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# 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 ⇒ Object
10 11 12 |
# File 'lib/ynab_tw/cathay/converter.rb', line 10 def input_headers %w{date withdraw deposit balance info memo extra} end |
#useless_header_count ⇒ Object
6 7 8 |
# File 'lib/ynab_tw/cathay/converter.rb', line 6 def useless_header_count 2 end |