Sha256: 9b117d03a39ccd4d725b26e4eb2f8eeb8e7f35fccd84ae30fa7007d556deb0f2
Contents?: true
Size: 496 Bytes
Versions: 2
Compression:
Stored size: 496 Bytes
Contents
# The methods here are provided to speed up function blank? in class Object class NilClass #:nodoc: def blank? true end end class FalseClass #:nodoc: def blank? true end end class TrueClass #:nodoc: def blank? false end end class Array #:nodoc: alias_method :blank?, :empty? end class Hash #:nodoc: alias_method :blank?, :empty? end class String #:nodoc: def blank? empty? || strip.empty? end end class Numeric #:nodoc: alias_method :blank?, :zero? end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activesupport-1.2.2 | lib/active_support/core_ext/blank.rb |
activesupport-1.2.1 | lib/active_support/core_ext/blank.rb |