Class: Pdfrb::Conformance::ValidationResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/pdfrb/conformance/rule.rb

Overview

Aggregated validation output. Knows whether the document passes (no errors) and can filter by severity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#profileObject

Returns the value of attribute profile

Returns:

  • (Object)

    the current value of profile



27
28
29
# File 'lib/pdfrb/conformance/rule.rb', line 27

def profile
  @profile
end

#violationsObject

Returns the value of attribute violations

Returns:

  • (Object)

    the current value of violations



27
28
29
# File 'lib/pdfrb/conformance/rule.rb', line 27

def violations
  @violations
end

Instance Method Details

#errorsObject



30
# File 'lib/pdfrb/conformance/rule.rb', line 30

def errors = violations.select(&:error?)

#infosObject



34
# File 'lib/pdfrb/conformance/rule.rb', line 34

def infos = violations.reject { |v| v.error? || v.warning? }

#passed?Boolean

Returns:

  • (Boolean)


28
# File 'lib/pdfrb/conformance/rule.rb', line 28

def passed? = errors.empty?

#violation_countObject



36
# File 'lib/pdfrb/conformance/rule.rb', line 36

def violation_count = violations.length

#warningsObject



32
# File 'lib/pdfrb/conformance/rule.rb', line 32

def warnings = violations.select(&:warning?)