Class: Rafflesia::DatasetStructureDiff

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

Constant Summary collapse

HASH_ATTRS =
{
  object_id_a: :object_id_a,
  object_id_b: :object_id_b,
  sha256_a: :sha_256_a,
  sha256_b: :sha_256_b,
  size_bytes_a: :size_bytes_a,
  size_bytes_b: :size_bytes_b,
  structure_id: :structure_id,
  target_id: :target_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetStructureDiff

Returns a new instance of DatasetStructureDiff.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/datasets/dataset_structure_diff.rb', line 29

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @object_id_a = hash[:object_id_a]
  @object_id_b = hash[:object_id_b]
  @sha_256_a = hash[:sha256_a]
  @sha_256_b = hash[:sha256_b]
  @size_bytes_a = hash[:size_bytes_a]
  @size_bytes_b = hash[:size_bytes_b]
  @structure_id = hash[:structure_id]
  @target_id = hash[:target_id]
end

Instance Attribute Details

#object_id_aObject

Returns the value of attribute object_id_a.



19
20
21
# File 'lib/rafflesia/datasets/dataset_structure_diff.rb', line 19

def object_id_a
  @object_id_a
end

#object_id_bObject

Returns the value of attribute object_id_b.



19
20
21
# File 'lib/rafflesia/datasets/dataset_structure_diff.rb', line 19

def object_id_b
  @object_id_b
end

#sha_256_aObject

Returns the value of attribute sha_256_a.



19
20
21
# File 'lib/rafflesia/datasets/dataset_structure_diff.rb', line 19

def sha_256_a
  @sha_256_a
end

#sha_256_bObject

Returns the value of attribute sha_256_b.



19
20
21
# File 'lib/rafflesia/datasets/dataset_structure_diff.rb', line 19

def sha_256_b
  @sha_256_b
end

#size_bytes_aObject

Returns the value of attribute size_bytes_a.



19
20
21
# File 'lib/rafflesia/datasets/dataset_structure_diff.rb', line 19

def size_bytes_a
  @size_bytes_a
end

#size_bytes_bObject

Returns the value of attribute size_bytes_b.



19
20
21
# File 'lib/rafflesia/datasets/dataset_structure_diff.rb', line 19

def size_bytes_b
  @size_bytes_b
end

#structure_idObject

Returns the value of attribute structure_id.



19
20
21
# File 'lib/rafflesia/datasets/dataset_structure_diff.rb', line 19

def structure_id
  @structure_id
end

#target_idObject

Returns the value of attribute target_id.



19
20
21
# File 'lib/rafflesia/datasets/dataset_structure_diff.rb', line 19

def target_id
  @target_id
end