Sha256: 7bd9180a8c9c9efc140cdc09ebf5b6535a4c5fc302c0c85b4317357a8a99006a

Contents?: true

Size: 309 Bytes

Versions: 2

Compression:

Stored size: 309 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2023, by Samuel Williams.

require 'time'

module Protocol
	module HTTP
		module Header
			class Date < String
				def << value
					replace(value)
				end
				
				def to_time
					::Time.parse(self)
				end
			end
		end
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
protocol-http-0.26.1 lib/protocol/http/header/date.rb
protocol-http-0.26.0 lib/protocol/http/header/date.rb