Class: Saphyr::Fields::IntegerField
- Defined in:
- lib/saphyr/fields/integer_field.rb
Overview
The integer field type
Allowed options are: :eq, :gt, :gte, :lt, :lte, :in.
Constant Summary collapse
- PREFIX =
'integer'- EXPECTED_TYPES =
Integer- AUTHORIZED_OPTIONS =
[:eq, :gt, :gte, :lt, :lte, :in]
- EXCLUSIVE_OPTIONS =
[ [ :eq, [:_all_] ], [ :in, [:_all_] ], [ :gt, [:gte] ], [ :lt, [:lte] ], ]
- NOT_EQUALS_OPTIONS =
Cannot have: lte == gte, use
:eqinstead [ [:lte, :gte], ]
- NOT_SUP_OPTIONS =
Cannot have: gte > lte
[ [:gte, :lte], ]
- NOT_SUP_OR_EQUALS_OPTIONS =
Cannot have: gt >= lt … and so on
[ [:gt, :lt], [:gt, :lte], [:gte, :lt], ]
Constants inherited from FieldBase
FieldBase::DEFAULT_OPTS, FieldBase::DEFAULT_OPT_VALUES, FieldBase::REQUIRED_ONE_OF_OPTIONS, FieldBase::REQUIRED_OPTIONS
Constants included from Asserts::ErrorConstants
Asserts::ErrorConstants::ERR_BAD_FORMAT, Asserts::ErrorConstants::ERR_EQ, Asserts::ErrorConstants::ERR_GT, Asserts::ErrorConstants::ERR_GTE, Asserts::ErrorConstants::ERR_IN, Asserts::ErrorConstants::ERR_LEN, Asserts::ErrorConstants::ERR_LT, Asserts::ErrorConstants::ERR_LTE, Asserts::ErrorConstants::ERR_MAX, Asserts::ErrorConstants::ERR_MIN, Asserts::ErrorConstants::ERR_NOT_EMPTY, Asserts::ErrorConstants::ERR_NOT_NULLABLE, Asserts::ErrorConstants::ERR_REGEXP, Asserts::ErrorConstants::ERR_SIZE_EQ, Asserts::ErrorConstants::ERR_SIZE_LEN, Asserts::ErrorConstants::ERR_SIZE_MAX, Asserts::ErrorConstants::ERR_SIZE_MIN, Asserts::ErrorConstants::ERR_TYPE
Instance Attribute Summary
Attributes inherited from FieldBase
Method Summary
Methods inherited from FieldBase
#authorized_options, #default?, #err, #exclusive_options, #expected_types, #initialize, #not_equals_options, #not_sup_options, #not_sup_or_equals_options, #nullable?, #prefix, #required?, #required_one_of_options, #required_options, #validate
Methods included from Asserts::StringAssert
Methods included from Asserts::NumericAssert
#assert_numeric_gt, #assert_numeric_gte, #assert_numeric_lt, #assert_numeric_lte
Methods included from Asserts::SizeAssert
#assert_size_len, #assert_size_max, #assert_size_min
Methods included from Asserts::BaseAssert
#assert_boolean, #assert_class, #assert_eq, #assert_in, #assert_not_empty
Constructor Details
This class inherits a constructor from Saphyr::Fields::FieldBase