class Thor::Arguments

def validate_enum_value!(name, value, message)


Raises an error if the switch is an enum and the values aren't included on it.
def validate_enum_value!(name, value, message)
  return unless @switches.is_a?(Hash)
  switch = @switches[name]
  return unless switch
  if switch.enum && !switch.enum.include?(value)
    raise MalformattedArgumentError, message % [name, switch.enum_to_s, value]
  end
end