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
7 8 9 |
# File 'lib/diaspora_federation/validators/rules/not_nil.rb', line 7 def error_key :not_nil end |
#params ⇒ Hash
This rule has no params.
18 19 20 |
# File 'lib/diaspora_federation/validators/rules/not_nil.rb', line 18 def params {} end |
#valid_value?(value) ⇒ Boolean
Determines if value is not nil
12 13 14 |
# File 'lib/diaspora_federation/validators/rules/not_nil.rb', line 12 def valid_value?(value) !value.nil? end |