class ChefCLI::Policyfile::ChefServerLockFetcher

def errors

Returns:
  • (Array) - A list of errors found
def errors
  error_messages = []
  %i{server policy_name}.each do |key|
    error_messages << "include_policy for #{name} is missing key #{key}" unless source_options[key]
  end
  if %i{policy_revision_id policy_group}.all? { |key| source_options[key].nil? }
    error_messages << "include_policy for #{name} must specify policy_revision_id or policy_group"
  end
  error_messages
end