Method: NERA::SimulatorLayerController#initialize
- Defined in:
- lib/nera/nera_simulator_layer_controller.rb
#initialize(path_db_folds) ⇒ SimulatorLayerController
Returns a new instance of SimulatorLayerController.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/nera/nera_simulator_layer_controller.rb', line 16 def initialize( path_db_folds) raise ArgumentError unless path_db_folds.is_a?(String) @db_folders = NERA::DbFolders.new( path_db_folds) table_path = @db_folders.path_to_simulators_table @sim_records = NERA::SimulatorRecords.new(table_path) @sim_records.set_yaml_file( @db_folders.path_to_simulators_yaml ) NERA::Simulator.inherited_simulators.each do |sim| next if list.find do |rec| rec[:name] == sim.to_s end mapped = NERA::ParameterRecords::ATTRIBUTES_PART.map do |att| att[0] end found = sim::Parameters.find do |p| mapped.include?(p[0]) # p[0] == :in_trashbox? or p[0] == :created_at or p[0] == :updated_at end next if found register_a_simulator( sim) end end |