Class: Burner::Modeling::Validations::Present

Inherits:
Blank
  • Object
show all
Defined in:
lib/burner/modeling/validations/present.rb

Overview

Check if a value is present. If it is blank (null or empty) then it is invalid.

Constant Summary

Constants inherited from Blank

Blank::BLANK_RE

Instance Attribute Summary

Attributes inherited from Base

#key

Instance Method Summary collapse

Methods inherited from Base

#initialize, #message

Constructor Details

This class inherits a constructor from Burner::Modeling::Validations::Base

Instance Method Details

#valid?(object_value, resolver) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/burner/modeling/validations/present.rb', line 19

def valid?(object_value, resolver)
  !super(object_value, resolver)
end