lib/pdk/report/event.rb
# Validates the source of the event.
#
# @param value [String, Symbol] The name of the source of the event.
#
# @return [String] the value passed to the event, converted to a String
#   if necessary.
#
# @raise [ArgumentError] if the value is nil or an empty String.
Validates the source of the event.
Validates the source of the event .
def sanitise_source(value)
        if value.nil? || (value.is_a?(String) && value.empty?)
          raise ArgumentError, _('Source not specified.')
        end
        value.to_s
      end
def sanitise_source ( value ) if value . nil? || ( value . is_a? ( String ) && value . empty? ) raise ArgumentError , _ ( 'Source not specified.' ) end value . to_s end
Validates the source of the event.
Validates the source of the event .
the value passed to the event, converted to a String if necessary.
the value passed to the event converted to a String if necessary .
String
[ArgumentError] if the value is nil or an empty String.
[ ArgumentError ] if the value is nil or an empty String .
value
The name of the source of the event.
The name of the source of the event .