Module: Excoin

Defined in:
lib/excoin.rb,
lib/excoin/version.rb

Defined Under Namespace

Modules: Version Classes: API, Account, Market

Constant Summary collapse

VERSION =
Version::STRING

Class Method Summary collapse

Class Method Details

.accountObject



26
27
28
29
# File 'lib/excoin.rb', line 26

def self.
  self.api if @api.nil?
  @account ||= Account.new
end

.api(api_key = nil, api_secret = nil, replay_strategy = nil, strategy_parameter = nil) ⇒ Object



41
42
43
# File 'lib/excoin.rb', line 41

def self.api(api_key = nil, api_secret = nil, replay_strategy = nil, strategy_parameter = nil)
   @api ||= API.new(api_key, api_secret, replay_strategy, strategy_parameter)
end

.exchange(exchange_name) ⇒ Object



31
32
33
34
# File 'lib/excoin.rb', line 31

def self.exchange(exchange_name)
  self.api if @api.nil?
  @exchange ||= self.market.exchange(exchange_name)
end

.marketObject



36
37
38
39
# File 'lib/excoin.rb', line 36

def self.market
  self.api if @api.nil?
  @market ||= Market.new
end