This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

Fiddle::Function

        # Fiddle::Function < Object

(from ruby core)
---
## Description

A representation of a C function

## Examples

### 'strcpy'

    @libc = Fiddle.dlopen "/lib/libc.so.6"
       #=> #<Fiddle::Handle:0x00000001d7a8d8>
    f = Fiddle::Function.new(
      @libc['strcpy'],
      [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP],
      Fiddle::TYPE_VOIDP)
       #=> #<Fiddle::Function:0x00000001d8ee00>
    buff = "000"
       #=> "000"
    str = f.call(buff, "123")
       #=> #<Fiddle::Pointer:0x00000001d0c380 ptr=0x000000018a21b8 size=0 free=0x00000000000000>
    str.to_s
    => "123"

### ABI check

    @libc = Fiddle.dlopen "/lib/libc.so.6"
       #=> #<Fiddle::Handle:0x00000001d7a8d8>
    f = Fiddle::Function.new(@libc['strcpy'], [TYPE_VOIDP, TYPE_VOIDP], TYPE_VOIDP)
       #=> #<Fiddle::Function:0x00000001d8ee00>
    f.abi == Fiddle::Function::DEFAULT
       #=> true

---
# Constants:

DEFAULT
:   DEFAULT

    Default ABI
STDCALL
:   STDCALL

    FFI implementation of WIN32 stdcall convention


# Class methods:

    new

# Instance methods:

    abi
    call
    name
    need_gvl?
    ptr
    to_i
    to_proc

# Attributes:

    attr_reader abi
    attr_reader name
    attr_reader ptr


      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.