Class: SiSU::HubClose
- Inherits:
-
Object
- Object
- SiSU::HubClose
- Defined in:
- lib/sisu/hub.rb
Instance Method Summary collapse
-
#initialize(call_path, argv) ⇒ HubClose
constructor
A new instance of HubClose.
Constructor Details
#initialize(call_path, argv) ⇒ HubClose
Returns a new instance of HubClose.
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/sisu/hub.rb', line 257 def initialize(call_path,argv) begin env=SiSU_Env::InfoEnv.new rescue ensure if FileTest.directory?(env.processing_path.processing) \ and FileTest.directory?(env.processing_path.processing_base_tmp) \ and env.processing_path.processing_base_tmp =~ /#{env.processing_path.processing}/ \ and env.processing_path.processing_base_tmp =~/^\/tmp\/\S+/ \ and not argv.inspect =~/"--maintenance"|"-M"/ FileUtils::cd(env.processing_path.processing_base_tmp) do FileUtils::rm_rf('.') end end Dir.chdir(call_path) end end |