Class: Rafflesia::DatasetManifestStructure
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatasetManifestStructure
- 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
-
#format ⇒ Object
Returns the value of attribute format.
-
#object ⇒ Object
Returns the value of attribute object.
-
#source_path ⇒ Object
Returns the value of attribute source_path.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
-
#target_id ⇒ Object
Returns the value of attribute target_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatasetManifestStructure
constructor
A new instance of DatasetManifestStructure.
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
#format ⇒ Object
Returns the value of attribute format.
16 17 18 |
# File 'lib/rafflesia/datasets/dataset_manifest_structure.rb', line 16 def format @format end |
#object ⇒ Object
Returns the value of attribute object.
16 17 18 |
# File 'lib/rafflesia/datasets/dataset_manifest_structure.rb', line 16 def object @object end |
#source_path ⇒ Object
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_id ⇒ Object
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_id ⇒ Object
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 |