Module: HexTokenBot

Defined in:
lib/hex_token_bot.rb,
lib/hex_token_bot/bots.rb,
lib/hex_token_bot/version.rb,
lib/hex_token_bot/bots/base.rb,
lib/hex_token_bot/bot_server.rb,
lib/hex_token_bot/channel_api.rb,
lib/hex_token_bot/channel_client.rb,
lib/hex_token_bot/channel_api/hex.rb,
lib/hex_token_bot/channel_api/bter.rb,
lib/hex_token_bot/channel_api/okcoin.rb,
lib/hex_token_bot/bots/bot_auto_trans.rb,
lib/hex_token_bot/channel_api/bter/public.rb,
lib/hex_token_bot/channel_api/bter/request.rb,
lib/hex_token_bot/channel_api/bter/trading.rb,
lib/hex_token_bot/channel_client/hex_client.rb,
lib/hex_token_bot/channel_client/bter_client.rb,
lib/hex_token_bot/channel_client/okcoin_client.rb

Defined Under Namespace

Modules: Bots, ChannelApi, ChannelClient Classes: BotServer

Constant Summary collapse

VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.botsObject

Returns the value of attribute bots.



11
12
13
# File 'lib/hex_token_bot.rb', line 11

def bots
  @bots
end

.data_channelsObject

Returns the value of attribute data_channels.



11
12
13
# File 'lib/hex_token_bot.rb', line 11

def data_channels
  @data_channels
end

.tran_channelsObject

Returns the value of attribute tran_channels.



11
12
13
# File 'lib/hex_token_bot.rb', line 11

def tran_channels
  @tran_channels
end

.tran_usersObject

Returns the value of attribute tran_users.



11
12
13
# File 'lib/hex_token_bot.rb', line 11

def tran_users
  @tran_users
end

Class Method Details

.bots_yml=(options = {}) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/hex_token_bot.rb', line 13

def bots_yml=(options = {})
  unless options.empty?
    if options[:file_bots]
      @bots = YAML.load(File.open(options[:file_bots]))
    end
    if options[:file_data_channels]
      @data_channels = YAML.load(File.open(options[:file_data_channels]))
    end
    if options[:file_tran_channels]
      @tran_channels = YAML.load(File.open(options[:file_tran_channels]))
    end
    if options[:file_tran_users]
      @tran_users = YAML.load(File.open(options[:file_tran_users]))
    end
  end
end