Class: Rafflesia::FoldIndexVerifyData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/fold_index_verify_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  artifact_count: :artifact_count,
  artifacts: :artifacts,
  failure_count: :failure_count,
  manifest_id: :manifest_id,
  manifest_path: :manifest_path,
  ref: :ref,
  segment_roles: :segment_roles,
  target_dir: :target_dir,
  verified: :verified
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldIndexVerifyData

Returns a new instance of FoldIndexVerifyData.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_count = hash[:artifact_count]
  @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::FoldIndexArtifactState.new(item) : nil }
  @failure_count = hash[:failure_count]
  @manifest_id = hash[:manifest_id]
  @manifest_path = hash[:manifest_path]
  @ref = hash[:ref]
  @segment_roles = (hash[:segment_roles] || [])
  @target_dir = hash[:target_dir]
  @verified = hash[:verified]
end

Instance Attribute Details

#artifact_countObject

Returns the value of attribute artifact_count.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_verify_data.rb', line 20

def artifact_count
  @artifact_count
end

#artifactsObject

Returns the value of attribute artifacts.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_verify_data.rb', line 20

def artifacts
  @artifacts
end

#failure_countObject

Returns the value of attribute failure_count.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_verify_data.rb', line 20

def failure_count
  @failure_count
end

#manifest_idObject

Returns the value of attribute manifest_id.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_verify_data.rb', line 20

def manifest_id
  @manifest_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_verify_data.rb', line 20

def manifest_path
  @manifest_path
end

#refObject

Returns the value of attribute ref.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_verify_data.rb', line 20

def ref
  @ref
end

#segment_rolesObject

Returns the value of attribute segment_roles.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_verify_data.rb', line 20

def segment_roles
  @segment_roles
end

#target_dirObject

Returns the value of attribute target_dir.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_verify_data.rb', line 20

def target_dir
  @target_dir
end

#verifiedObject

Returns the value of attribute verified.



20
21
22
# File 'lib/rafflesia/proteins/fold_index_verify_data.rb', line 20

def verified
  @verified
end