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
127 128 129 130 131 132 133 134 |
# File 'lib/bbmb/util/polling_manager.rb', line 127 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
135 136 137 138 139 |
# File 'lib/bbmb/util/polling_manager.rb', line 135 def poll_sources(&block) load_sources { |source| source.poll(&block) } end |