Class: SiSU_libs::HubClose
- Inherits:
-
Object
- Object
- SiSU_libs::HubClose
- Defined in:
- lib/sisu.rb
Instance Method Summary collapse
-
#initialize(argv, call_path) ⇒ HubClose
constructor
A new instance of HubClose.
Constructor Details
#initialize(argv, call_path) ⇒ HubClose
Returns a new instance of HubClose.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/sisu.rb', line 75 def initialize(argv,call_path) 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 |