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.



141
142
143
144
145
146
# File 'lib/sdl2.rb', line 141

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