Object.class_eval do def have_value? result = nil if self.respond_to?(:blank?) result = !self.blank? elsif self.respond_to?(:empty?) result = !self.empty? end result end end