Class: Origami::NameLeaf

Inherits:
Array show all
Defined in:
lib/origami/catalog.rb

Overview

Class representing a leaf in a Name tree.

Constant Summary

Constants inherited from Array

Array::TOKENS

Constants included from Object

Object::TOKENS

Instance Attribute Summary

Attributes inherited from Array

#names_cache, #strings_cache, #xref_cache

Attributes included from Object

#file_offset, #generation, #no, #objstm_offset, #parent

Instance Method Summary collapse

Methods inherited from Array

#+, #<<, #[]=, #copy, native_type, parse, #pre_build, #to_a, #to_obfuscated_str, #to_s

Methods included from Object

#<=>, #cast_to, #copy, #export, #indirect_parent, #is_indirect?, #logicalize, #logicalize!, native_type, #native_type, parse, #pdf, #pdf_version_required, #post_build, #pre_build, #reference, #resolve_all_references, #set_indirect, #set_pdf, #size, skip_until_next_obj, #solve, #to_o, #to_s, #type, typeof, #xrefs

Methods inherited from Array

#to_o

Constructor Details

#initialize(hash = {}) ⇒ NameLeaf

Creates a new leaf in a Name tree.

hash

A hash of couples, associating a Name with an Reference.



359
360
361
362
363
364
365
366
367
# File 'lib/origami/catalog.rb', line 359

def initialize(hash = {})
  
  names = []
  hash.each_pair do |k,v|
    names << k.to_o << v.to_o
  end
  
  super(names)
end