Sha256: 02c864132e8abcd9f106659030d0f12e6c8b2e749e9860a3295505d89676bc3d
Contents?: true
Size: 711 Bytes
Versions: 20
Compression:
Stored size: 711 Bytes
Contents
class Object unless instance_methods(false).include?("blank?") def blank? respond_to?(:empty?) ? empty? : !self end end end class String unless instance_methods(false).include?("blank?") def blank? self !~ /\S/ end end end class Numeric unless instance_methods(false).include?("blank?") def blank? false end end end class TrueClass unless instance_methods(false).include?("blank?") def blank? false end end end class FalseClass unless instance_methods(false).include?("blank?") def blank? true end end end class NilClass unless instance_methods(false).include?("blank?") def blank? true end end end
Version data entries
20 entries across 20 versions & 1 rubygems