Class: ConfigReader

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/config-reader.rb,
lib/config-reader/version.rb

Constant Summary collapse

VERSION =
'0.0.1'

Class Method Summary collapse

Class Method Details

.load(path, env) ⇒ Object



7
8
9
10
11
# File 'lib/config-reader.rb', line 7

def self.load(path, env)
  contents = IO.read(path)
  processed = ERB.new(contents).result
  new(YAML.load(processed)[env.to_s])
end