Class: Crypto

Inherits:
Object
  • Object
show all
Defined in:
lib/ctfc.rb

Overview

Shortcut to initialize new client, and get prices hash.

Examples:

Get EUR prices for coins:

coins = %w[BTC XMR LTC ETH]
Crypto.to :eur, coins, :cryptocompare, save: true

Class Method Summary collapse

Class Method Details

.to(*args) ⇒ Hash

Returns:

  • (Hash)

See Also:



21
22
23
# File 'lib/ctfc.rb', line 21

def self.to(*args)
  CTFC::Client.new(*args).get
end