Method: Fiddle::Importer#dlload

Defined in:
lib/fiddle/import.rb

#dlload(*libs) ⇒ Object

Creates an array of handlers for the given libs, can be an instance of Fiddle::Handle, Fiddle::Importer, or will create a new instance of Fiddle::Handle using Fiddle.dlopen

Raises a DLError if the library cannot be loaded.

See Fiddle.dlopen



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/fiddle/import.rb', line 76

def dlload(*libs)
  handles = libs.collect{|lib|
    case lib
    when nil
      nil
    when Handle
      lib
    when Importer
      lib.handlers
    else
      Fiddle.dlopen(lib)
    end
  }.flatten()
  @handler = CompositeHandler.new(handles)
  @func_map = {}
  @type_alias = {}
end