Class: Bj

Inherits:
Object show all
Defined in:
lib/bj.rb,
lib/bj/bj.rb,
lib/bj/api.rb,
lib/bj/util.rb,
lib/bj/table.rb,
lib/bj/errors.rb,
lib/bj/logger.rb,
lib/bj/runner.rb,
lib/bj/joblist.rb

Defined Under Namespace

Modules: API, ClassMethods, EXIT, Util Classes: Error, JobList, Logger, RailsRoot, Runner, Table

Constant Summary

Joblist =
JobList

Class Method Summary (collapse)

Class Method Details

+ (Object) libdir(*value)



11
12
13
14
15
16
17
# File 'lib/bj.rb', line 11

def self.libdir(*value) 
  unless value.empty?
    File.join libdir, *value
  else
    Bj::LIBDIR 
  end
end

+ (Object) reload!

an imperfect reloading hook - because neither rails' plugins nor gems provide one, sigh...



71
72
73
74
75
76
77
78
79
80
81
# File 'lib/bj.rb', line 71

def self.reload!
  background = nil
  ::Object.module_eval do
    background = Bj.runner.background
    remove_const :Bj rescue nil
    remove_const :BackgroundJob rescue nil
  end
  returned = load __FILE__ rescue nil
  Bj.runner.background = background if background
  returned
end

+ (Object) version



7
# File 'lib/bj.rb', line 7

def self.version() Bj::VERSION end