Class: Preflight::Rules::MaxVersion
- Inherits:
-
Object
- Object
- Preflight::Rules::MaxVersion
- Defined in:
- lib/preflight/rules/max_version.rb
Overview
ensure the PDF version of the file under review is not more recent than desired
Instance Method Summary collapse
-
#initialize(max_version) ⇒ MaxVersion
constructor
A new instance of MaxVersion.
- #messages(ohash) ⇒ Object
Constructor Details
#initialize(max_version) ⇒ MaxVersion
Returns a new instance of MaxVersion.
9 10 11 |
# File 'lib/preflight/rules/max_version.rb', line 9 def initialize(max_version) @max_version = max_version.to_f end |
Instance Method Details
#messages(ohash) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/preflight/rules/max_version.rb', line 13 def (ohash) if ohash.pdf_version > @max_version ["PDF version should be #{@max_version} or lower (value: #{ohash.pdf_version})"] else [] end end |