Class: Preflight::Rules::PrintBoxes
- Inherits:
-
Object
- Object
- Preflight::Rules::PrintBoxes
- Defined in:
- lib/preflight/rules/print_boxes.rb
Overview
Instance Attribute Summary collapse
-
#issues ⇒ Object
readonly
Returns the value of attribute issues.
Instance Method Summary collapse
Instance Attribute Details
#issues ⇒ Object (readonly)
Returns the value of attribute issues.
21 22 23 |
# File 'lib/preflight/rules/print_boxes.rb', line 21 def issues @issues end |
Instance Method Details
#page=(page) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/preflight/rules/print_boxes.rb', line 23 def page=(page) dict = page.attributes if dict[:MediaBox].nil? @issues = [Issue.new("every page must have a MediaBox", self, :page => page.number)] elsif dict[:ArtBox].nil? && dict[:TrimBox].nil? @issues = [Issue.new("every page must have either an ArtBox or a TrimBox", self, :page => page.number)] elsif dict[:ArtBox] && dict[:TrimBox] @issues = [Issue.new("no page can have both ArtBox and TrimBox - TrimBox is preferred", self, :page => page.number)] else @issues = [] end end |