Class: Sbire::SbireConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/sbire/sbire_config.rb

Class Method Summary collapse

Class Method Details

.base_directoryObject



7
8
9
10
11
12
13
# File 'lib/sbire/sbire_config.rb', line 7

def self.base_directory
  if ENV["mode"] == "test"
    "./spec/fixtures"
  else
    "#{Dir.home}/.sbire"
  end
end

.command_pathObject



31
32
33
# File 'lib/sbire/sbire_config.rb', line 31

def self.command_path
  config["command_path"] ||= "#{base_directory}/commands.yml"
end

.config_pathObject



3
4
5
# File 'lib/sbire/sbire_config.rb', line 3

def self.config_path
  "#{base_directory}/config.yml"
end

.langObject



15
16
17
# File 'lib/sbire/sbire_config.rb', line 15

def self.lang
  config["lang"] ||= "en-US"
end

.notify_commandObject



35
36
37
# File 'lib/sbire/sbire_config.rb', line 35

def self.notify_command
  config["notify_command"]
end

.out_fileObject



23
24
25
# File 'lib/sbire/sbire_config.rb', line 23

def self.out_file
  config["out_file"] ||= "#{out_path}.audiofile"
end

.out_pathObject



19
20
21
# File 'lib/sbire/sbire_config.rb', line 19

def self.out_path
  config["out_path"] ||= "#{base_directory}/out/"
end

.pipe_commandObject



39
40
41
# File 'lib/sbire/sbire_config.rb', line 39

def self.pipe_command
  config["pipe_command"]
end

.text_fileObject



27
28
29
# File 'lib/sbire/sbire_config.rb', line 27

def self.text_file
  config["text_file"] ||= "#{base_directory}/text"
end