Sha256: f8630d1ea7b349661f6e5dbb317dac204a33abdaec4cb0ed2fdc86d64625d0b7
Contents?: true
Size: 659 Bytes
Versions: 8
Compression:
Stored size: 659 Bytes
Contents
# frozen_string_literal: true # Released under the MIT License. # Copyright, 2019-2024, by Samuel Williams. # Copyright, 2024, by Thomas Morgan. require_relative "split" module Protocol module HTTP module Header class Connection < Split KEEP_ALIVE = "keep-alive" CLOSE = "close" UPGRADE = "upgrade" def initialize(value = nil) super(value&.downcase) end def << value super(value.downcase) end def keep_alive? self.include?(KEEP_ALIVE) && !close? end def close? self.include?(CLOSE) end def upgrade? self.include?(UPGRADE) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems