def require_non_empty value, message, return_value = false
      guard_value = if return_value == true then
                      value
                    elsif return_value != false then
                      return_value
                    else
                      false
                    end
      if value.is_a?(String) then
        require_that(!value.strip.empty?, message, guard_value)
      elsif value.respond_to?(:empty?) then
        require_that(!value.empty?, message, guard_value)
      else
        require_that(!value.nil?, message, guard_value)
      end
    end
def require_non_empty value, message, return_value = false
      guard_value = if return_value == true then
                      value
                    elsif return_value != false then
                      return_value
                    else
                      false
                    end
      if value.is_a?(String) then
        require_that(!value.strip.empty?, message, guard_value)
      elsif value.respond_to?(:empty?) then
        require_that(!value.empty?, message, guard_value)
      else
        require_that(!value.nil?, message, guard_value)
      end
    end
Require that a value not be empty

 If the value is a string, ensure that once stripped it's not empty. If the value responds to
 `:empty?`, ensure that it's not. Otherwise ensure the value isn't nil.

 @param [Object] value the value to check
 @param [String] message the exception message to use if the value is empty
 @param [Boolean,Object] return_value If true, returns value. If not false, returns the object
 @raise [ExpectationFailedError] if the value is empty
 @return [NilClass,Object] NilClass, or respecting return_value