Class: CoinSync::Importers::Circle::HistoryEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/coinsync/importers/circle.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line) ⇒ HistoryEntry

Returns a new instance of HistoryEntry.



18
19
20
21
22
23
24
25
26
27
28
29
# 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

Instance Attribute Details

#dateObject

Returns the value of attribute date.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def date
  @date
end

#from_accountObject

Returns the value of attribute from_account.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def 
  @from_account
end

#from_amountObject

Returns the value of attribute from_amount.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def from_amount
  @from_amount
end

#from_currencyObject

Returns the value of attribute from_currency.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def from_currency
  @from_currency
end

#idObject

Returns the value of attribute id.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def id
  @id
end

#statusObject

Returns the value of attribute status.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def status
  @status
end

#to_accountObject

Returns the value of attribute to_account.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def 
  @to_account
end

#to_amountObject

Returns the value of attribute to_amount.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def to_amount
  @to_amount
end

#to_currencyObject

Returns the value of attribute to_currency.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def to_currency
  @to_currency
end

#typeObject

Returns the value of attribute type.



15
16
17
# File 'lib/coinsync/importers/circle.rb', line 15

def type
  @type
end