Class: ConfLoader
- Inherits:
-
Object
- Object
- ConfLoader
- Defined in:
- lib/conf_loader.rb,
lib/conf_loader/version.rb
Overview
Helps to load conf files in salemove ecosystem
Constant Summary collapse
- VERSION =
'0.2.1'
Class Method Summary collapse
-
.load(path, env) ⇒ Hash
Load given conf file.
Class Method Details
.load(path, env) ⇒ Hash
Load given conf file
19 20 21 22 23 24 |
# File 'lib/conf_loader.rb', line 19 def self.load(path, env) template = ERB.new File.new(path).read environments = YAML.load template.result(binding) hash = environments[env] Symbolizer.symbolize(hash) end |