Type:
Class
Description
An FFI closure wrapper, for handling callbacks.
Example
1 2 3 4 5 6 7 8 9 10 | closure = Class . new (Fiddle::Closure) { def call 10 end }. new (Fiddle:: TYPE_INT , []) #=> #<#<Class:0x0000000150d308>:0x0000000150d240> func = Fiddle::Function. new (closure, [], Fiddle:: TYPE_INT ) #=> #<Fiddle::Function:0x00000001516e58> func.call #=> 10 |