Class: Rafflesia::FoldIndexArtifact

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

Constant Summary collapse

HASH_ATTRS =
{
  content_type: :content_type,
  file_name: :file_name,
  object: :object,
  path: :path,
  role: :role,
  sha256: :sha_256,
  shard_id: :shard_id,
  size_bytes: :size_bytes
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldIndexArtifact

Returns a new instance of FoldIndexArtifact.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @content_type = hash[:content_type]
  @file_name = hash[:file_name]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @path = hash[:path]
  @role = hash[:role]
  @sha_256 = hash[:sha256]
  @shard_id = hash[:shard_id]
  @size_bytes = hash[:size_bytes]
end

Instance Attribute Details

#content_typeObject

Returns the value of attribute content_type.



19
20
21
# File 'lib/rafflesia/proteins/fold_index_artifact.rb', line 19

def content_type
  @content_type
end

#file_nameObject

Returns the value of attribute file_name.



19
20
21
# File 'lib/rafflesia/proteins/fold_index_artifact.rb', line 19

def file_name
  @file_name
end

#objectObject

Returns the value of attribute object.



19
20
21
# File 'lib/rafflesia/proteins/fold_index_artifact.rb', line 19

def object
  @object
end

#pathObject

Returns the value of attribute path.



19
20
21
# File 'lib/rafflesia/proteins/fold_index_artifact.rb', line 19

def path
  @path
end

#roleObject

Returns the value of attribute role.



19
20
21
# File 'lib/rafflesia/proteins/fold_index_artifact.rb', line 19

def role
  @role
end

#sha_256Object

Returns the value of attribute sha_256.



19
20
21
# File 'lib/rafflesia/proteins/fold_index_artifact.rb', line 19

def sha_256
  @sha_256
end

#shard_idObject

Returns the value of attribute shard_id.



19
20
21
# File 'lib/rafflesia/proteins/fold_index_artifact.rb', line 19

def shard_id
  @shard_id
end

#size_bytesObject

Returns the value of attribute size_bytes.



19
20
21
# File 'lib/rafflesia/proteins/fold_index_artifact.rb', line 19

def size_bytes
  @size_bytes
end