class Coinmarketcal::Category

Attributes

id[R]
name[R]

Public Class Methods

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

Private Class Methods

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