class Bundler::Thor::Arguments
def parse_numeric(name)
Otherwise raises an error.
Check if the peek is included in enum if enum is provided.
Check if the peek is numeric format and return a Float or Integer.
def parse_numeric(name) return shift if peek.is_a?(Numeric) unless peek =~ NUMERIC && $& == peek raise MalformattedArgumentError, "Expected numeric value for '#{name}'; got #{peek.inspect}" end value = $&.index(".") ? shift.to_f : shift.to_i validate_enum_value!(name, value, "Expected '%s' to be one of %s; got %s") value end