Class: EideticPDF::PdfObjects::PdfNumber

Inherits:
Object
  • Object
show all
Defined in:
lib/epdfo.rb

Direct Known Subclasses

PdfInteger, PdfReal

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ PdfNumber

Returns a new instance of PdfNumber.



101
102
103
# File 'lib/epdfo.rb', line 101

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



99
100
101
# File 'lib/epdfo.rb', line 99

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



113
114
115
# File 'lib/epdfo.rb', line 113

def ==(other)
  other.respond_to?(:value) && self.value == other.value
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


109
110
111
# File 'lib/epdfo.rb', line 109

def eql?(other)
  self.value.eql?(other.value)
end

#to_sObject



105
106
107
# File 'lib/epdfo.rb', line 105

def to_s
  "#{value} "
end