Module: SeedOMatic::Runner
Instance Method Summary collapse
Instance Method Details
#run(opts = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/seedomatic/runner.rb', line 7 def run (opts = {}) results = {} files_to_import(opts).each do |file| file_info = load_file(file) file_info.each do |f| if should_import?(opts, f) results[f[:model_name]] = Seeder.new(f).import end end end results end |