   #
   # Emits done when loading of modules has completed and no error has occurred.
   #   The first argument will be an {Object} containing the results of all
-  #   loaded modules. The `done` event could be subscribed to by the loaded
-  #   module in order to execute a task once all modules are loaded. An example
-  #   would be if a *server* module wanted to listen for connections once all
-  #   modules were loaded.
+  #   loaded modules, see {setResult}. The `done` event could be subscribed to
+  #   by the loaded module in order to execute a task once all modules are
+  #   loaded. An example would be if a *server* module wanted to listen for
+  #   connections once all modules were loaded.
   #
   # Returns `undefined`
   load: (bundle, callback) ->

#   console.log modules.web.module2
# ```
class Bijous extends EventEmitter
  # Public: The default bundle configuration for klect. This configuration
  # describes how all modules are to be found. (default: `modules/*`). For more
  # information see [klect](https://github.com/awnist/klect).
  @defaultBundles: 'modules/*'

  # Public: The default bundle name to pass to klect. When a bundle descriptor
  # is passed from bijous to klect that is not an object (e.g. a string or
  # an array) this is the name used for the bundle. Bundle results that
  # bear it's name are not namespaced when received from the `load` callback.
  # (default: `_`)
  #
  # ```coffee
  # Bijous = require 'bijous'
  #
  # bijous = new Bijous
  #   bundles: 'modules/!(router)'
  #
  # bijous.load (err, modules) ->
  #   # Since our bundle does not have a name the default bundle name is used
  #   # and it's results are not namespaced
  #   console.log modules.module1
  # ```
  @defaultBundleName: '_'

  # Public: Instantiates a new bijous loader.
  #
  # options - The hash options used to configure bijous. (default: {})
  #           :cwd - The directory where modules can be found. Defaults to the
  #                  directory the module's parent resides in.
  #                  (default: `path.dirname(module.parent.filename)`)
  #           :bundles - The klect bundles descriptor, used to find modules.
  #                      (default: `Bijous.defaultBundles`)
  #           :defaultBundleName - The name to use as the default bundle for
  #                                *klect*. When passing in a string or an array
  #                                for `bundles` this is the name used as the
  #                                bundle name. (default:
  #                                `Bijous.defaultBundleName`)
  constructor: ({@cwd, @bundles, @defaultBundleName} = {}) ->
    @cwd ?= path.dirname module.parent.filename
    @bundles ?= Bijous.defaultBundles

# bijous instance when the module has completed loading. The callback function
# has two arguments, the first argument will be an {Error} if one has occurred,
# the second argument will be an optional {Object} containing pertinent results
# from loading the module, see {setResult}.
#
# ```coffee
# # We can assume that the following four lines describes the module being
