Class: Sbire::SbireConfig
- Inherits:
-
Object
- Object
- Sbire::SbireConfig
- Defined in:
- lib/sbire/sbire_config.rb
Class Method Summary collapse
- .base_directory ⇒ Object
- .command_path ⇒ Object
- .config_path ⇒ Object
- .lang ⇒ Object
- .notify_command ⇒ Object
- .out_file ⇒ Object
- .out_path ⇒ Object
- .pipe_command ⇒ Object
- .text_file ⇒ Object
Class Method Details
.base_directory ⇒ Object
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_path ⇒ Object
31 32 33 |
# File 'lib/sbire/sbire_config.rb', line 31 def self.command_path config["command_path"] ||= "#{base_directory}/commands.yml" end |
.config_path ⇒ Object
3 4 5 |
# File 'lib/sbire/sbire_config.rb', line 3 def self.config_path "#{base_directory}/config.yml" end |
.lang ⇒ Object
15 16 17 |
# File 'lib/sbire/sbire_config.rb', line 15 def self.lang config["lang"] ||= "en-US" end |
.notify_command ⇒ Object
35 36 37 |
# File 'lib/sbire/sbire_config.rb', line 35 def self.notify_command config["notify_command"] end |
.out_file ⇒ Object
23 24 25 |
# File 'lib/sbire/sbire_config.rb', line 23 def self.out_file config["out_file"] ||= "#{out_path}.audiofile" end |
.out_path ⇒ Object
19 20 21 |
# File 'lib/sbire/sbire_config.rb', line 19 def self.out_path config["out_path"] ||= "#{base_directory}/out/" end |
.pipe_command ⇒ Object
39 40 41 |
# File 'lib/sbire/sbire_config.rb', line 39 def self.pipe_command config["pipe_command"] end |
.text_file ⇒ Object
27 28 29 |
# File 'lib/sbire/sbire_config.rb', line 27 def self.text_file config["text_file"] ||= "#{base_directory}/text" end |