class CoinSync::Importers::Circle::HistoryEntry
Attributes
date[RW]
from_account[RW]
from_amount[RW]
from_currency[RW]
id[RW]
status[RW]
to_account[RW]
to_amount[RW]
to_currency[RW]
type[RW]
Public Class Methods
new(line)
click to toggle source
# File lib/coinsync/importers/circle.rb, line 18 def initialize(line) @date = Time.strptime(line[0], '%a %b %d %Y %H:%M:%S GMT+0000 (%Z)') @id = line[1] @type = line[2] @from_account = line[3] @to_account = line[4] @from_amount = BigDecimal.new(line[5].gsub(/[^\d\.]+/, '')) @from_currency = FiatCurrency.new(line[6]) @to_amount = BigDecimal.new(line[7].gsub(/[^\d\.]+/, '')) @to_currency = CryptoCurrency.new(line[8]) @status = line[9] end