Class Boson::Manager

  1. lib/boson/manager.rb
Parent: Object

Handles loading of libraries and commands.


public class

  1. load


failed_libraries [RW]

Public class methods

load (libraries, options={})

Loads a library or an array of libraries with options. Manager loads the first library subclass to meet a library subclass’ criteria in this order: ModuleLibrary, FileLibrary, GemLibrary, RequireLibrary.


Manager.load 'my_commands'  -> Loads a FileLibrary object from ~/.boson/commands/my_commands.rb
Manager.load 'method_lister' -> Loads a GemLibrary object which requires the method_lister gem

Any options that aren’t listed here are passed as library attributes to the libraries (see


Boolean to print each library’s loaded status along with more verbose errors. Default is false.
[show source]
# File lib/boson/manager.rb, line 20
      def load(libraries, options={})
        Array(libraries).map {|e|
          (@library = load_once(e, options)) ? after_load : false