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