Class: Rundoc::CodeCommand::Background::Wait

Inherits:
Rundoc::CodeCommand show all
Defined in:
lib/rundoc/code_command/background/wait.rb

Constant Summary

Constants inherited from Rundoc::CodeCommand

NEWLINE

Instance Attribute Summary

Attributes inherited from Rundoc::CodeCommand

#command, #contents, #keyword, #original_args, #render_command, #render_result

Instance Method Summary collapse

Methods inherited from Rundoc::CodeCommand

#hidden?, #not_hidden?, #push

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