Class: Preflight::Rules::DocumentId

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

Overview

check the file has a document ID

Arguments: none

Usage:

class MyPreflight
  include Preflight::Profile

  rule Preflight::Rules::DocumentId
end

Instance Method Summary collapse

Instance Method Details

#check_hash(ohash) ⇒ Object


19
20
21
22
23
24
25
# File 'lib/preflight/rules/document_id.rb', line 19

def check_hash(ohash)
  if ohash.trailer[:ID].nil?
    [Issue.new("Document ID missing", self)]
  else
    []
  end
end