Class: Preflight::Rules::NoGray
- Inherits:
-
Object
- Object
- Preflight::Rules::NoGray
- Extended by:
- Forwardable
- Defined in:
- lib/preflight/rules/no_gray.rb
Overview
Instance Attribute Summary collapse
-
#issues ⇒ Object
readonly
Returns the value of attribute issues.
Instance Method Summary collapse
-
#invoke_xobject(label) ⇒ Object
descend into nested form xobjects.
-
#page=(page) ⇒ Object
we’re about to start a new page, reset state.
- #set_gray_for_nonstroking(g) ⇒ Object
- #set_gray_for_stroking(g) ⇒ Object
- #set_nonstroke_color_space(label) ⇒ Object
- #set_stroke_color_space(label) ⇒ Object
Instance Attribute Details
#issues ⇒ Object (readonly)
Returns the value of attribute issues.
29 30 31 |
# File 'lib/preflight/rules/no_gray.rb', line 29 def issues @issues end |
Instance Method Details
#invoke_xobject(label) ⇒ Object
descend into nested form xobjects
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/preflight/rules/no_gray.rb', line 42 def invoke_xobject(label) @state.invoke_xobject(label) do |xobj| case xobj when PDF::Reader::FormXObject then xobj.walk(self) when PDF::Reader::Stream then check_xobject(xobj) end end end |
#page=(page) ⇒ Object
we’re about to start a new page, reset state
33 34 35 36 37 38 |
# File 'lib/preflight/rules/no_gray.rb', line 33 def page=(page) @page = page @state = PDF::Reader::PageState.new(page) @issues = [] @resource_labels_seen = [] end |
#set_gray_for_nonstroking(g) ⇒ Object
57 58 59 |
# File 'lib/preflight/rules/no_gray.rb', line 57 def set_gray_for_nonstroking(g) gray_detected(g) end |
#set_gray_for_stroking(g) ⇒ Object
53 54 55 |
# File 'lib/preflight/rules/no_gray.rb', line 53 def set_gray_for_stroking(g) gray_detected(g) end |
#set_nonstroke_color_space(label) ⇒ Object
65 66 67 |
# File 'lib/preflight/rules/no_gray.rb', line 65 def set_nonstroke_color_space(label) check_color_space(label) end |
#set_stroke_color_space(label) ⇒ Object
61 62 63 |
# File 'lib/preflight/rules/no_gray.rb', line 61 def set_stroke_color_space(label) check_color_space(label) end |