Class: SvgConform::Errors::ValidationNotice

Inherits:
Base
  • Object
show all
Defined in:
lib/svg_conform/errors/validation_notice.rb

Overview

Validation notice (informational message, not an error)

Represents informational notices during validation, such as external reference notices or other non-error messages.

Instance Attribute Summary collapse

Attributes inherited from Base

#message, #node, #type

Instance Method Summary collapse

Methods inherited from Base

#column, #element_name, #line

Constructor Details

#initialize(type:, node:, message:, data: {}) ⇒ ValidationNotice

Returns a new instance of ValidationNotice.



14
15
16
17
# File 'lib/svg_conform/errors/validation_notice.rb', line 14

def initialize(type:, node:, message:, data: {})
  super(type: type, node: node, message: message)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



12
13
14
# File 'lib/svg_conform/errors/validation_notice.rb', line 12

def data
  @data
end

Instance Method Details

#to_hObject



19
20
21
22
23
24
25
26
27
# File 'lib/svg_conform/errors/validation_notice.rb', line 19

def to_h
  {
    type: @type,
    message: @message,
    line: line,
    column: column,
    data: @data,
  }
end