Class: Rundoc::CodeCommand::Background::Stop
- Inherits:
-
Rundoc::CodeCommand
- Object
- Rundoc::CodeCommand
- Rundoc::CodeCommand::Background::Stop
- Defined in:
- lib/rundoc/code_command/background/stop.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:) ⇒ Stop
constructor
A new instance of Stop.
- #to_md(env = {}) ⇒ Object
Methods inherited from Rundoc::CodeCommand
Constructor Details
#initialize(name:) ⇒ Stop
Returns a new instance of Stop.
3 4 5 6 |
# File 'lib/rundoc/code_command/background/stop.rb', line 3 def initialize(name:) @name = name @background = nil end |
Instance Method Details
#background ⇒ Object
8 9 10 |
# File 'lib/rundoc/code_command/background/stop.rb', line 8 def background @background ||= Rundoc::CodeCommand::Background::ProcessSpawn.find(@name) end |
#call(env = {}) ⇒ Object
16 17 18 19 |
# File 'lib/rundoc/code_command/background/stop.rb', line 16 def call(env = {}) background.stop background.log.read end |
#to_md(env = {}) ⇒ Object
12 13 14 |
# File 'lib/rundoc/code_command/background/stop.rb', line 12 def to_md(env = {}) "" end |