Class: Evilution::Config::Validators::ExampleTargetingCache Private

Inherits:
Base
  • Object
show all
Defined in:
lib/evilution/config/validators/example_targeting_cache.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.call(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
9
10
11
12
13
14
# File 'lib/evilution/config/validators/example_targeting_cache.rb', line 6

def self.call(value)
  raise Evilution::ConfigError, "example_targeting_cache must be a Hash, got #{value.class}" unless value.is_a?(Hash)

  normalized = normalize_keys(value)
  merged = Evilution::Config::DEFAULTS[:example_targeting_cache].merge(normalized)
  require_positive_int!(merged, :max_files)
  require_positive_int!(merged, :max_blocks)
  merged
end