Class: Object

Inherits:
BasicObject
Defined in:
lib/cloudinary/missing.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/cloudinary/missing.rb', line 3

def blank?
  respond_to?(:empty?) ? empty? : !self
end

#presenceObject



14
15
16
# File 'lib/cloudinary/missing.rb', line 14

def presence
  self if present?
end

#present?true, false

An object is present if it’s not blank.

Returns:

  • (true, false)


10
11
12
# File 'lib/cloudinary/missing.rb', line 10

def present?
  !blank?
end