Class: Dctl::Command::RedirectibleCommand

Inherits:
SmartCommand
  • Object
show all
Defined in:
lib/dctl/command.rb

Direct Known Subclasses

RestartCommand, StartCommand

Instance Method Summary collapse

Constructor Details

#initializeRedirectibleCommand

Returns a new instance of RedirectibleCommand.



24
25
26
27
28
29
30
31
32
33
# File 'lib/dctl/command.rb', line 24

def initialize
  super
  @stdin = $IN
  @stdout = $OUT
  @stderr = $ERR
  options.separator "Options:"
  options.on('-i', '--stdin FILE', "Use FILE as stdin when daemonized (default is '#{@stdin}').") { |@stdin| }
  options.on('-o', '--stdout FILE', "Use FILE as stdout when daemonized (default is '#{@stdout}').") { |@stdout| }
  options.on('-e', '--stderr FILE', "Use FILE as stderr when daemonized (default is '#{@stderr}').") { |@stderr| }
end