Class: Roma::CheckTc

Inherits:
Object
  • Object
show all
Defined in:
lib/roma/tools/check_tc_flag.rb

Instance Method Summary collapse

Constructor Details

#initialize(storage_path, library_path) ⇒ CheckTc

Returns a new instance of CheckTc.



7
8
9
10
# File 'lib/roma/tools/check_tc_flag.rb', line 7

def initialize(storage_path, library_path)
  @storage_path = storage_path
  @library_path = library_path
end

Instance Method Details

#check_flagObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/roma/tools/check_tc_flag.rb', line 12

def check_flag
  status = {}
  timeout(5){
    Dir.glob("#{@storage_path}/*.tc").each{|f|
      res = `#{@library_path}/bin/tchmgr inform #{f}`
      res =~ /additional flags:(.*)\n/
      status.store(f, $1)
    }
  }
  status
end