Sha256: ccc72832aa01f3ba59acf637fb76b3d9316f99580af85cbd7f5e67192a58edea
Contents?: true
Size: 745 Bytes
Versions: 14
Compression:
Stored size: 745 Bytes
Contents
# This library requires the given name. This is useful for loading standard libraries, # non-gem libraries (i.e. rip packages) and anything else in $LOAD_PATH. # # Example: # >> load_library 'fileutils', :class_commands=>{'cd'=>'FileUtils.cd', 'cp'=>'FileUtils.cp'} # => true # >> cd '/home' # => 0 # >> Dir.pwd # >> '/home' class Boson::RequireLibrary < Boson::GemLibrary EXTENSIONS = ['', '.rb', '.rbw', '.so', '.bundle', '.dll', '.sl', '.jar'] handles {|source| extensions_glob = "{#{EXTENSIONS.join(',')}}" ($LOAD_PATH - ['.']).any? {|dir| Dir["#{File.expand_path source.to_s, dir}#{extensions_glob}"].size > 0 } } def loaded_correctly? super || $".grep(/^#{@name}\.([a-z]+)?$/).size > 0 end end
Version data entries
14 entries across 14 versions & 3 rubygems