abstract struct Athena::Validator::Constraints::ComparisonValidator
- Athena::Validator::Constraints::ComparisonValidator
- Athena::Validator::ConstraintValidator
- Struct
- Value
- Object
Overview
Defines common logic for comparison based constraint validators.
Direct Known Subclasses
- Athena::Validator::Constraints::EqualTo::Validator
- Athena::Validator::Constraints::GreaterThan::Validator
- Athena::Validator::Constraints::GreaterThanOrEqual::Validator
- Athena::Validator::Constraints::LessThan::Validator
- Athena::Validator::Constraints::LessThanOrEqual::Validator
- Athena::Validator::Constraints::NotEqualTo::Validator
Defined in:
constraints/abstract_comparison_validator.crInstance Method Summary
-
#compare_values(actual : _, expected : _) : Bool
Returns
true
if the provided actual and expected values are compatible, otherwisefalse
. -
#error_code : String
Returns the expected error code for
self
. -
#validate(value : _, constraint : AVD::Constraints::AbstractComparison) : Nil
:inherit:
Instance methods inherited from struct Athena::Validator::ConstraintValidator
context : AVD::ExecutionContextInterface
context,
initialize
initialize,
raise_invalid_type(value : _, supported_types : String) : NoReturn
raise_invalid_type,
validate(value : _, constraint : AVD::Constraint) : Nil
validate
Constructor methods inherited from struct Athena::Validator::ConstraintValidator
new
new
Instance methods inherited from module Athena::Validator::ConstraintValidatorInterface
context : AVD::ExecutionContextInterface
context,
validate(value : _, constraint : AVD::Constraint) : Nil
validate
Instance Method Detail
abstract
def compare_values(actual : _, expected : _) : Bool
#
Returns true
if the provided actual and expected values are compatible, otherwise false
.