da62c33bbfbbe3de555f9371f0363cf817494d27
2 unless Object
.respond_to
?(:blank?)
4 # Check first to see if we are in a Rails environment, no need to
5 # define these methods if we are
7 # An object is blank if it's nil, empty, or a whitespace string.
8 # For example, "", " ", nil, [], and {} are blank.
11 # if !address.nil? && !address.empty?
15 if respond_to
?(:empty?) && respond_to
?(:strip)
16 empty
? or strip
.empty
?
17 elsif respond_to
?(:empty?)
44 alias_method
:blank?, :empty?
48 alias_method
:blank?, :empty?
53 empty
? || strip
.empty
?