Class: Qpid::Proton::Types::UTFString

Inherits:
String
  • Object
show all
Defined in:
lib/types/strings.rb

Overview

UTFString lets an application explicitly state that a string of characters is to be UTF-8 encoded.

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ UTFString

Returns a new instance of UTFString.



46
47
48
49
50
51
52
# File 'lib/types/strings.rb', line 46

def initialize(value)
  if !Qpid::Proton::Types.is_valid_utf?(value)
    raise RuntimeError.new("invalid UTF string")
  end

  super(value)
end