WSS_NamedEntityValidator.rb
def validate_match(entity_type, valid_for)
  # valid if there are no validation terms for the entity type
  return true unless $validation_terms.keys.include?(entity_type)

  # valid if the item is valid for the entity type
  valid_for.include?(entity_type)
end
# Checks if the match is a valid entity for the item.
#
# @param entity_type [String] the type of the entity
# @param valid_for [Array] list of entity types the item has been validated for
# @return [True, False] if the match is valid
Checks if the match is a valid entity for the item.
Checks if the match is a valid entity for the item .
def validate_match(entity_type, valid_for)
  return true unless $validation_terms.keys.include?(entity_type)
  valid_for.include?(entity_type)
end
def validate_match ( entity_type , valid_for ) return true unless $validation_terms . keys . include? ( entity_type ) valid_for . include? ( entity_type ) end
Checks if the match is a valid entity for the item.
Checks if the match is a valid entity for the item .
# valid if there are no validation terms for the entity type # valid if the item is valid for the entity type
if the match is valid
if the match is valid
True, False
entity_type
the type of the entity
the type of the entity
valid_for
list of entity types the item has been validated for
list of entity types the item has been validated for