Class: Protocol::HTTP::Header::Split
- Inherits:
-
Array
- Object
- Array
- Protocol::HTTP::Header::Split
- Defined in:
- lib/protocol/http/header/split.rb
Overview
Header value which is split by commas.
Direct Known Subclasses
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
21 22 23 |
# File 'lib/protocol/http/header/split.rb', line 21 def << value self.push(*value.split(COMMA)) end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/protocol/http/header/split.rb', line 25 def to_s join(",") end |