Class: EnvValidator::Types::Base

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

Direct Known Subclasses

Base64, Boolean, DirPath, Email, FilePath, Float, Integer, Json, String, URL

Instance Method Summary collapse

Instance Method Details

#coerce(value) ⇒ Object



14
15
16
# File 'lib/env_validator/types.rb', line 14

def coerce(value)
  value # Default: no coercion
end

#validate(value) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/env_validator/types.rb', line 10

def validate(value)
  raise NotImplementedError, "Subclasses must implement #validate"
end