Class: Protocol::HTTP::Headers::Split
- Inherits:
-
Array
- Object
- Array
- Protocol::HTTP::Headers::Split
- Defined in:
- lib/protocol/http/headers.rb
Overview
Header value which is split by commas.
Constant Summary collapse
- COMMA =
/\s*,\s*/
Instance Method Summary collapse
- #<<(value) ⇒ Object
-
#initialize(value) ⇒ Split
constructor
A new instance of Split.
- #to_s ⇒ Object
Constructor Details
Instance Method Details
#<<(value) ⇒ Object
35 36 37 |
# File 'lib/protocol/http/headers.rb', line 35 def << value self.push(*value.split(COMMA)) end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/protocol/http/headers.rb', line 39 def to_s join(", ") end |