Class: Fiddle::CompositeHandler (Ruby 2.3.2)
Description: Class : Fiddle::CompositeHandler - Ruby 2.3.2

- Home
- Core 2.3.2
- Std-lib 2.3.2
- Downloads

Support for the Ruby 2.3 series has ended. See here for reference.

### Home Classes Methods

### In Files

- fiddle/lib/fiddle/import.rb

### Parent

Object

### Methods

- ::new
- #[]
- #handlers
- #sym

### Class/Module Index

Quicksearch

- Fiddle
- Fiddle::BasicTypes
- Fiddle::CParser
- Fiddle::CStruct
- Fiddle::CStructBuilder
- Fiddle::CStructEntity
- Fiddle::CUnion
- Fiddle::CUnionEntity
- Fiddle::Closure
- Fiddle::Closure::BlockCaller
- Fiddle::CompositeHandler
- Fiddle::DLError
- Fiddle::Function
- Fiddle::Handle
- Fiddle::Importer
- Fiddle::Pointer
- Fiddle::Win32Types

No matching classes.

# Fiddle::CompositeHandler

Used internally by Fiddle::Importer

### Public Class Methods

new(handlers) click to toggle source

Create a new handler with the open `handlers`

Used internally by Fiddle::Importer#dlload

                   # File fiddle/lib/fiddle/import.rb, line 12
    def initialize(handlers)
      @handlers = handlers
    end

### Public Instance Methods

[](symbol) click to toggle source

See #sym

                   # File fiddle/lib/fiddle/import.rb, line 39
    def [](symbol)
      sym(symbol)
    end

handlers() click to toggle source

Array of the currently loaded libraries.

                   # File fiddle/lib/fiddle/import.rb, line 17
    def handlers()
      @handlers
    end

sym(symbol) click to toggle source

Returns the address as an Integer from any handlers with the function named `symbol`.

Raises a DLError if the handle is closed.

                   # File fiddle/lib/fiddle/import.rb, line 25
    def sym(symbol)
      @handlers.each{|handle|
        if( handle )
          begin
            addr = handle.sym(symbol)
            return addr
          rescue DLError
          end
        end
      }
      return nil
    end