Class: SDL2::ManagedStruct
- Inherits:
-
FFI::ManagedStruct
- Object
- FFI::ManagedStruct
- SDL2::ManagedStruct
- Extended by:
- StructHelper
- Defined in:
- lib/sdl2/managed_struct.rb
Overview
FFI::ManagedStruct possibly with useful additions.
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ ManagedStruct
constructor
Allows create and use the struct within a block.
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 |