Class: Object

Inherits:
BasicObject
Defined in:
lib/helpers/object.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/helpers/object.rb', line 4

def blank?
  case
  when self.nil?
    true
  when is_a?(String)
    self.empty?
  when is_a?(Array)
    self.empty?
  else
    false
  end
end