Class Boson::Runner

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

Base class for runners.

Public class methods

all_libraries ()

Libraries specified in config files and detected_libraries

[show source]
# File lib/boson/runner.rb, line 23
      def all_libraries
        Boson.repos.map {|e| e.all_libraries }.flatten.uniq
      end
default_libraries ()

Libraries that come with Boson

[show source]
# File lib/boson/runner.rb, line 13
      def default_libraries
        Boson.repos.map {|e| e.config[:defaults] || [] }.flatten + [Boson::Commands::Core, Boson::Commands::WebCore]
      end
detected_libraries ()

Libraries detected in repositories

[show source]
# File lib/boson/runner.rb, line 18
      def detected_libraries
        Boson.repos.map {|e| e.detected_libraries }.flatten.uniq
      end
in_shell? ()

Returns true if commands are being executed from a non-ruby shell i.e. bash. Returns false if in a ruby shell i.e. irb.

[show source]
# File lib/boson/runner.rb, line 29
      def in_shell?
        !!@in_shell
      end
init ()

Enables view, adds local load path and loads default_libraries

[show source]
# File lib/boson/runner.rb, line 6
      def init
        View.enable
        add_load_path
        Manager.load default_libraries, load_options
      end
verbose? ()

Returns true if in commandline with verbose flag or if set explicitly. Useful in plugins.

[show source]
# File lib/boson/runner.rb, line 34
      def verbose?
        @verbose.nil? ? Boson.const_defined?(:BinRunner) && BinRunner.options[:verbose] : @verbose
      end