class Quartz::Verifiers::NumericalityChecker

Defined in:

quartz/verifiers/numericality.cr

Constant 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

Instance Method Summary

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) | Nil 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


[View source]

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.


[View source]
def targets : Hash(Symbol, Number::Primitive) #

[View source]