Module: OpenTelemetry::Internal Private

Extended by:
Internal
Included in:
Internal
Defined in:
lib/opentelemetry/internal.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Internal contains helpers used by the no-op API implementation.

Instance Method Summary collapse

Instance Method Details

#printable_ascii?(string) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


14
15
16
17
18
19
20
# File 'lib/opentelemetry/internal.rb', line 14

def printable_ascii?(string)
  return false unless string.is_a?(String)

  r = 32..126
  string.each_codepoint { |c| return false unless r.include?(c) }
  true
end