Class: RPDF::PDFVersion
- Inherits:
-
Object
- Object
- RPDF::PDFVersion
- Includes:
- Comparable
- Defined in:
- lib/rpdf/version.rb
Overview
class describing a PDF version. Don’t use this class directly, but use the constants defined in this file.
- PDFRef15 p68
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #<=>(other_version) ⇒ Object
-
#initialize(version_string) ⇒ PDFVersion
constructor
A new instance of PDFVersion.
- #to_pdf ⇒ Object
Constructor Details
#initialize(version_string) ⇒ PDFVersion
Returns a new instance of PDFVersion.
11 12 13 |
# File 'lib/rpdf/version.rb', line 11 def initialize(version_string) @value = version_string end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
9 10 11 |
# File 'lib/rpdf/version.rb', line 9 def value @value end |
Instance Method Details
#<=>(other_version) ⇒ Object
15 16 17 |
# File 'lib/rpdf/version.rb', line 15 def <=>(other_version) @value <=> other_version.value end |
#to_pdf ⇒ Object
19 20 21 |
# File 'lib/rpdf/version.rb', line 19 def to_pdf "%PDF-#{@value}\n" end |