Exception: EnvValidator::TypeError
- Inherits:
-
ValidationError
- Object
- StandardError
- Error
- ValidationError
- EnvValidator::TypeError
- Defined in:
- lib/env_validator/error.rb
Instance Attribute Summary
Attributes inherited from ValidationError
Instance Method Summary collapse
-
#initialize(variable_name, rule, expected_type, actual_value) ⇒ TypeError
constructor
A new instance of TypeError.
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) = "#{variable_name} must be #{expected_type_description(expected_type)}, got: #{actual_value.inspect}" super(variable_name, rule, ) end |