Exception: EnvValidator::TypeError

Inherits:
ValidationError show all
Defined in:
lib/env_validator/error.rb

Instance Attribute Summary

Attributes inherited from ValidationError

#rule, #variable_name

Instance Method Summary collapse

Constructor Details

#initialize(variable_name, rule, expected_type, actual_value) ⇒ TypeError

Returns a new instance of TypeError.



49
50
51
52
# File 'lib/env_validator/error.rb', line 49

def initialize(variable_name, rule, expected_type, actual_value)
  message = "#{variable_name} must be #{expected_type_description(expected_type)}, got: #{actual_value.inspect}"
  super(variable_name, rule, message)
end