Class: SimpleWorker::LocalWorker
- Inherits:
-
Object
- Object
- SimpleWorker::LocalWorker
- Includes:
- AbstractWorker
- Defined in:
- lib/simpleworker/local_worker.rb
Instance Attribute Summary
Attributes included from AbstractWorker
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ LocalWorker
constructor
A new instance of LocalWorker.
Methods included from AbstractWorker
Constructor Details
#initialize ⇒ LocalWorker
Returns a new instance of LocalWorker.
6 7 8 9 |
# File 'lib/simpleworker/local_worker.rb', line 6 def initialize @script = %W[bash #{File.expand_path(File.dirname(__FILE__))}/bash/simple-localworker] @env = {} end |
Class Method Details
.create(config = {}) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/simpleworker/local_worker.rb', line 11 def self.create(config = {}) worker = new worker.script = config['script'] if config.has_key? 'script' worker.cmd = config['cmd'] if config.has_key? 'cmd' worker end |