class Origami::LiteralString

Class representing a literal String Object.

Public Class Methods

new(str = "") click to toggle source

Creates a new PDF String.

str

The string value.

Calls superclass method
# File lib/origami/string.rb, line 237
def initialize(str = "")
    unless str.is_a?(::String)
        raise TypeError, "Expected type String, received #{str.class}."
    end

    super(str)
end

Public Instance Methods

to_hex() click to toggle source

Converts self to HexaString

# File lib/origami/string.rb, line 334
def to_hex
    HexaString.new(self.value)
end
value() click to toggle source

Returns a standard String representation.

# File lib/origami/string.rb, line 341
def value
    self.decrypt! if self.is_a?(Encryption::EncryptedString) and not @decrypted

    to_str
end