add (PDF::Writer::Object::Pages)

        # File lib/pdf/writer/object/pages.rb, line 53
    53:   def add(p)
    54:     if p.kind_of?(PDF::Writer::Object::Page)
    55:       @pages << p
    56:     elsif p.kind_of?(PDF::Writer::FontMetrics)
    57:       @fonts << p
    58:     elsif p.kind_of?(PDF::Writer::External)
    59:       @xObjects << p
    60:     elsif p.kind_of?(Hash)
    61:       # Find a match.
    62:       i = @pages.index(p[:rpage])
    63:       unless i.nil?
    64:         # There is a match; insert the page.
    65:         case p[:pos]
    66:         when :before
    67:           @pages[i, 0] = p[:page]
    68:         when :after
    69:           @pages[i + 1, 0] = p[:page]
    70:         else
    71:           raise ArgumentError, PDF::Message[:invalid_pos]
    72:         end
    73:       end
    74:     else
    75:       raise ArgumentError, PDF::Message[:req_FPXOH]
    76:     end
    77:   end