Class: FFI::MsgPack::MsgRaw

Inherits:
Struct
  • Object
show all
Defined in:
lib/ffi/msgpack/msg_raw.rb

Instance Method Summary collapse

Instance Method Details

#lengthInteger

The length of the raw data.

Returns:

  • (Integer)

    The length of the raw data.



16
17
18
# File 'lib/ffi/msgpack/msg_raw.rb', line 16

def length
  self[:size]
end

#rawFFI::Pointer

The pointer to the raw data.

Returns:

  • (FFI::Pointer)

    The pointer to the raw data.



26
27
28
# File 'lib/ffi/msgpack/msg_raw.rb', line 26

def raw
  self[:ptr]
end

#to_sString

The raw data.

Returns:



36
37
38
# File 'lib/ffi/msgpack/msg_raw.rb', line 36

def to_s
  self[:ptr].get_bytes(0,self[:size])
end