Class: CoinTools::CoinMarketCap::DataPoint
- Inherits:
-
Object
- Object
- CoinTools::CoinMarketCap::DataPoint
- Defined in:
- lib/cointools/coinmarketcap.rb
Instance Attribute Summary collapse
-
#btc_price ⇒ Object
readonly
Returns the value of attribute btc_price.
-
#converted_price ⇒ Object
readonly
Returns the value of attribute converted_price.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
-
#usd_price ⇒ Object
readonly
Returns the value of attribute usd_price.
Instance Method Summary collapse
-
#initialize(time, usd_price, btc_price, converted_price = nil) ⇒ DataPoint
constructor
A new instance of DataPoint.
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_price ⇒ Object (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_price ⇒ Object (readonly)
Returns the value of attribute converted_price.
20 21 22 |
# File 'lib/cointools/coinmarketcap.rb', line 20 def converted_price @converted_price end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
20 21 22 |
# File 'lib/cointools/coinmarketcap.rb', line 20 def time @time end |
#usd_price ⇒ Object (readonly)
Returns the value of attribute usd_price.
20 21 22 |
# File 'lib/cointools/coinmarketcap.rb', line 20 def usd_price @usd_price end |