Class: Shred::Commands::Services::ShellCommandService

Inherits:
Service
  • Object
show all
Defined in:
lib/shred/commands/services.rb

Instance Attribute Summary collapse

Attributes inherited from Service

#sym

Instance Method Summary collapse

Methods inherited from Service

#restart

Constructor Details

#initialize(sym: nil, start_command_lines: nil, stop_command_lines: nil) ⇒ ShellCommandService

Returns a new instance of ShellCommandService.



57
58
59
60
61
# File 'lib/shred/commands/services.rb', line 57

def initialize(sym: nil, start_command_lines: nil, stop_command_lines: nil)
  super(sym: sym)
  @start_command_lines = start_command_lines
  @stop_command_lines = stop_command_lines
end

Instance Attribute Details

#start_command_linesObject (readonly)

Returns the value of attribute start_command_lines.



55
56
57
# File 'lib/shred/commands/services.rb', line 55

def start_command_lines
  @start_command_lines
end

#stop_command_linesObject (readonly)

Returns the value of attribute stop_command_lines.



55
56
57
# File 'lib/shred/commands/services.rb', line 55

def stop_command_lines
  @stop_command_lines
end

Instance Method Details

#start(ctx) ⇒ Object



63
64
65
# File 'lib/shred/commands/services.rb', line 63

def start(ctx)
  super(ctx, start_command_lines)
end

#stop(ctx) ⇒ Object



67
68
69
# File 'lib/shred/commands/services.rb', line 67

def stop(ctx)
  super(ctx, stop_command_lines)
end