Class: Aequitas::Rule::Numericalness::Integer
- Inherits:
-
Aequitas::Rule::Numericalness
- Object
- Aequitas::Rule
- Aequitas::Rule::Numericalness
- Aequitas::Rule::Numericalness::Integer
- Defined in:
- lib/aequitas/rule/numericalness/integer.rb
Instance Attribute Summary
Attributes inherited from Aequitas::Rule
#attribute_name, #custom_message, #guard, #skip_condition
Attributes included from ValueObject
Instance Method Summary collapse
Methods inherited from Aequitas::Rule::Numericalness
rules_for, #valid?, #valid_numericalness?, #value_as_string
Methods inherited from Aequitas::Rule
#attribute_value, #execute?, #initialize, rules_for, #skip?, #validate, #violation_data, #violation_info, #violation_values
Methods included from ValueObject
Constructor Details
This class inherits a constructor from Aequitas::Rule
Instance Method Details
#expected ⇒ Object
10 11 12 |
# File 'lib/aequitas/rule/numericalness/integer.rb', line 10 def expected /\A[+-]?\d+\z/ end |
#violation_type(resource) ⇒ Object
14 15 16 |
# File 'lib/aequitas/rule/numericalness/integer.rb', line 14 def violation_type(resource) :not_an_integer end |