class LicenseAcceptance::Strategy::Argument

Look for acceptance values in the ARGV

def accepted?

def accepted?
  look_for_value(ACCEPT)
end

def initialize(argv)

def initialize(argv)
  @argv = argv
end

def look_for_value(sought)

def look_for_value(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?

def no_persist?
  look_for_value(ACCEPT_NO_PERSIST)
end

def silent?

def silent?
  look_for_value(ACCEPT_SILENT)
end