Module: Boson::Manager::API

Included in:
Boson::Manager
Defined in:
lib/boson/manager.rb

Instance Method Summary collapse

Instance Method Details

#after_create_commands(lib, commands) ⇒ Object

Method hook called after create_commands



92
# File 'lib/boson/manager.rb', line 92

def after_create_commands(lib, commands); end

#before_create_commands(lib) ⇒ Object

Method hook called before create_commands



85
86
87
88
89
# File 'lib/boson/manager.rb', line 85

def before_create_commands(lib)
  if lib.is_a?(RunnerLibrary) && lib.module
    Inspector.add_method_data_to_library(lib)
  end
end

#during_after_loadObject

Method hook in middle of after_load



82
# File 'lib/boson/manager.rb', line 82

def during_after_load; end

#handle_load_action_error(library, load_method, err) ⇒ Object

Handles an error from a load action



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/boson/manager.rb', line 95

def handle_load_action_error(library, load_method, err)
  case err
  when LoaderError
    add_failed_library library
    warn "Unable to #{load_method} library #{library}. Reason: #{err.message}"
  else
    add_failed_library library
    message = "Unable to #{load_method} library #{library}. Reason: #{err}"
    if Boson.debug
      message << "\n" + err.backtrace.map {|e| "  " + e }.join("\n")
    elsif verbose
      message << "\n" + err.backtrace.slice(0,3).map {|e| "  " + e }.join("\n")
    end
    warn message
  end
end

#load_dependencies(lib, options) ⇒ Object

Method hook for loading dependencies or anything else before loading a library



79
# File 'lib/boson/manager.rb', line 79

def load_dependencies(lib, options); end