class Thor::Arguments

def parse_string(name)


Check if the peek is included in enum if enum is provided. Otherwise raises an error.
for --no-string-arg, nil
for --string-arg, just return the current value in the pile
Parse string:
def parse_string(name)
  if no_or_skip?(name)
    nil
  else
    value = shift
    if @switches.is_a?(Hash) && switch = @switches[name] # rubocop:disable AssignmentInCondition
      if switch.enum && !switch.enum.include?(value)
        fail MalformattedArgumentError, "Expected '#{name}' to be one of #{switch.enum.join(', ')}; got #{value}"
      end
    end
    value
  end
end