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
134 135 136 137 138 139 140 141 |
# File 'lib/bbmb/util/polling_manager.rb', line 134 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
142 143 144 145 146 |
# File 'lib/bbmb/util/polling_manager.rb', line 142 def poll_sources(&block) load_sources { |source| source.poll(&block) } end |