Class: Rays::Worker::BaseWorker
- Inherits:
-
Object
- Object
- Rays::Worker::BaseWorker
show all
- Defined in:
- lib/rays/workers/base.rb
Direct Known Subclasses
Rays::Worker::Builder::Content, Rays::Worker::Builder::EARMaven, Rays::Worker::Builder::EJBMaven, Rays::Worker::Builder::Maven, Cleaner::Maven, Deployer::Content, Deployer::EARDeploy, Deployer::EJBDeploy, Deployer::Maven, Generator::EJBMaven, Generator::Maven
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.register(type, name) ⇒ Object
47
48
49
|
# File 'lib/rays/workers/base.rb', line 47
def self.register(type, name)
Manager.instance.register(type, name, self)
end
|
Instance Method Details
#execute(process, app_module) ⇒ Object
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/rays/workers/base.rb', line 51
def execute(process, app_module)
if app_module.nil? or !Dir.exist?(app_module.path)
raise RaysException.new("Do not know how to #{process} <!#{app_module.inspect}!>")
end
in_directory(app_module.path) do
task("#{process} <!#{app_module.type} #{app_module.name}!>", "done", "failed") do
yield
end
end
end
|