Class: Object

Inherits:
BasicObject
Defined in:
lib/gri/blank.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/gri/blank.rb', line 4

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

#present?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/gri/blank.rb', line 8

def present?
  !blank?
end