Class: Rollenspielsache::FFIString

Inherits:
FFI::AutoPointer
  • Object
show all
Defined in:
lib/librollenspielsache/ffi_string.rb

Overview

Wrapped up string

Defined Under Namespace

Modules: Binding

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.releaseObject



8
9
10
# File 'lib/librollenspielsache/ffi_string.rb', line 8

def self.release
  Binding.free self
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/librollenspielsache/ffi_string.rb', line 12

def to_s
  @to_s ||= read_string.force_encoding('UTF-8')
end