class LicenseAcceptance::ArgAcceptance

def accepted?(argv)

def accepted?(argv)
  look_for_value(argv, "accept")
end

def look_for_value(argv, sought)

def look_for_value(argv, sought)
  if argv.include?("--chef-license=#{sought}")
    return true
  end
  i = argv.index("--chef-license")
  unless i.nil?
    val = argv[i+1]
    if val != nil && val.downcase == sought
      return true
    end
  end
  return false
end

def no_persist?(argv)

def no_persist?(argv)
  look_for_value(argv, "accept-no-persist")
end

def silent?(argv)

def silent?(argv)
  look_for_value(argv, "accept-silent")
end