Method: NERA::SimulatorLayerController#importable_simulators
- Defined in:
- lib/nera/nera_simulator_layer_controller.rb
#importable_simulators ⇒ Object
193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/nera/nera_simulator_layer_controller.rb', line 193 def importable_simulators sim_names = @sim_records.list.map do |rec| rec[:name] end Dir.chdir( @db_folders.path_to_simulator_layer ) { candidates = Dir.glob( "[0-9]*_[A-Z]*.tar.bz2").find_all do |file| file =~ /^([0-9]+)_([A-Z]\w*)\.tar\.bz2/ and !(sim_names.include?($2)) end # found = candidates.find_all do |file| # file =~ /^([0-9]+)_([A-Z]\w*)\.tar\.bz2/ and # !(@sim_records.list.include? do |rec| rec[:name] == $2 end) # end return candidates } end |