Class: Qs::RestartCmd

Inherits:
Object
  • Object
show all
Defined in:
lib/qs/process.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRestartCmd

Returns a new instance of RestartCmd.



120
121
122
123
124
# File 'lib/qs/process.rb', line 120

def initialize
  require 'rubygems'
  @dir  = get_pwd
  @argv = [Gem.ruby, $0, ARGV.dup].flatten
end

Instance Attribute Details

#argvObject (readonly)

Returns the value of attribute argv.



118
119
120
# File 'lib/qs/process.rb', line 118

def argv
  @argv
end

#dirObject (readonly)

Returns the value of attribute dir.



118
119
120
# File 'lib/qs/process.rb', line 118

def dir
  @dir
end

Instance Method Details

#runObject



128
129
130
131
132
# File 'lib/qs/process.rb', line 128

def run
  ENV['QS_SKIP_DAEMONIZE'] = 'yes'
  Dir.chdir self.dir
  Kernel.exec(*self.argv)
end