class Coinmarketcal::Coin

Attributes

id[R]
name[R]
symbol[R]

Public Class Methods

all() click to toggle source
# File lib/coinmarketcal/coin.rb, line 11
def self.all
  client.get('v1/coins').map{|data| new(data) }
end
new(attrs = {}) click to toggle source
# File lib/coinmarketcal/coin.rb, line 5
 def initialize(attrs = {})
  @id = attrs['id']
  @name = attrs['name']
  @symbol = attrs['symbol']
end

Private Class Methods

client() click to toggle source
# File lib/coinmarketcal/coin.rb, line 17
def self.client
  @client ||= Coinmarketcal.client
end