Method: XS.libpath
- Defined in:
- lib/ffi-rxs.rb
.libpath(*args, &block) ⇒ Object
Returns the library path for the module. If any arguments are given, they will be joined to the end of the library path using File.join.
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ffi-rxs.rb', line 16 def self.libpath( *args, &block ) rv = args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten) if block begin $LOAD_PATH.unshift LIBPATH rv = block.call ensure $LOAD_PATH.shift end end return rv end |