Class: Bj
- 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
"1.0.2"
- LIBDIR =
File.(File::join(File.dirname(__FILE__), "bj")) + File::SEPARATOR
- Joblist =
JobList
Class Method Summary collapse
- .libdir(*value) ⇒ Object
-
.reload! ⇒ Object
an imperfect reloading hook - because neither rails’ plugins nor gems provide one, sigh…
-
.version ⇒ Object
unless defined?(Bj::VERSION).
Class Method Details
.libdir(*value) ⇒ Object
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 |
.reload! ⇒ Object
an imperfect reloading hook - because neither rails’ plugins nor gems provide one, sigh…
73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/bj.rb', line 73 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 |