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

Constructor Details

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

Returns a new instance of ShellCommandService.



52
53
54
55
56
# File 'lib/shred/commands/services.rb', line 52

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.



50
51
52
# File 'lib/shred/commands/services.rb', line 50

def start_command_lines
  @start_command_lines
end

#stop_command_linesObject (readonly)

Returns the value of attribute stop_command_lines.



50
51
52
# File 'lib/shred/commands/services.rb', line 50

def stop_command_lines
  @stop_command_lines
end

Instance Method Details

#start(ctx) ⇒ Object



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

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

#stop(ctx) ⇒ Object



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

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