Sha256: 37c45e690a2f5c398585e24cc5c14832163b9c6bd7ab84f3022c163c8fee6d1b

Contents?: true

Size: 518 Bytes

Versions: 9

Compression:

Stored size: 518 Bytes

Contents

# frozen_string_literal: true

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

require_relative "readable"

module Protocol
	module HTTP
		module Body
			class Head < Readable
				def self.for(body)
					head = self.new(body.length)
					
					body.close
					
					return head
				end
				
				def initialize(length)
					@length = length
				end
				
				def empty?
					true
				end
				
				def ready?
					true
				end
				
				def length
					@length
				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/body/head.rb
protocol-http-0.44.0 lib/protocol/http/body/head.rb
protocol-http-0.43.0 lib/protocol/http/body/head.rb
protocol-http-0.42.0 lib/protocol/http/body/head.rb
protocol-http-0.41.0 lib/protocol/http/body/head.rb
protocol-http-0.40.0 lib/protocol/http/body/head.rb
protocol-http-0.39.0 lib/protocol/http/body/head.rb
protocol-http-0.38.0 lib/protocol/http/body/head.rb
protocol-http-0.37.0 lib/protocol/http/body/head.rb