Class: Lutaml::Xsd::SpecComplianceReport

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/xsd/xsd_spec_validator.rb

Overview

Value object for validation report

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version:, valid:, errors:, warnings:, schemas_checked:) ⇒ SpecComplianceReport

Returns a new instance of SpecComplianceReport.



315
316
317
318
319
320
321
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 315

def initialize(version:, valid:, errors:, warnings:, schemas_checked:)
  @version = version
  @valid = valid
  @errors = errors
  @warnings = warnings
  @schemas_checked = schemas_checked
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



313
314
315
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 313

def errors
  @errors
end

#schemas_checkedObject (readonly)

Returns the value of attribute schemas_checked.



313
314
315
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 313

def schemas_checked
  @schemas_checked
end

#validObject (readonly)

Returns the value of attribute valid.



313
314
315
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 313

def valid
  @valid
end

#versionObject (readonly)

Returns the value of attribute version.



313
314
315
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 313

def version
  @version
end

#warningsObject (readonly)

Returns the value of attribute warnings.



313
314
315
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 313

def warnings
  @warnings
end

Instance Method Details

#to_hObject



323
324
325
326
327
328
329
330
331
332
333
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 323

def to_h
  {
    xsd_version: version,
    valid: valid,
    schemas_checked: schemas_checked,
    errors: errors,
    warnings: warnings,
    error_count: errors.size,
    warning_count: warnings.size,
  }
end