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.



311
312
313
314
315
316
317
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 311

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.



309
310
311
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 309

def errors
  @errors
end

#schemas_checkedObject (readonly)

Returns the value of attribute schemas_checked.



309
310
311
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 309

def schemas_checked
  @schemas_checked
end

#validObject (readonly)

Returns the value of attribute valid.



309
310
311
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 309

def valid
  @valid
end

#versionObject (readonly)

Returns the value of attribute version.



309
310
311
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 309

def version
  @version
end

#warningsObject (readonly)

Returns the value of attribute warnings.



309
310
311
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 309

def warnings
  @warnings
end

Instance Method Details

#to_hObject



319
320
321
322
323
324
325
326
327
328
329
# File 'lib/lutaml/xsd/xsd_spec_validator.rb', line 319

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