Class: Preflight::Rules::NoRgb
- Inherits:
-
Object
- Object
- Preflight::Rules::NoRgb
- Extended by:
- Forwardable
- Defined in:
- lib/preflight/rules/no_rgb.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_nonstroke_color_space(label) ⇒ Object
- #set_rgb_color_for_nonstroking(r, g, b) ⇒ Object
- #set_rgb_color_for_stroking(r, g, b) ⇒ 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_rgb.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_rgb.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_rgb.rb', line 33 def page=(page) @page = page @state = PDF::Reader::PageState.new(page) @issues = [] @resource_labels_seen = [] end |
#set_nonstroke_color_space(label) ⇒ Object
65 66 67 |
# File 'lib/preflight/rules/no_rgb.rb', line 65 def set_nonstroke_color_space(label) check_color_space(label) end |
#set_rgb_color_for_nonstroking(r, g, b) ⇒ Object
57 58 59 |
# File 'lib/preflight/rules/no_rgb.rb', line 57 def set_rgb_color_for_nonstroking(r, g, b) rgb_detected(r, g, b) end |
#set_rgb_color_for_stroking(r, g, b) ⇒ Object
53 54 55 |
# File 'lib/preflight/rules/no_rgb.rb', line 53 def set_rgb_color_for_stroking(r, g, b) rgb_detected(r, g, b) end |
#set_stroke_color_space(label) ⇒ Object
61 62 63 |
# File 'lib/preflight/rules/no_rgb.rb', line 61 def set_stroke_color_space(label) check_color_space(label) end |