Class: Validation::Rule::NotNil
- Inherits:
-
Object
- Object
- Validation::Rule::NotNil
- Defined in:
- lib/diaspora_federation/validators/rules/not_nil.rb
Overview
Validates that a property is not nil
Instance Method Summary collapse
-
#error_key ⇒ Symbol
The error key for this rule.
-
#params ⇒ Hash
This rule has no params.
-
#valid_value?(value) ⇒ Boolean
Determines if value is not nil.
Instance Method Details
#error_key ⇒ Symbol
The error key for this rule
9 10 11 |
# File 'lib/diaspora_federation/validators/rules/not_nil.rb', line 9 def error_key :not_nil end |
#params ⇒ Hash
This rule has no params.
20 21 22 |
# File 'lib/diaspora_federation/validators/rules/not_nil.rb', line 20 def params {} end |
#valid_value?(value) ⇒ Boolean
Determines if value is not nil
14 15 16 |
# File 'lib/diaspora_federation/validators/rules/not_nil.rb', line 14 def valid_value?(value) !value.nil? end |