Class: CoinSync::CryptoCurrency
- Defined in:
- lib/coinsync/currencies.rb
Constant Summary collapse
- MAPPING =
{ 'XRB' => 'NANO' }
Instance Attribute Summary
Attributes inherited from Currency
Instance Method Summary collapse
- #crypto? ⇒ Boolean
- #fiat? ⇒ Boolean
-
#initialize(code) ⇒ CryptoCurrency
constructor
A new instance of CryptoCurrency.
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
31 32 33 |
# File 'lib/coinsync/currencies.rb', line 31 def crypto? true end |
#fiat? ⇒ Boolean
27 28 29 |
# File 'lib/coinsync/currencies.rb', line 27 def fiat? false end |