Class: Workling::Discovery
- Inherits:
-
Object
- Object
- Workling::Discovery
- Defined in:
- lib/workling/discovery.rb
Class Method Summary collapse
- .add_worker(klass) ⇒ Object
-
.discover! ⇒ Object
requires worklings so that they are added to routing.
Class Method Details
.add_worker(klass) ⇒ Object
9 10 11 |
# File 'lib/workling/discovery.rb', line 9 def self.add_worker(klass) @@discovered_workers << klass end |
.discover! ⇒ Object
requires worklings so that they are added to routing.
14 15 16 17 18 |
# File 'lib/workling/discovery.rb', line 14 def self.discover! Workling.load_path.each do |p| Dir.glob(p).each { |wling| require wling } end end |