class CryptoCompare::CryptoCurrency
Attributes
circulating_supply[RW]
market_cap[RW]
name[RW]
percent_change[RW]
price[RW]
volume[RW]
Public Class Methods
all()
click to toggle source
# File lib/crypto_compare/crypto_currency.rb, line 12 def self.all @@all end
make_crypto_from_list(list, scraper)
click to toggle source
# File lib/crypto_compare/crypto_currency.rb, line 16 def self.make_crypto_from_list(list, scraper) list.each {|crypto| CryptoCompare::CryptoCurrency.new(scraper.get_attributes(crypto, scraper.page))} self.all end
new(data)
click to toggle source
# File lib/crypto_compare/crypto_currency.rb, line 7 def initialize(data) data.each{|key,value| self.send("#{key}=",value)} @@all << self if !@@all.detect {|crypto| crypto.name == self.name} end