Class: Shred::Commands::Services::ShellCommandService
- Defined in:
- lib/shred/commands/services.rb
Instance Attribute Summary collapse
-
#start_command_lines ⇒ Object
readonly
Returns the value of attribute start_command_lines.
-
#stop_command_lines ⇒ Object
readonly
Returns the value of attribute stop_command_lines.
Attributes inherited from Service
Instance Method Summary collapse
-
#initialize(sym: nil, start_command_lines: nil, stop_command_lines: nil) ⇒ ShellCommandService
constructor
A new instance of ShellCommandService.
- #start(ctx) ⇒ Object
- #stop(ctx) ⇒ Object
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_lines ⇒ Object (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_lines ⇒ Object (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 |