class Protocol::HTTP::Header::Split

This isn’t a specific header class is a utility for handling headers with comma-separated values, such as ‘accept`, `cache-control`, and other similar headers. The values are split and stored as an array internally, and serialized back to a comma-separated string when needed.
Represents headers that can contain multiple distinct values separated by commas.

def << value

@parameter value [String] the value or values to add, separated by commas.

The input string is split into distinct entries and appended to the array.

Adds one or more comma-separated values to the header.
def << value
	self.push(*value.split(COMMA))
end

def initialize(value = nil)

@parameter value [String | Nil] the raw header value containing multiple entries separated by commas, or `nil` for an empty header.

Initializes a `Split` header with the given value. If the value is provided, it is split into distinct entries and stored as an array.
def initialize(value = nil)
	if value
		super(value.split(COMMA))
	else
		super()
	end
end

def to_s

@returns [String] the serialized representation of the header values.

Serializes the stored values into a comma-separated string.
def to_s
	join(",")
end