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 collapse

VERSION =

constants and associated attrs

"0.0.2"
LIBDIR =
File.expand_path(File::join(File.dirname(__FILE__), "bj")) + File::SEPARATOR
Joblist =
JobList

Class Method Summary collapse

Class Method Details

.libdir(*value) ⇒ Object



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

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

.reload!Object

an imperfect reloading hook - because neither rails’ plugins nor gems provide one, sigh…



69
70
71
72
73
74
75
# File 'lib/bj.rb', line 69

def self.reload!
  ::Object.module_eval do
    remove_const :Bj rescue nil
    remove_const :BackgroundJob rescue nil
  end
  load __FILE__ rescue nil
end

.versionObject



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

def self.version() Bj::VERSION end