Class: CoinTools::CoinMarketCap::DataPoint

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(time, usd_price, btc_price, converted_price = nil) ⇒ DataPoint

Returns a new instance of DataPoint.



22
23
24
25
26
27
# File 'lib/cointools/coinmarketcap.rb', line 22

def initialize(time, usd_price, btc_price, converted_price = nil)
  @time = time
  @usd_price = usd_price
  @btc_price = btc_price
  @converted_price = converted_price
end

Instance Attribute Details

#btc_priceObject (readonly)

Returns the value of attribute btc_price.



20
21
22
# File 'lib/cointools/coinmarketcap.rb', line 20

def btc_price
  @btc_price
end

#converted_priceObject (readonly)

Returns the value of attribute converted_price.



20
21
22
# File 'lib/cointools/coinmarketcap.rb', line 20

def converted_price
  @converted_price
end

#timeObject (readonly)

Returns the value of attribute time.



20
21
22
# File 'lib/cointools/coinmarketcap.rb', line 20

def time
  @time
end

#usd_priceObject (readonly)

Returns the value of attribute usd_price.



20
21
22
# File 'lib/cointools/coinmarketcap.rb', line 20

def usd_price
  @usd_price
end