Class: Rundoc::CodeCommand::Background::Wait
- Inherits:
-
Rundoc::CodeCommand
- Object
- Rundoc::CodeCommand
- Rundoc::CodeCommand::Background::Wait
- Defined in:
- lib/rundoc/code_command/background/wait.rb
Constant Summary
Constants inherited from Rundoc::CodeCommand
Instance Attribute Summary
Attributes inherited from Rundoc::CodeCommand
#command, #contents, #keyword, #original_args, #render_command, #render_result
Instance Method Summary collapse
- #call(env = {}) ⇒ Object
-
#initialize(name:, wait:, timeout: 5) ⇒ Wait
constructor
A new instance of Wait.
- #to_md(env = {}) ⇒ Object
Methods inherited from Rundoc::CodeCommand
Constructor Details
#initialize(name:, wait:, timeout: 5) ⇒ Wait
Returns a new instance of Wait.
3 4 5 6 7 |
# File 'lib/rundoc/code_command/background/wait.rb', line 3 def initialize(name:, wait:, timeout: 5) @spawn = Rundoc::CodeCommand::Background::ProcessSpawn.find(name) @wait = wait @timeout_value = Integer(timeout) end |
Instance Method Details
#call(env = {}) ⇒ Object
13 14 15 16 |
# File 'lib/rundoc/code_command/background/wait.rb', line 13 def call(env = {}) @spawn.wait(@wait, @timeout_value) "" end |
#to_md(env = {}) ⇒ Object
9 10 11 |
# File 'lib/rundoc/code_command/background/wait.rb', line 9 def to_md(env = {}) "" end |