Class: Cure::Validator::NotNullRule

Inherits:
BaseRule
  • Object
show all
Defined in:
lib/cure/validator/base_rule.rb

Instance Method Summary collapse

Methods inherited from BaseRule

#initialize

Constructor Details

This class inherits a constructor from Cure::Validator::BaseRule

Instance Method Details

#process(value) ⇒ Object



31
32
33
# File 'lib/cure/validator/base_rule.rb', line 31

def process(value)
  !value.nil?
end

#to_sObject



35
36
37
# File 'lib/cure/validator/base_rule.rb', line 35

def to_s
  "Not null"
end