Module: HttpHeaders::Utils::Single

Defined in:
lib/http_headers/utils/single.rb

Class Method Summary collapse

Class Method Details

.parse(value, entry_klazz:) ⇒ Object Also known as: new



8
9
10
# File 'lib/http_headers/utils/single.rb', line 8

def parse(value, entry_klazz:)
  List.new(value, entry_klazz: entry_klazz).last
end

.to_header(single) ⇒ Object



16
17
18
# File 'lib/http_headers/utils/single.rb', line 16

def to_header(single)
  List.stringify_entry(single)
end