class Shred::Commands::Services::Service
Attributes
sym[R]
Public Class Methods
new(sym: nil)
click to toggle source
# File lib/shred/commands/services.rb, line 11 def initialize(sym: nil) @sym = sym end
Public Instance Methods
restart(ctx)
click to toggle source
# File lib/shred/commands/services.rb, line 31 def restart(ctx) stop(ctx) start(ctx) end
start(ctx, command_lines)
click to toggle source
# File lib/shred/commands/services.rb, line 15 def start(ctx, command_lines) ctx.run_shell_command(ShellCommand.new( command_lines: command_lines, success_msg: "#{sym} started", error_msg: "#{sym} could not be started" )) end
stop(ctx, command_lines)
click to toggle source
# File lib/shred/commands/services.rb, line 23 def stop(ctx, command_lines) ctx.run_shell_command(ShellCommand.new( command_lines: command_lines, success_msg: "#{sym} stopped", error_msg: "#{sym} could not be stopped" )) end