class PDF::Reader::Reference

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

def ==(obj)

current object
returns true if the provided object points to the same PDF Object as the
###############################################################################
def ==(obj)
  return false unless obj.kind_of?(PDF::Reader::Reference)
  self.hash == obj.hash
end

def hash

return an identical hash
different Reference objects that point to the same PDF Object will
returns a hash based on the PDF::Reference this object points to. Two
###############################################################################
def hash
  "#{self.id}:#{self.gen}".hash
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

def to_i

returns the ID of this reference. Use with caution, ignores the generation id
###############################################################################
def to_i
  self.id
end