class Flashboy::Client

Public Class Methods

docs(docs = nil) click to toggle source
# File lib/flashboy/client.rb, line 20
def self.docs(docs = nil)
  return @docs if docs.nil?
  @docs = docs
end
host(host = nil) click to toggle source
# File lib/flashboy/client.rb, line 29
def self.host(host = nil)
  return @host if host.nil?
  @host = host
end
key() click to toggle source
# File lib/flashboy/client.rb, line 12
def self.key
  @name.to_s.downcase.gsub(' ', '_').to_sym
end
name(name = nil) click to toggle source
# File lib/flashboy/client.rb, line 3
def self.name(name = nil)
  return @name if name.nil?
  @name = name
end
order_book_path(pair = nil, &path) click to toggle source
# File lib/flashboy/client.rb, line 60
def self.order_book_path(pair = nil, &path)
  return @order_book_path.call(pair) unless block_given?
  @order_book_path = path
end
quote_path(pair = nil, &path) click to toggle source
# File lib/flashboy/client.rb, line 38
def self.quote_path(pair = nil, &path)
  return @quote_path.call(pair) unless block_given?
  @quote_path = path
end
trades_path(pair = nil, params = {}, &path) click to toggle source
# File lib/flashboy/client.rb, line 47
def self.trades_path(pair = nil, params = {}, &path)
  if !block_given?
    raise RuntimeError, "You must define the trades_path on your exchange" if @trades_path.nil?
    return @trades_path.call(pair, params)
  end

  @trades_path = path
end

Public Instance Methods

docs() click to toggle source
# File lib/flashboy/client.rb, line 25
def docs
  self.class.docs
end
host() click to toggle source
# File lib/flashboy/client.rb, line 34
def host
  self.class.host
end
key() click to toggle source
# File lib/flashboy/client.rb, line 16
def key
  self.class.key
end
name() click to toggle source
# File lib/flashboy/client.rb, line 8
def name
  self.class.name
end
order_book_path(pair) click to toggle source
# File lib/flashboy/client.rb, line 65
def order_book_path(pair)
  self.class.order_book_path(pair)
end
quote_path(pair) click to toggle source
# File lib/flashboy/client.rb, line 43
def quote_path(pair)
  self.class.quote_path(pair)
end
trades_path(pair, params = {}) click to toggle source
# File lib/flashboy/client.rb, line 56
def trades_path(pair, params = {})
  self.class.trades_path(pair, params)
end