Module: DevSuite::Utils::WarningHandler

Extended by:
WarningHandler
Included in:
RequestLogger::Request, RequestLogger::Response, WarningHandler
Defined in:
lib/dev_suite/utils/warning_handler.rb

Instance Method Summary collapse

Instance Method Details

#warn_if_missing(attribute_name, value) ⇒ Object



8
9
10
11
12
# File 'lib/dev_suite/utils/warning_handler.rb', line 8

def warn_if_missing(attribute_name, value)
  if value.nil? || (value.respond_to?(:empty?) && value.empty?)
    log_warning("#{attribute_name} is missing or empty!")
  end
end