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
140 141 142 143 144 145 146 147 |
# File 'lib/bbmb/util/polling_manager.rb', line 140 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
148 149 150 151 152 |
# File 'lib/bbmb/util/polling_manager.rb', line 148 def poll_sources(&block) load_sources { |source| source.poll(&block) } end |