Class: Qs::RestartCmd
- Inherits:
-
Object
- Object
- Qs::RestartCmd
- Defined in:
- lib/qs/process.rb
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
Instance Method Summary collapse
-
#initialize ⇒ RestartCmd
constructor
A new instance of RestartCmd.
- #run ⇒ Object
Constructor Details
#initialize ⇒ RestartCmd
Returns a new instance of RestartCmd.
123 124 125 126 127 |
# File 'lib/qs/process.rb', line 123 def initialize require 'rubygems' @dir = get_pwd @argv = [Gem.ruby, $0, ARGV.dup].flatten end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
121 122 123 |
# File 'lib/qs/process.rb', line 121 def argv @argv end |
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
121 122 123 |
# File 'lib/qs/process.rb', line 121 def dir @dir end |
Instance Method Details
#run ⇒ Object
129 130 131 132 |
# File 'lib/qs/process.rb', line 129 def run Dir.chdir self.dir Kernel.exec(*self.argv) end |