This module stores the libraries, commands, repos and main object used throughout Boson.
Useful documentation links:
- Boson::BinRunner - Runs the boson executable
- Boson::ConsoleRunner - Runs Boson from the ruby console
- Boson::Repo.config - Explains main config file
- Boson::Library - All about libraries
- Boson::FileLibrary - Explains creating libraries as files
- Boson::Loader - Explains library module callbacks
- Boson::OptionParser - All about options
Methods
public instance
Classes and Modules
Module Boson::ArgumentInspectorModule Boson::Commands
Module Boson::CommentInspector
Module Boson::Index
Module Boson::Inspector
Module Boson::Loader
Module Boson::MethodInspector
Module Boson::Options
Module Boson::Pipe
Module Boson::Pipes
Module Boson::Scientist
Module Boson::Universe
Module Boson::Util
Module Boson::View
Class Boson::AppendFeaturesFalseError
Class Boson::BinRunner
Class Boson::Command
Class Boson::ConsoleRunner
Class Boson::FileLibrary
Class Boson::GemLibrary
Class Boson::IndifferentAccessHash
Class Boson::Library
Class Boson::LoaderError
Class Boson::LocalFileLibrary
Class Boson::Manager
Class Boson::MethodConflictError
Class Boson::ModuleLibrary
Class Boson::Namespace
Class Boson::OptionCommand
Class Boson::OptionParser
Class Boson::Repo
Class Boson::RepoIndex
Class Boson::RequireLibrary
Class Boson::Runner
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
Boolean indicating if the main object can invoke the given method/command.
# File lib/boson.rb, line 91 def can_invoke?(meth, priv=true) Boson.main_object.respond_to? meth, priv end
Array of loaded Boson::Command objects.
# File lib/boson.rb, line 35 def commands @commands ||= Array.new end
Optional global repository at /etc/boson
# File lib/boson.rb, line 60 def global_repo File.exists?('/etc/boson') ? Repo.new('/etc/boson') : nil end
Invoke an action on the main object.
# File lib/boson.rb, line 79 def invoke(*args, &block) main_object.send(*args, &block) end
Array of loaded Boson::Library objects.
# File lib/boson.rb, line 30 def libraries @libraries ||= Array.new end
An optional local repository which defaults to ./lib/boson or ./.boson.
# 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
The main required repository which defaults to ~/.boson.
# File lib/boson.rb, line 40 def repo @repo ||= Repo.new("#{Util.find_home}/.boson") end
The array of loaded repositories containing the main repo and possible local and global repos
# File lib/boson.rb, line 55 def repos @repos ||= [repo, local_repo, global_repo].compact end
Start Boson by loading repositories and their configured libraries. See ConsoleRunner.start for its options.
# File lib/boson.rb, line 74 def start(options={}) ConsoleRunner.start(options) end