Class: Object

Inherits:
BasicObject
Defined in:
lib/ab_admin/core_ext/other.rb

Instance Method Summary collapse

Instance Method Details

#to_boolObject


30
31
32
# File 'lib/ab_admin/core_ext/other.rb', line 30

def to_bool
  ![false, 'false', '0', 0, 'f', nil, ''].include?(self.respond_to?(:downcase) ? self.downcase : self)
end