class PDF::Reader::Reference

An internal PDF::Reader class that represents an indirect reference to a PDF Object
###############################################################################

def self.from_buffer (buffer)

instance. Returns nil if the next token isn't an indirect reference.
check if the next token in the buffer is a reference, and return a PDF::Reader::Reference
###############################################################################
def self.from_buffer (buffer)
  buffer.ready_token
  return nil unless m = buffer.raw.match(/^(\d+)\s+(\d+)\s+R\b/)
  buffer.head(m[0].size)
  self.new(m[1].to_i, m[2].to_i)
end

def initialize (id, gen)

Create a new Reference to an object with the specified id and revision number
###############################################################################
def initialize (id, gen)
  @id, @gen = id, gen
end

def to_a

returns the current Reference object in an array with a single element
###############################################################################
def to_a
  [self]
end