Class: HTTPX::Buffer
- Inherits:
-
Object
- Object
- HTTPX::Buffer
- Extended by:
- Forwardable
- Defined in:
- lib/httpx/buffer.rb
Instance Attribute Summary collapse
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
Instance Method Summary collapse
- #full? ⇒ Boolean
-
#initialize(limit) ⇒ Buffer
constructor
A new instance of Buffer.
Constructor Details
#initialize(limit) ⇒ Buffer
Returns a new instance of Buffer.
27 28 29 30 |
# File 'lib/httpx/buffer.rb', line 27 def initialize(limit) @buffer = "".b @limit = limit end |
Instance Attribute Details
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
25 26 27 |
# File 'lib/httpx/buffer.rb', line 25 def limit @limit end |
Instance Method Details
#full? ⇒ Boolean
32 33 34 |
# File 'lib/httpx/buffer.rb', line 32 def full? @buffer.bytesize >= @limit end |