Class: Rafflesia::DatasetStructureCheck

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

Constant Summary collapse

HASH_ATTRS =
{
  exists: :exists,
  object_id: :object_id,
  sha256: :sha_256,
  sha256_matches: :sha_256_matches,
  size_bytes: :size_bytes,
  size_bytes_matches: :size_bytes_matches,
  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) ⇒ DatasetStructureCheck

Returns a new instance of DatasetStructureCheck.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @exists = hash[:exists]
  @object_id = hash[:object_id]
  @sha_256 = hash[:sha256]
  @sha_256_matches = hash[:sha256_matches]
  @size_bytes = hash[:size_bytes]
  @size_bytes_matches = hash[:size_bytes_matches]
  @source_path = hash[:source_path]
  @structure_id = hash[:structure_id]
  @target_id = hash[:target_id]
end

Instance Attribute Details

#existsObject

Returns the value of attribute exists.



20
21
22
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 20

def exists
  @exists
end

#object_idObject

Returns the value of attribute object_id.



20
21
22
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 20

def object_id
  @object_id
end

#sha_256Object

Returns the value of attribute sha_256.



20
21
22
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 20

def sha_256
  @sha_256
end

#sha_256_matchesObject

Returns the value of attribute sha_256_matches.



20
21
22
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 20

def sha_256_matches
  @sha_256_matches
end

#size_bytesObject

Returns the value of attribute size_bytes.



20
21
22
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 20

def size_bytes
  @size_bytes
end

#size_bytes_matchesObject

Returns the value of attribute size_bytes_matches.



20
21
22
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 20

def size_bytes_matches
  @size_bytes_matches
end

#source_pathObject

Returns the value of attribute source_path.



20
21
22
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 20

def source_path
  @source_path
end

#structure_idObject

Returns the value of attribute structure_id.



20
21
22
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 20

def structure_id
  @structure_id
end

#target_idObject

Returns the value of attribute target_id.



20
21
22
# File 'lib/rafflesia/datasets/dataset_structure_check.rb', line 20

def target_id
  @target_id
end