class Quartz::Verifiers::NumericalityChecker
- Quartz::Verifiers::NumericalityChecker
- Quartz::Verifiers::EachChecker
- Quartz::Verifiers::RuntimeChecker
- Reference
- Object
Defined in:
quartz/verifiers/numericality.crConstant Summary
-
VALID_KEYS =
{ {:greater_than, :gt, :>}, {:lesser_than, :lt, :<}, {:greater_than_or_equal_to, :gte, :>=}, {:lesser_than_or_equal_to, :lte, :<=}, {:equal_to, :==}, {:not_equal_to, :!=}, {:negative}, {:positive}, {:zero}, {:not_zero}, {:finite}, {:infinite} }
Constructors
-
.new(*attributes, **kwargs)
TODO what about big numbers? TODO what about comparison within delta ? TODO option for float comparison within error
Instance Method Summary
-
#check_each(model, attribute, value)
Override this method in subclasses with the verification logic, adding errors to the records errors array where necessary.
- #targets : Hash(Symbol, Number::Primitive)
Instance methods inherited from class Quartz::Verifiers::EachChecker
allow_nil? : Bool
allow_nil?,
attributes : Array(Symbol)
attributes,
check(model) : Bool
check,
check_each(model, attribute, value)
check_each
Constructor methods inherited from class Quartz::Verifiers::EachChecker
new(*attributes : Symbol, **kwargs)
new
Instance methods inherited from class Quartz::Verifiers::RuntimeChecker
check(model) : Bool
check,
contexts : Array(Symbol)?
contexts,
strict? : Bool
strict?
Constructor methods inherited from class Quartz::Verifiers::RuntimeChecker
new(**kwargs)
new
Instance methods inherited from class Reference
==(other : Quartz::Any)
==
Instance methods inherited from class Object
===(other : Quartz::Any)
===
Constructor Detail
def self.new(*attributes, **kwargs)
#
TODO what about big numbers?
TODO what about comparison within delta ?
TODO option for float comparison within error
Instance Method Detail
def check_each(model, attribute, value)
#
Description copied from class Quartz::Verifiers::EachChecker
Override this method in subclasses with the verification logic, adding errors to the records errors array where necessary.