Method: CommonLib::Object#true?

Defined in:
lib/common_lib/ruby/object.rb

#true?Boolean

looking for an explicit true

Returns:

  • (Boolean)


41
42
43
44
# File 'lib/common_lib/ruby/object.rb', line 41

def true?
  return [true, 'true', 1, '1', 't'].include?(
    ( self.is_a?(String) ) ? self.downcase : self )
end