Class: Uniword::Validation::Report::ValidationIssue

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/uniword/validation/report/validation_issue.rb

Overview

A single validation issue (error, warning, info, or notice).

Represents one finding from a validation rule, including an actionable suggestion for resolution.

Examples:

Create an error issue

ValidationIssue.new(
  severity: "error",
  code: "DOC-020",
  message: "settings.xml declares footnotePr but footnotes.xml is missing",
  part: "word/settings.xml",
  suggestion: "Add a minimal footnotes.xml with separator entries..."
)

Instance Method Summary collapse

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/uniword/validation/report/validation_issue.rb', line 38

def error?
  severity == "error"
end

#info?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/uniword/validation/report/validation_issue.rb', line 46

def info?
  severity == "info"
end

#notice?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/uniword/validation/report/validation_issue.rb', line 50

def notice?
  severity == "notice"
end

#warning?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/uniword/validation/report/validation_issue.rb', line 42

def warning?
  severity == "warning"
end