class Judges::Categories

def ok?(cats)

Other tags:
    Example: Check if a test with categories should run -

Returns:
  • (Boolean) - true if the test should be executed, false otherwise

Parameters:
  • cats (Array, String, nil) -- List of categories associated with the test,
def ok?(cats)
  cats = [] if cats.nil?
  cats = [cats] unless cats.is_a?(Array)
  cats.each do |c|
    return false if @disable.any?(c)
    return true if @enable.any?(c)
  end
  return true if @enable.empty?
  false
end