Class: OpenTelemetry::DistributedContext::Entry::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/opentelemetry/distributed_context/entry.rb

Overview

Entry::Value wraps a string. It MUST contain only printable ASCII (codes between 32 and 126).

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Value

Returns a new instance of Value.

Raises:

  • (ArgumentError)


32
33
34
35
36
# File 'lib/opentelemetry/distributed_context/entry.rb', line 32

def initialize(value)
  raise ArgumentError unless Internal.printable_ascii?(value)

  @value = -value
end

Instance Method Details

#to_sObject



38
39
40
# File 'lib/opentelemetry/distributed_context/entry.rb', line 38

def to_s
  @value
end