Method: MofaYml#parse_and_load

Defined in:
lib/mofa/mofa_yml.rb

#parse_and_load(path_to_mofayml) ⇒ Object



33
34
35
36
37
38
39
40
41
# File 'lib/mofa/mofa_yml.rb', line 33

def parse_and_load(path_to_mofayml)
  # for now only __ENV_COOKBOOK__ for cookbook name is supported
  file_contents = File.read(path_to_mofayml)
  file_contents.gsub!(/__ENV_COOKBOOK__/, @cookbook.name)
  @yml = YAML.load(file_contents)
  # puts "YAML is now:"
  # puts @yml.inspect
  @yml
end