Class: Rundoc::CodeCommand::Background::WaitRunner
- Inherits:
-
Object
- Object
- Rundoc::CodeCommand::Background::WaitRunner
- Defined in:
- lib/rundoc/code_command/background/wait.rb
Instance Method Summary collapse
- #background ⇒ Object
- #call(env = {}) ⇒ Object
-
#initialize(user_args:, render_command:, render_result:, io: nil, contents: nil) ⇒ WaitRunner
constructor
A new instance of WaitRunner.
- #to_md(env = {}) ⇒ Object
Constructor Details
#initialize(user_args:, render_command:, render_result:, io: nil, contents: nil) ⇒ WaitRunner
Returns a new instance of WaitRunner.
15 16 17 18 19 20 |
# File 'lib/rundoc/code_command/background/wait.rb', line 15 def initialize(user_args:, render_command:, render_result:, io: nil, contents: nil) @name = user_args.name @wait = user_args.wait @timeout_value = user_args.timeout @background = nil end |
Instance Method Details
#background ⇒ Object
22 23 24 |
# File 'lib/rundoc/code_command/background/wait.rb', line 22 def background @background ||= Rundoc::CodeCommand::Background::ProcessSpawn.find(@name) end |
#call(env = {}) ⇒ Object
30 31 32 33 |
# File 'lib/rundoc/code_command/background/wait.rb', line 30 def call(env = {}) background.wait(@wait, @timeout_value) "" end |
#to_md(env = {}) ⇒ Object
26 27 28 |
# File 'lib/rundoc/code_command/background/wait.rb', line 26 def to_md(env = {}) "" end |