Class: Object

Inherits:
BasicObject
Defined in:
lib/utils.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/utils.rb', line 9

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

#present?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/utils.rb', line 13

def present?
  !blank?
end