Module Net::SSH::Util::BufferBase
In: lib/net/ssh/util/buffer.rb

The abstract ancestor module of both ReaderBufferImpl and WriterBufferImpl. It defines the common interface for both submodules.

Methods

==   clear!   length   to_s  

Attributes

content  [R]  exposes the content of the buffer

Public Instance methods

Compares the contents of the two buffers.

[Source]

    # File lib/net/ssh/util/buffer.rb, line 40
40:         def ==( buffer )
41:           to_s == buffer.to_s
42:         end

Resets the buffer, making it empty.

[Source]

    # File lib/net/ssh/util/buffer.rb, line 45
45:         def clear!
46:           @content = ""
47:         end

the length of the buffer’s content.

[Source]

    # File lib/net/ssh/util/buffer.rb, line 30
30:         def length
31:           @content.length
32:         end

returns a copy of the buffer’s content.

[Source]

    # File lib/net/ssh/util/buffer.rb, line 35
35:         def to_s
36:           ( @content || "" ).dup
37:         end

[Validate]