Class: CC::Analyzer::EnginesConfigBuilder::RegistryAdapter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- CC::Analyzer::EnginesConfigBuilder::RegistryAdapter
- Defined in:
- lib/cc/analyzer/engines_config_builder.rb
Instance Method Summary collapse
-
#fetch(name, channel) ⇒ Object
Calling this is guarded by Registry#key?(name) so we can assume metadata itself will be present.
Instance Method Details
#fetch(name, channel) ⇒ Object
Calling this is guarded by Registry#key?(name) so we can assume metadata itself will be present. We own the YAML loaded into the registry, so we can also assume the “channels” key will be present. We can’t assume it will have a key for the given channel, but the nil value for the returned image key will trigger the desired error handling.
13 14 15 16 17 18 19 |
# File 'lib/cc/analyzer/engines_config_builder.rb', line 13 def fetch(name, channel) = self[name] .merge( "image" => ["channels"][channel.to_s], "code_climate_check" => .fetch("code_climate_check", false), ) end |