Class: Evilution::Config::Validators::ExampleTargetingFallback Private
- Defined in:
- lib/evilution/config/validators/example_targeting_fallback.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.
Constant Summary collapse
- FALLBACKS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%i[full_file unresolved].freeze
Class Method Summary collapse
- .call(value) ⇒ Object private
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.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/evilution/config/validators/example_targeting_fallback.rb', line 8 def self.call(value) unless value.is_a?(String) || value.is_a?(Symbol) raise Evilution::ConfigError, "example_targeting_fallback must be full_file or unresolved, got #{value.inspect}" end sym = value.to_sym unless FALLBACKS.include?(sym) raise Evilution::ConfigError, "example_targeting_fallback must be full_file or unresolved, got #{sym.inspect}" end sym end |