module DmtdVbmappData
Constants
- AVAILABLE_LANGUAGES
- GENDER_FEMALE
- GENDER_MALE
- VERSION
Public Class Methods
config()
click to toggle source
# File lib/dmtd_vbmapp_data.rb, line 52 def self.config @config end
configure(opts = {})
click to toggle source
# File lib/dmtd_vbmapp_data.rb, line 36 def self.configure(opts = {}) opts.each {|k,v| @config[k.to_sym] = v if @valid_config_keys.include? k.to_sym} end
configure_with(path_to_yaml_file)
click to toggle source
# File lib/dmtd_vbmapp_data.rb, line 40 def self.configure_with(path_to_yaml_file) begin config = Psych::load(IO.read(path_to_yaml_file)) rescue Errno::ENOENT log(:warning, "YAML configuration file couldn't be found. Using defaults."); return rescue Psych::SyntaxError log(:warning, 'YAML configuration file contains invalid syntax. Using defaults.'); return end configure(config) end