Class: YARP::LibRubyParser::YPBuffer

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/yarp/ffi.rb

Overview

This object represents a yp_buffer_t. Its structure must be kept in sync with the C version.

Instance Method Summary collapse

Instance Method Details

#to_ruby_stringObject

Read the contents of the buffer into a String object and return it.



97
98
99
# File 'lib/yarp/ffi.rb', line 97

def to_ruby_string
  self[:value].read_string(self[:length])
end