Class: Html2rss::Config::MultipleFeedsConfig
- Inherits:
-
Object
- Object
- Html2rss::Config::MultipleFeedsConfig
- Defined in:
- lib/html2rss/config/multiple_feeds_config.rb
Overview
Handles multiple feeds within a single configuration hash. Individual feed configurations should be placed under the :feeds key, where each feed name is the key for its feed configuration. All global configuration keys (outside :feeds) are merged into each feed’s settings.
Constant Summary collapse
- CONFIG_KEY_FEEDS =
Reserved YAML key under which multiple named feed configs are defined.
:feeds
Class Method Summary collapse
-
.to_single_feed(config, yaml, multiple_feeds_key: CONFIG_KEY_FEEDS) ⇒ Hash
Merges global configuration into each feed’s configuration.
Class Method Details
.to_single_feed(config, yaml, multiple_feeds_key: CONFIG_KEY_FEEDS) ⇒ Hash
Merges global configuration into each feed’s configuration.
20 21 22 23 24 25 26 |
# File 'lib/html2rss/config/multiple_feeds_config.rb', line 20 def to_single_feed(config, yaml, multiple_feeds_key: CONFIG_KEY_FEEDS) global_keys = yaml.keys - [multiple_feeds_key] global_keys.each do |key| config[key] = merge_key(config, yaml, key) end config end |