Class: Protocol::HTTP::Headers::Split

Inherits:
Array
  • Object
show all
Defined in:
lib/protocol/http/headers.rb

Overview

Split by commas.

Constant Summary collapse

COMMA =
/\s*,\s*/

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Split

Returns a new instance of Split.



29
30
31
# File 'lib/protocol/http/headers.rb', line 29

def initialize(value)
	super(value.split(COMMA))
end

Instance Method Details

#<<(value) ⇒ Object



33
34
35
# File 'lib/protocol/http/headers.rb', line 33

def << value
	super value.split(COMMA)
end

#to_sObject



37
38
39
# File 'lib/protocol/http/headers.rb', line 37

def to_s
	join(", ")
end