summaryrefslogtreecommitdiff
path: root/ext/dl/lib/dl/import.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/lib/dl/import.rb')
-rw-r--r--ext/dl/lib/dl/import.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/dl/lib/dl/import.rb b/ext/dl/lib/dl/import.rb
index f22a53a..eec65cd 100644
--- a/ext/dl/lib/dl/import.rb
+++ b/ext/dl/lib/dl/import.rb
@@ -31,6 +31,22 @@ module DL
end
end
+ # DL::Importer includes the means to dynamically load libraries and build
+ # modules around them including calling extern functions within the C
+ # library that has been loaded.
+ #
+ # == Example
+ #
+ # require 'dl'
+ # require 'dl/import'
+ #
+ # module LibSum
+ # extend DL::Importer
+ # dlload './libsum.so'
+ # extern 'double sum(double*, int)'
+ # extern 'double split(double)'
+ # end
+ #
module Importer
include DL
include CParser