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
NEWLINE, RUNDOC_DEFAULT_ERB_BINDING, RUNDOC_ERB_BINDINGS
Instance Attribute Summary
Attributes inherited from Rundoc::CodeCommand
#command, #contents, #keyword, #original_args, #render_command, #render_result
Instance Method Summary collapse
- #background ⇒ Object
- #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 8 |
# File 'lib/rundoc/code_command/background/wait.rb', line 3 def initialize(name:, wait:, timeout: 5) @name = name @wait = wait @timeout_value = Integer(timeout) @background = nil end |
Instance Method Details
#background ⇒ Object
10 11 12 |
# File 'lib/rundoc/code_command/background/wait.rb', line 10 def background @background ||= Rundoc::CodeCommand::Background::ProcessSpawn.find(name) end |
#call(env = {}) ⇒ Object
18 19 20 21 |
# File 'lib/rundoc/code_command/background/wait.rb', line 18 def call(env = {}) background.wait(@wait, @timeout_value) "" end |
#to_md(env = {}) ⇒ Object
14 15 16 |
# File 'lib/rundoc/code_command/background/wait.rb', line 14 def to_md(env = {}) "" end |