Class: CoinSync::Importers::KrakenCSV

Inherits:
Base
  • Object
show all
Includes:
CoinSync::Importers::Kraken::Common
Defined in:
lib/coinsync/importers/kraken_csv.rb

Instance Method Summary collapse

Methods included from CoinSync::Importers::Kraken::Common

#build_transaction_list

Methods inherited from Base

#can_build?, #initialize, register_commands, register_importer, registered_commands

Constructor Details

This class inherits a constructor from CoinSync::Importers::Base

Instance Method Details

#read_transaction_list(source) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/coinsync/importers/kraken_csv.rb', line 13

def read_transaction_list(source)
  csv = CSV.new(source, col_sep: ',')

  entries = []

  csv.each do |line|
    next if line[0] == 'txid'

    entries << Kraken::LedgerEntry.from_csv(line)
  end

  build_transaction_list(entries)
end