Class: BBMB::Util::PollingManager
- Inherits:
-
Object
- Object
- BBMB::Util::PollingManager
- Defined in:
- lib/bbmb/util/polling_manager.rb
Instance Method Summary collapse
Instance Method Details
#load_sources(&block) ⇒ Object
129 130 131 132 133 134 135 136 |
# File 'lib/bbmb/util/polling_manager.rb', line 129 def load_sources(&block) file = File.open(BBMB.config.polling_file) YAML.load_documents(file) { |mission| block.call(mission) } ensure file.close if(file) end |
#poll_sources(&block) ⇒ Object
137 138 139 140 141 |
# File 'lib/bbmb/util/polling_manager.rb', line 137 def poll_sources(&block) load_sources { |source| source.poll(&block) } end |