class Hulaki::Config
Constants
- ConfigPath
- SampleConfigPath
- SampleContactPath
- SampleTemplatePath
Public Class Methods
[](key)
click to toggle source
# File lib/hulaki/config/config.rb, line 14 def [](key) config[key] end
config_file_path=(config_file_path)
click to toggle source
# File lib/hulaki/config/config.rb, line 18 def config_file_path=(config_file_path) @@config_file_path = File.expand_path(config_file_path) end
Private Class Methods
config()
click to toggle source
# File lib/hulaki/config/config.rb, line 24 def config @@config ||= parse end
parse()
click to toggle source
# File lib/hulaki/config/config.rb, line 28 def parse read_file = File.open(@@config_file_path ).read YAML.load(ERB.new(read_file).result) rescue Errno::ENOENT => e raise Hulaki::InvalidFilePath, 'Invalid file.' end