Class: CapistranoMulticonfigParallel::ExtensionHelper
- Inherits:
-
Object
- Object
- CapistranoMulticonfigParallel::ExtensionHelper
- Defined in:
- lib/capistrano_multiconfig_parallel/extensions/extension_helper.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#task ⇒ Object
Returns the value of attribute task.
Instance Method Summary collapse
-
#initialize(env, task) ⇒ ExtensionHelper
constructor
A new instance of ExtensionHelper.
- #work(&block) ⇒ Object
Constructor Details
#initialize(env, task) ⇒ ExtensionHelper
Returns a new instance of ExtensionHelper.
9 10 11 12 |
# File 'lib/capistrano_multiconfig_parallel/extensions/extension_helper.rb', line 9 def initialize(env, task) @env = env @task = task end |
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env.
8 9 10 |
# File 'lib/capistrano_multiconfig_parallel/extensions/extension_helper.rb', line 8 def env @env end |
#task ⇒ Object
Returns the value of attribute task.
8 9 10 |
# File 'lib/capistrano_multiconfig_parallel/extensions/extension_helper.rb', line 8 def task @task end |
Instance Method Details
#work(&block) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/capistrano_multiconfig_parallel/extensions/extension_helper.rb', line 14 def work(&block) if job_id.present? actor_start_working actor.wait_execution until actor.task_approved return unless actor.task_approved actor_execute_block(&block) else block.call end end |