Class: Preflight::Rules::MaxVersion
- Inherits:
-
Object
- Object
- Preflight::Rules::MaxVersion
- Defined in:
- lib/preflight/rules/max_version.rb
Overview
Instance Method Summary collapse
- #check_hash(ohash) ⇒ Object
-
#initialize(max_version) ⇒ MaxVersion
constructor
A new instance of MaxVersion.
Constructor Details
#initialize(max_version) ⇒ MaxVersion
Returns a new instance of MaxVersion.
20 21 22 |
# File 'lib/preflight/rules/max_version.rb', line 20 def initialize(max_version) @max_version = max_version.to_f end |
Instance Method Details
#check_hash(ohash) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/preflight/rules/max_version.rb', line 24 def check_hash(ohash) if ohash.pdf_version > @max_version [Issue.new("PDF version should be #{@max_version} or lower", self, :max_version => @max_version, :current_version => ohash.pdf_version)] else [] end end |