Method: Vedeu::Common#present?
- Defined in:
- lib/vedeu/common.rb
#present?(variable) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a boolean indicating whether a variable has a useful value.
100 101 102 103 104 105 106 |
# File 'lib/vedeu/common.rb', line 100 def present?(variable) return true if numeric?(variable) return false if variable.nil? return false if variable.respond_to?(:empty?) && variable.empty? true end |