Class: SDL2::ManagedStruct

Inherits:
FFI::ManagedStruct
  • Object
show all
Extended by:
StructHelper
Defined in:
lib/sdl2/managed_struct.rb

Overview

FFI::ManagedStruct possibly with useful additions.

Instance Method Summary collapse

Methods included from StructHelper

member_readers, member_writers

Constructor Details

#initialize(*args, &block) ⇒ ManagedStruct

Allows create and use the struct within a block.



7
8
9
10
11
12
13
# File 'lib/sdl2/managed_struct.rb', line 7

def initialize(*args, &block)
  SDL2::Debug.log(self){"Initializing with: #{args.inspect}"}
  super(*args)
  if block_given?
    yield self
  end
end