Sha256: 198e462b65a13d0c2f8786e79964570cc5011e615afc12b654b0020951c774b2

Contents?: true

Size: 314 Bytes

Versions: 4

Compression:

Stored size: 314 Bytes

Contents

# frozen_string_literal: true

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

4 entries across 4 versions & 1 rubygems

Version Path
protocol-http-0.25.0 lib/protocol/http/header/date.rb
protocol-http-0.24.7 lib/protocol/http/header/date.rb
protocol-http-0.24.6 lib/protocol/http/header/date.rb
protocol-http-0.24.5 lib/protocol/http/header/date.rb