Class: Aequitas::Rule::Absence::Nil
- Inherits:
-
Aequitas::Rule::Absence
- Object
- Aequitas::Rule
- Aequitas::Rule::Absence
- Aequitas::Rule::Absence::Nil
- Defined in:
- lib/aequitas/rule/absence/nil.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
#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
#valid?(resource) ⇒ Boolean
10 11 12 |
# File 'lib/aequitas/rule/absence/nil.rb', line 10 def valid?(resource) attribute_value(resource).nil? end |
#violation_type(resource) ⇒ Object
14 15 16 |
# File 'lib/aequitas/rule/absence/nil.rb', line 14 def violation_type(resource) :not_nil end |