Class: Preflight::Rules::NoFilespecs

Inherits:
Object
  • Object
show all
Defined in:
lib/preflight/rules/no_filespecs.rb

Overview

Check the target PDF doesn’t use Filespecs to refer to external files.

Arguments: none

Usage:

class MyPreflight
  include Preflight::Profile

  rule Preflight::Rules::NoFilespecs
end

Instance Method Summary collapse

Instance Method Details

#check_hash(ohash) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/preflight/rules/no_filespecs.rb', line 20

def check_hash(ohash)
  filespecs_count = count_filespec_dicts(ohash)
  if filespecs_count > 0
    [Issue.new("File uses at least 1 Filespec to refer to an external file", self, :filespecs_count => filespecs_count)]
  else
    []
  end
end