Class: Indocker::Envs::Loader
- Inherits:
-
Object
- Object
- Indocker::Envs::Loader
- Includes:
- SmartIoC::Iocify
- Defined in:
- lib/indocker/envs/loader.rb
Instance Method Summary collapse
Instance Method Details
#parse(path) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/indocker/envs/loader.rb', line 6 def parse(path) raise Indocker::Errors::EnvFileDoesNotExist if !File.exists?(path) = Indocker::Envs::EnvMetadata.new File.foreach(path) do |line| key, value = line.split('=').map(&:strip) .set(key: key, value: value) end end |