Class: Rafflesia::EnvelopeOntologyPathListData

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

Constant Summary collapse

HASH_ATTRS =
{
  data: :data,
  error: :error,
  evidence: :evidence,
  ok: :ok,
  provenance: :provenance,
  warnings: :warnings
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ EnvelopeOntologyPathListData

Returns a new instance of EnvelopeOntologyPathListData.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/ontology/envelope_ontology_path_list_data.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @data = hash[:data] ? Rafflesia::OntologyPathListData.new(hash[:data]) : nil
  @error = hash[:error] ? Rafflesia::ApiErrorBody.new(hash[:error]) : nil
  @evidence = hash[:evidence] ? Rafflesia::EvidenceSummary.new(hash[:evidence]) : nil
  @ok = hash[:ok]
  @provenance = hash[:provenance] ? Rafflesia::Provenance.new(hash[:provenance]) : nil
  @warnings = (hash[:warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil }
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



17
18
19
# File 'lib/rafflesia/ontology/envelope_ontology_path_list_data.rb', line 17

def data
  @data
end

#errorObject

Returns the value of attribute error.



17
18
19
# File 'lib/rafflesia/ontology/envelope_ontology_path_list_data.rb', line 17

def error
  @error
end

#evidenceObject

Returns the value of attribute evidence.



17
18
19
# File 'lib/rafflesia/ontology/envelope_ontology_path_list_data.rb', line 17

def evidence
  @evidence
end

#okObject

Returns the value of attribute ok.



17
18
19
# File 'lib/rafflesia/ontology/envelope_ontology_path_list_data.rb', line 17

def ok
  @ok
end

#provenanceObject

Returns the value of attribute provenance.



17
18
19
# File 'lib/rafflesia/ontology/envelope_ontology_path_list_data.rb', line 17

def provenance
  @provenance
end

#warningsObject

Returns the value of attribute warnings.



17
18
19
# File 'lib/rafflesia/ontology/envelope_ontology_path_list_data.rb', line 17

def warnings
  @warnings
end