class FirstLine
Public Class Methods
new(tokens)
click to toggle source
# File lib/http_header.rb, line 2 def initialize(tokens) @tokens = tokens end
read(line)
click to toggle source
# File lib/http_header.rb, line 19 def FirstLine.read(line) FirstLine.new line.split(%r{\s+}, 3) end
Public Instance Methods
[](key)
click to toggle source
# File lib/http_header.rb, line 6 def [](key) @tokens[key] end
[]=(key, value)
click to toggle source
# File lib/http_header.rb, line 10 def []=(key, value) @tokens[key] = value end
to_s()
click to toggle source
# File lib/http_header.rb, line 14 def to_s @tokens.join(' ') end