Method: Bolt::PAL::YamlPlan::Transpiler#parse_plan

Defined in:
lib/bolt/pal/yaml_plan/transpiler.rb

#parse_planObject



51
52
53
54
55
56
57
58
59
60
# File 'lib/bolt/pal/yaml_plan/transpiler.rb', line 51

def parse_plan
  begin
    file_contents = File.read(@plan_path)
  rescue Errno::ENOENT
    msg = "Could not read yaml plan file: #{@plan_path}"
    raise Bolt::FileError.new(msg, @plan_path)
  end

  Bolt::PAL::YamlPlan::Loader.from_string(@modulename, file_contents, @plan_path)
end