Module Boson

  1. lib/boson/command.rb
  2. lib/boson/index.rb
  3. lib/boson/inspector.rb
  4. lib/boson/inspectors/comment_inspector.rb
  5. lib/boson/inspectors/method_inspector.rb
  6. lib/boson/libraries/file_library.rb
  7. lib/boson/libraries/gem_library.rb
  8. lib/boson/libraries/module_library.rb
  9. lib/boson/library.rb
  10. lib/boson/loader.rb
  11. lib/boson/manager.rb
  12. lib/boson/namespace.rb
  13. lib/boson/option_command.rb
  14. lib/boson/option_parser.rb
  15. lib/boson/options.rb
  16. lib/boson/pipe.rb
  17. lib/boson/pipes.rb
  18. lib/boson/repo.rb
  19. lib/boson/repo_index.rb
  20. lib/boson/runner.rb
  21. lib/boson/runners/console_runner.rb
  22. lib/boson/runners/bin_runner.rb
  23. lib/boson/scientist.rb
  24. lib/boson/util.rb
  25. lib/boson/version.rb
  26. lib/boson/view.rb
  27. lib/boson.rb
  28. show all

This module stores the libraries, commands, repos and main object used throughout Boson.

Useful documentation links:

Constants

VERSION = '0.2.5'
NAMESPACE = '.'

External Aliases

main_object -> higgs

Attributes

commands [RW]
libraries [RW]
main_object [RW] The object which holds and executes all command functionality

Public instance methods

can_invoke? (meth, priv=true)

Boolean indicating if the main object can invoke the given method/command.

[show source]
# File lib/boson.rb, line 91
  def can_invoke?(meth, priv=true)
    Boson.main_object.respond_to? meth, priv
  end
commands ()

Array of loaded Boson::Command objects.

[show source]
# File lib/boson.rb, line 35
  def commands
    @commands ||= Array.new
  end
global_repo ()

Optional global repository at /etc/boson

[show source]
# File lib/boson.rb, line 60
  def global_repo
    File.exists?('/etc/boson') ? Repo.new('/etc/boson') : nil
  end
invoke (*args, &block)

Invoke an action on the main object.

[show source]
# File lib/boson.rb, line 79
  def invoke(*args, &block)
    main_object.send(*args, &block)
  end
libraries ()

Array of loaded Boson::Library objects.

[show source]
# File lib/boson.rb, line 30
  def libraries
    @libraries ||= Array.new
  end
local_repo ()

An optional local repository which defaults to ./lib/boson or ./.boson.

[show source]
# File lib/boson.rb, line 45
  def local_repo
    @local_repo ||= begin
      ignored_dirs = (repo.config[:ignore_directories] || []).map {|e| File.expand_path(e) }
      dir = ["lib/boson", ".boson"].find {|e| File.directory?(e) &&
          File.expand_path(e) != repo.dir && !ignored_dirs.include?(File.expand_path('.')) }
      Repo.new(dir) if dir
    end
  end
repo ()

The main required repository which defaults to ~/.boson.

[show source]
# File lib/boson.rb, line 40
  def repo
    @repo ||= Repo.new("#{Util.find_home}/.boson")
  end
repos ()

The array of loaded repositories containing the main repo and possible local and global repos

[show source]
# File lib/boson.rb, line 55
  def repos
    @repos ||= [repo, local_repo, global_repo].compact
  end
start (options={})

Start Boson by loading repositories and their configured libraries. See ConsoleRunner.start for its options.

[show source]
# File lib/boson.rb, line 74
  def start(options={})
    ConsoleRunner.start(options)
  end