Class: TTT::ConfigHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/ttt/config_helper.rb

Class Method Summary collapse

Class Method Details

.board_typesObject



9
10
11
# File 'lib/ttt/config_helper.rb', line 9

def self.board_types
  ConfigOptions::HUMAN_READABLE_BOARDS
end

.bucketObject



13
14
15
# File 'lib/ttt/config_helper.rb', line 13

def self.bucket
  ConfigOptions::BUCKET
end

.get_board_const(board_type) ⇒ Object



29
30
31
# File 'lib/ttt/config_helper.rb', line 29

def self.get_board_const(board_type)
  ConfigOptions::BOARDS[get_board_index(board_type)]
end

.get_board_index(board_type) ⇒ Object



37
38
39
# File 'lib/ttt/config_helper.rb', line 37

def self.get_board_index(board_type)
  ConfigOptions::HUMAN_READABLE_BOARDS.index(board_type)
end

.get_db_constObject



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

def self.get_db_const
  ConfigOptions::DB
end

.get_game_interactor_constObject



49
50
51
# File 'lib/ttt/config_helper.rb', line 49

def self.get_game_interactor_const
  ConfigOptions::INTERACTOR
end

.get_history_constObject



45
46
47
# File 'lib/ttt/config_helper.rb', line 45

def self.get_history_const
  ConfigOptions::HISTORY
end

.get_player_const(player_type) ⇒ Object



25
26
27
# File 'lib/ttt/config_helper.rb', line 25

def self.get_player_const(player_type)
  ConfigOptions::PLAYERS[get_player_index(player_type)]
end

.get_player_index(player_type) ⇒ Object



33
34
35
# File 'lib/ttt/config_helper.rb', line 33

def self.get_player_index(player_type)
  ConfigOptions::HUMAN_READABLE_PLAYERS.index(player_type)
end

.http_backendObject



21
22
23
# File 'lib/ttt/config_helper.rb', line 21

def self.http_backend
  ConfigOptions::HTTP_BACKEND
end

.player_typesObject



5
6
7
# File 'lib/ttt/config_helper.rb', line 5

def self.player_types
  ConfigOptions::HUMAN_READABLE_PLAYERS
end

.portObject



17
18
19
# File 'lib/ttt/config_helper.rb', line 17

def self.port
  ConfigOptions::PORT
end