Sha256: cc66c033598bc05409f2de77aed9894bf8138b7dac80add955ddc49a14b4207b
Contents?: true
Size: 408 Bytes
Versions: 14
Compression:
Stored size: 408 Bytes
Contents
=begin Add +blank?+, +present?+ and +presence+ methods to +Object+ class if activesupport cannot be loaded. =end class Object def blank? respond_to?(:empty?) ? !!empty? : !self end def present? !blank? end def presence self if present? end end =begin Add +blank?+ method to +NilClass+ in case activesupport cannot be loaded. =end class NilClass def blank? true end end
Version data entries
14 entries across 14 versions & 1 rubygems