it's false, empty, or a whitespace string. # For example, +false+, '', ' ', +nil+, [], and {} are all blank. # # This simplifies # # !address || address.empty? # # to # # address.blank? # # @return [true, false] def blank? respond_to?(:empty?) ? !!empty? : !self end # An object is present if it's not blank. # # @return [true, false] def present? !blank? end $ highlight -O rtf hoge2.rb | pbcopy