Class: Boson::RequireLibrary
- Inherits:
-
GemLibrary
- Object
- Library
- GemLibrary
- Boson::RequireLibrary
- Defined in:
- lib/boson/libraries/require_library.rb
Overview
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'
Constant Summary collapse
- EXTENSIONS =
['', '.rb', '.rbw', '.so', '.bundle', '.dll', '.sl', '.jar']
Instance Attribute Summary
Attributes inherited from Library
Attributes included from Library::NamespaceLoader
#indexed_namespace, #object_namespace
Attributes included from Library::Namespacer
Attributes included from Library::Libraries
Attributes included from Library::Alias
#class_commands, #no_alias_creation
Attributes included from Library::Save
Instance Method Summary collapse
Methods inherited from GemLibrary
is_a_gem?, #load_source_and_set_module
Methods included from Library::NamespaceLoader
#actual_load_commands, #clean_library_commands, #handle_method_conflict_error, #method_conflicts, #set_library_commands
Methods included from Library::Namespacer
Methods included from Library::LibrariesLoader
#after_include, #before_load_commands, #detect_additions, #module_callbacks
Methods included from Library::Libraries
Methods included from Library::AliasLoader
#before_load_commands, #load_commands?
Methods included from Library::Save
#before_initialize, #config, #marshal_dump, #marshal_load, #set_repo
Instance Method Details
#loaded_correctly? ⇒ Boolean
20 21 22 |
# File 'lib/boson/libraries/require_library.rb', line 20 def loaded_correctly? super || $".grep(/^#{@name}\.([a-z]+)?$/).size > 0 end |