Class: Fiddle::CompositeHandler
Relationships & Source Files | |
Inherits: | Object |
Defined in: | ext/fiddle/lib/fiddle/import.rb |
Overview
Used internally by Importer
Class Method Summary
-
.new(handlers) ⇒ CompositeHandler
constructor
Create a new handler with the open #handlers
Instance Method Summary
-
#[](symbol)
See #sym
-
#handlers
Array of the currently loaded libraries.
-
#sym(symbol)
Returns the address as an Integer from any handlers with the function named
symbol
.
Constructor Details
.new(handlers) ⇒ CompositeHandler
Create a new handler with the open #handlers
Used internally by Fiddle::Importer.dlload
Instance Method Details
#[](symbol)
See #sym
# File 'ext/fiddle/lib/fiddle/import.rb', line 39
def [](symbol) sym(symbol) end
#handlers
Array of the currently loaded libraries.
# File 'ext/fiddle/lib/fiddle/import.rb', line 17
def handlers() @handlers end
#sym(symbol)
Returns the address as an Integer from any handlers with the function named symbol
.
Raises a DLError if the handle is closed.
# File 'ext/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