Module: BBMB::Util::Updater
- Defined in:
- lib/bbmb/util/updater.rb
Class Method Summary collapse
Class Method Details
.import(importer, args, io) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/bbmb/util/updater.rb', line 19 def Updater.import(importer, args, io) klass = Util.const_get(importer) count = klass.new(*args).import(io) BBMB.logger.debug('updater') { sprintf("%s imported %i entities", importer, count) } end |
.run ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/bbmb/util/updater.rb', line 10 def Updater.run require 'pp' PollingManager.new.poll_sources { |filename, io| importer, *args = BBMB.config.importers[filename] if(importer) import(importer, args, io) end } end |