Module: Bixby::Script::Bundle
- Included in:
- Bixby, Bixby::ScriptUtil, Object
- Defined in:
- lib/bixby-client/script/bundle.rb
Instance Method Summary collapse
-
#use_bundle(name) ⇒ Object
Load the libraries for the given bundle.
Instance Method Details
#use_bundle(name) ⇒ Object
Load the libraries for the given bundle. Searches all available repositories.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bixby-client/script/bundle.rb', line 8 def use_bundle(name) repos = Dir.glob(File.join(Bixby.repo_path, "*")) repos.each do |repo| next if not File.directory? repo lib = File.join(repo, name, "lib") $: << lib if File.directory? lib then Dir.glob(File.join(lib, "*.rb")).each{ |f| require f } end end end |