Class: RPDF::PDFInteger

Inherits:
PDFNumeric show all
Defined in:
lib/rpdf/pdfinteger.rb

Overview

Integer Object This is not a real PDF Object, as PDF knows only Numerics.

PDFRef15 p28

Instance Attribute Summary

Attributes inherited from PDFNumeric

#value

Attributes inherited from PDFObject

#generation_number, #object_number

Instance Method Summary collapse

Methods inherited from PDFNumeric

#<=>, #to_s

Methods inherited from PDFObject

#indirect?, #invalidate, #invalidated?, #to_pdf, #to_ref

Constructor Details

#initialize(value, document = nil) ⇒ PDFInteger

Returns a new instance of PDFInteger.

Raises:

  • (Exception)


10
11
12
13
# File 'lib/rpdf/pdfinteger.rb', line 10

def initialize(value, document=nil)
  raise Exception.new("PDFInteger is not an integer") unless value.kind_of?(Integer)
  super
end