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

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

Class Method Summary collapse

Class Method Details

.call(value) ⇒ Object



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