class Origami::HexaString

Class representing an hexadecimal-writen String Object.

Public Class Methods

new(str = "") click to toggle source

Creates a new PDF hexadecimal String.

str

The string value.

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

    super(str)
end

Public Instance Methods

to_literal() click to toggle source

Converts self to a literal String.

# File lib/origami/string.rb, line 208
def to_literal
    LiteralString.new(self.value)
end
value() click to toggle source
# File lib/origami/string.rb, line 212
def value
    self.decrypt! if self.is_a?(Encryption::EncryptedString) and not @decrypted

    to_str
end