Class: Rafflesia::DatasetManifestStructure

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/datasets/dataset_manifest_structure.rb

Constant Summary collapse

HASH_ATTRS =
{
  format: :format,
  object: :object,
  source_path: :source_path,
  structure_id: :structure_id,
  target_id: :target_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetManifestStructure

Returns a new instance of DatasetManifestStructure.



23
24
25
26
27
28
29
30
31
# File 'lib/rafflesia/datasets/dataset_manifest_structure.rb', line 23

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @format = hash[:format]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @source_path = hash[:source_path]
  @structure_id = hash[:structure_id]
  @target_id = hash[:target_id]
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



16
17
18
# File 'lib/rafflesia/datasets/dataset_manifest_structure.rb', line 16

def format
  @format
end

#objectObject

Returns the value of attribute object.



16
17
18
# File 'lib/rafflesia/datasets/dataset_manifest_structure.rb', line 16

def object
  @object
end

#source_pathObject

Returns the value of attribute source_path.



16
17
18
# File 'lib/rafflesia/datasets/dataset_manifest_structure.rb', line 16

def source_path
  @source_path
end

#structure_idObject

Returns the value of attribute structure_id.



16
17
18
# File 'lib/rafflesia/datasets/dataset_manifest_structure.rb', line 16

def structure_id
  @structure_id
end

#target_idObject

Returns the value of attribute target_id.



16
17
18
# File 'lib/rafflesia/datasets/dataset_manifest_structure.rb', line 16

def target_id
  @target_id
end