Class: Rafflesia::OntologyValidationViolation

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/ontology/ontology_validation_violation.rb

Constant Summary collapse

HASH_ATTRS =
{
  actual: :actual,
  code: :code,
  expected: :expected,
  message: :message,
  path: :path,
  severity: :severity,
  suggested_repair: :suggested_repair
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyValidationViolation

Returns a new instance of OntologyValidationViolation.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/ontology/ontology_validation_violation.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @actual = hash[:actual]
  @code = hash[:code]
  @expected = hash[:expected]
  @message = hash[:message]
  @path = hash[:path]
  @severity = hash[:severity]
  @suggested_repair = hash[:suggested_repair]
end

Instance Attribute Details

#actualObject

Returns the value of attribute actual.



18
19
20
# File 'lib/rafflesia/ontology/ontology_validation_violation.rb', line 18

def actual
  @actual
end

#codeObject

Returns the value of attribute code.



18
19
20
# File 'lib/rafflesia/ontology/ontology_validation_violation.rb', line 18

def code
  @code
end

#expectedObject

Returns the value of attribute expected.



18
19
20
# File 'lib/rafflesia/ontology/ontology_validation_violation.rb', line 18

def expected
  @expected
end

#messageObject

Returns the value of attribute message.



18
19
20
# File 'lib/rafflesia/ontology/ontology_validation_violation.rb', line 18

def message
  @message
end

#pathObject

Returns the value of attribute path.



18
19
20
# File 'lib/rafflesia/ontology/ontology_validation_violation.rb', line 18

def path
  @path
end

#severityObject

Returns the value of attribute severity.



18
19
20
# File 'lib/rafflesia/ontology/ontology_validation_violation.rb', line 18

def severity
  @severity
end

#suggested_repairObject

Returns the value of attribute suggested_repair.



18
19
20
# File 'lib/rafflesia/ontology/ontology_validation_violation.rb', line 18

def suggested_repair
  @suggested_repair
end