Class: CompareValidator

Inherits:
BaseValidator
  • Object
show all
Defined in:
lib/lite/validators/compare_validator.rb

Constant Summary collapse

CHECKS =
{
  less_than: :<,
  less_than_or_equal_to: :<=,
  greater_than: :>,
  greater_than_or_equal_to: :>=,
  equal_to: :==,
  not_equal_to: :!=
}.freeze

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object



14
15
16
17
18
# File 'lib/lite/validators/compare_validator.rb', line 14

def validate_each(record, attribute, value)
  assert_valid_to!
  assert_valid_check!
  super
end