Class: Rafflesia::ReleaseManifest

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/release_manifest.rb

Constant Summary collapse

HASH_ATTRS =
{
  dataset: :dataset,
  kind: :kind,
  model: :model,
  ontology: :ontology
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ReleaseManifest

Returns a new instance of ReleaseManifest.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/foundry/release_manifest.rb', line 21

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @dataset = hash[:dataset] ? Rafflesia::DatasetReleaseManifest.new(hash[:dataset]) : nil
  @kind = hash[:kind]
  @model = hash[:model] ? Rafflesia::ModelReleaseManifest.new(hash[:model]) : nil
  @ontology = hash[:ontology] ? Rafflesia::OntologyReleaseManifest.new(hash[:ontology]) : nil
end

Instance Attribute Details

#datasetObject

Returns the value of attribute dataset.



15
16
17
# File 'lib/rafflesia/foundry/release_manifest.rb', line 15

def dataset
  @dataset
end

#kindObject

Returns the value of attribute kind.



15
16
17
# File 'lib/rafflesia/foundry/release_manifest.rb', line 15

def kind
  @kind
end

#modelObject

Returns the value of attribute model.



15
16
17
# File 'lib/rafflesia/foundry/release_manifest.rb', line 15

def model
  @model
end

#ontologyObject

Returns the value of attribute ontology.



15
16
17
# File 'lib/rafflesia/foundry/release_manifest.rb', line 15

def ontology
  @ontology
end