class Coinmarketcap::Wrapper::Coin
Public Class Methods
all(**opts)
click to toggle source
# File lib/coinmarketcap/wrapper/coin.rb, line 4 def self.all(**opts) attributes = JSON.parse(fetch_all(opts)) clean_data(attributes, **opts) attributes.map { |attribute| new(attribute)} end
find(id, **opts)
click to toggle source
# File lib/coinmarketcap/wrapper/coin.rb, line 10 def self.find(id, **opts) attributes = JSON.parse(fetch_single(id, opts)) clean_data(attributes, **opts) new(attributes.first) end