Method: NIO::ByteBuffer#inspect

Defined in:
lib/nio/bytebuffer.rb,
ext/nio4r/bytebuffer.c

#inspectString

Inspect the state of the buffer

Returns:

  • (String)

    string describing the state of the buffer



214
215
216
217
218
219
220
221
222
223
# File 'lib/nio/bytebuffer.rb', line 214

def inspect
  format(
    "#<%s:0x%x @position=%d @limit=%d @capacity=%d>",
    self.class,
    object_id << 1,
    @position,
    @limit,
    @capacity
  )
end