Class: EnvValidator::Types::String

Inherits:
Base
  • Object
show all
Defined in:
lib/env_validator/types.rb

Instance Method Summary collapse

Methods inherited from Base

#coerce

Instance Method Details

#validate(value) ⇒ Object

Raises:



20
21
22
23
24
# File 'lib/env_validator/types.rb', line 20

def validate(value)
  return true if value.is_a?(::String)

  raise TypeError, "Expected string, got #{value.class}"
end