Class: Pdfrb::Conformance::ValidationResult
- Inherits:
-
Struct
- Object
- Struct
- Pdfrb::Conformance::ValidationResult
- 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
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#violations ⇒ Object
Returns the value of attribute violations.
Instance Method Summary collapse
Instance Attribute Details
#profile ⇒ Object
Returns the value of attribute profile
27 28 29 |
# File 'lib/pdfrb/conformance/rule.rb', line 27 def profile @profile end |
#violations ⇒ Object
Returns the value of attribute violations
27 28 29 |
# File 'lib/pdfrb/conformance/rule.rb', line 27 def violations @violations end |
Instance Method Details
#errors ⇒ Object
30 |
# File 'lib/pdfrb/conformance/rule.rb', line 30 def errors = violations.select(&:error?) |
#infos ⇒ Object
34 |
# File 'lib/pdfrb/conformance/rule.rb', line 34 def infos = violations.reject { |v| v.error? || v.warning? } |
#passed? ⇒ Boolean
28 |
# File 'lib/pdfrb/conformance/rule.rb', line 28 def passed? = errors.empty? |
#violation_count ⇒ Object
36 |
# File 'lib/pdfrb/conformance/rule.rb', line 36 def violation_count = violations.length |
#warnings ⇒ Object
32 |
# File 'lib/pdfrb/conformance/rule.rb', line 32 def warnings = violations.select(&:warning?) |