class HTTPX::Buffer

  1. lib/httpx/buffer.rb
Superclass: Object

Methods

Public Class

  1. new

Public Instance

  1. full?
  2. limit
  3. shift!

Attributes

limit [R]

Public Class methods

new (limit)
[show source]
   # File lib/httpx/buffer.rb
25 def initialize(limit)
26   @buffer = "".b
27   @limit = limit
28 end

Public Instance methods

full? ()
[show source]
   # File lib/httpx/buffer.rb
30 def full?
31   @buffer.bytesize >= @limit
32 end
shift! (fin)
[show source]
   # File lib/httpx/buffer.rb
34 def shift!(fin)
35   @buffer = @buffer.byteslice(fin..-1)
36 end