Class: TTT::ConfigHelper
- Inherits:
-
Object
- Object
- TTT::ConfigHelper
- Defined in:
- lib/ttt/config_helper.rb
Class Method Summary collapse
- .board_types ⇒ Object
- .bucket ⇒ Object
- .get_board_const(board_type) ⇒ Object
- .get_board_index(board_type) ⇒ Object
- .get_db_const ⇒ Object
- .get_game_interactor_const ⇒ Object
- .get_history_const ⇒ Object
- .get_player_const(player_type) ⇒ Object
- .get_player_index(player_type) ⇒ Object
- .http_backend ⇒ Object
- .player_types ⇒ Object
- .port ⇒ Object
Class Method Details
.board_types ⇒ Object
9 10 11 |
# File 'lib/ttt/config_helper.rb', line 9 def self.board_types ConfigOptions::HUMAN_READABLE_BOARDS end |
.bucket ⇒ Object
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_const ⇒ Object
41 42 43 |
# File 'lib/ttt/config_helper.rb', line 41 def self.get_db_const ConfigOptions::DB end |
.get_game_interactor_const ⇒ Object
49 50 51 |
# File 'lib/ttt/config_helper.rb', line 49 def self.get_game_interactor_const ConfigOptions::INTERACTOR end |
.get_history_const ⇒ Object
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_backend ⇒ Object
21 22 23 |
# File 'lib/ttt/config_helper.rb', line 21 def self.http_backend ConfigOptions::HTTP_BACKEND end |
.player_types ⇒ Object
5 6 7 |
# File 'lib/ttt/config_helper.rb', line 5 def self.player_types ConfigOptions::HUMAN_READABLE_PLAYERS end |
.port ⇒ Object
17 18 19 |
# File 'lib/ttt/config_helper.rb', line 17 def self.port ConfigOptions::PORT end |