Class: ConfigReader
- Inherits:
-
Object
- Object
- ConfigReader
- Defined in:
- lib/config-reader.rb,
lib/config-reader/version.rb
Constant Summary collapse
- VERSION =
'0.0.2'
Class Method Summary collapse
-
.load(path, env) ⇒ OpenStruct
Process IO as ERB and then YAML and return results as OpenStruct.
Class Method Details
.load(path, env) ⇒ OpenStruct
Process IO as ERB and then YAML and return results as OpenStruct
12 13 14 |
# File 'lib/config-reader.rb', line 12 def self.load(path, env) OpenStruct.new(YAML.load(ERB.new(IO.read(path)).result)[env.to_s]) end |