Class: Evilution::Config::Validators::Preload Private

Inherits:
Base
  • Object
show all
Defined in:
lib/evilution/config/validators/preload.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
# File 'lib/evilution/config/validators/preload.rb', line 6

def self.call(value)
  return nil if value.nil?
  return false if value == false
  return value if value.is_a?(String)

  raise Evilution::ConfigError, "preload must be nil, false, or a String path, got #{value.inspect}"
end