Parent

Class/Module Index [+]

Quicksearch

Origami::XRef::Section

Class representing a Cross-reference table. A section contains a set of XRefSubsection.

Public Class Methods

new(subsections = []) click to toggle source

Creates a new XRef section.

subsections

An array of XRefSubsection.

# File lib/origami/xreftable.rb, line 220
def initialize(subsections = [])
  @subsections = subsections
end

Public Instance Methods

<<(subsection) click to toggle source

Appends a new subsection.

subsection

A XRefSubsection.

# File lib/origami/xreftable.rb, line 242
def <<(subsection)
  @subsections << subsection
end
[](no) click to toggle source

Returns a XRef associated with a given object.

no

The Object number.

# File lib/origami/xreftable.rb, line 250
def [](no)
  @subsections.each { |s|
    return s[no] if s.has_object?(no)
  }
  nil
end
Also aliased as: find
each(&b) click to toggle source

Processes each XRefSubsection.

# File lib/origami/xreftable.rb, line 262
def each(&b)
  @subsections.each(&b)
end
find(no) click to toggle source
Alias for: []
to_s() click to toggle source

Outputs self into PDF code.

# File lib/origami/xreftable.rb, line 269
def to_s
  "xref" << EOL << @subsections.join
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.