-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetting.rb
More file actions
43 lines (31 loc) · 693 Bytes
/
Copy pathsetting.rb
File metadata and controls
43 lines (31 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
require 'yaml'
SETTING_YML_FILE = 'setting.yml'
class Setting
class << self
def verboice_url
config()['VERBOICE_URL']
end
def verboice_first_audio_file
config()['VERBOICE_FIRST_AUDIO_FILE']
end
def google_api_key
config()['GOOGLE_API_KEY']
end
def language_recognition
config()['LANGUAGE_RECOGNITION']
end
def firebase_db_url
config()['FIREBASE_DB_URL']
end
def wit_token
config()['WIT_TOKEN']
end
def output_log_file
config()['OUTPUT_LOG_FILE']
end
private
def config
@@SETTING ||= YAML::load_file(File.join(__dir__, SETTING_YML_FILE)) rescue {}
end
end
end