Class: CoinSync::CryptoCurrency

Inherits:
Currency
  • Object
show all
Defined in:
lib/coinsync/currencies.rb

Constant Summary collapse

MAPPING =
{
  'XRB' => 'NANO'
}

Instance Attribute Summary

Attributes inherited from Currency

#code

Instance Method Summary collapse

Methods inherited from Currency

#<=>

Constructor Details

#initialize(code) ⇒ CryptoCurrency

Returns a new instance of CryptoCurrency.



23
24
25
# File 'lib/coinsync/currencies.rb', line 23

def initialize(code)
  super(MAPPING[code] || code)
end

Instance Method Details

#crypto?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/coinsync/currencies.rb', line 31

def crypto?
  true
end

#fiat?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/coinsync/currencies.rb', line 27

def fiat?
  false
end