Class: SDL2::ManagedStruct

Inherits:
FFI::ManagedStruct
  • Object
show all
Defined in:
lib/sdl2.rb

Overview

FFI::ManagedStruct possibly with useful additions.

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ ManagedStruct

Allows create and use the struct within a block.



82
83
84
85
86
87
# File 'lib/sdl2.rb', line 82

def initialize(*args, &block)
  super(*args)
  if block_given?
    yield self
  end
end