Class: HTTPX::Buffer

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/httpx/buffer.rb

Instance Method Summary collapse

Constructor Details

#initialize(limit) ⇒ Buffer

Returns a new instance of Buffer.



25
26
27
28
# File 'lib/httpx/buffer.rb', line 25

def initialize(limit)
  @buffer = "".b
  @limit = limit
end

Instance Method Details

#full?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/httpx/buffer.rb', line 30

def full?
  @buffer.bytesize >= @limit
end