Module: Fallen::CLI

Defined in:
lib/fallen/cli.rb

Instance Method Summary collapse

Instance Method Details

#cliObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/fallen/cli.rb', line 4

def cli
  {
    "-D"   => self.method(:daemonize!),
    "-C"   => self.method(:chdir!),
    "-P"   => self.method(:pid_file),
    "-out" => self.method(:stdout),
    "-err" => self.method(:stderr),
    "-in"  => self.method(:stdin)
  }
end

#fallen_usageObject



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/fallen/cli.rb', line 15

def fallen_usage
  <<-USAGE
Fallen introduced command line arguments:

-D    Daemonize this process
-C    Change directory.
-P    Path to PID file. Only used in daemonized process.
-out  Path to redirect STDOUT.
-err  Path to redirect STDERR.
-in   Path to redirect STDIN.
  USAGE
end