Sha256: 6662d462a7597812b01af7165eaa8a68395aaa000d806825726941f91b6f7b59

Contents?: true

Size: 314 Bytes

Versions: 9

Compression:

Stored size: 314 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2023-2024, 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

9 entries across 9 versions & 1 rubygems

Version Path
protocol-http-0.45.0 lib/protocol/http/header/date.rb
protocol-http-0.44.0 lib/protocol/http/header/date.rb
protocol-http-0.43.0 lib/protocol/http/header/date.rb
protocol-http-0.42.0 lib/protocol/http/header/date.rb
protocol-http-0.41.0 lib/protocol/http/header/date.rb
protocol-http-0.40.0 lib/protocol/http/header/date.rb
protocol-http-0.39.0 lib/protocol/http/header/date.rb
protocol-http-0.38.0 lib/protocol/http/header/date.rb
protocol-http-0.37.0 lib/protocol/http/header/date.rb