Module: Boson::Manager::MoreManager
- Included in:
- Boson::Manager
- Defined in:
- lib/boson/more_manager.rb
Instance Method Summary collapse
- #during_after_load ⇒ Object
- #lib_dependencies ⇒ Object
- #load_dependencies(lib, options = {}) ⇒ Object
Instance Method Details
#during_after_load ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/boson/more_manager.rb', line 17 def during_after_load (lib_dependencies[@library] || []).each do |e| create_commands(e) self.class.add_library(e) puts "Loaded library dependency #{e.name}" if verbose end end |
#lib_dependencies ⇒ Object
13 14 15 |
# File 'lib/boson/more_manager.rb', line 13 def lib_dependencies @lib_dependencies ||= {} end |
#load_dependencies(lib, options = {}) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/boson/more_manager.rb', line 5 def load_dependencies(lib, ={}) lib_dependencies[lib] = Array(lib.dependencies).map do |e| next if self.class.loaded?(e) load_once(e, .merge(:dependency=>true)) || raise(LoaderError, "Can't load dependency #{e}") end.compact end |