Class: Rafflesia::BlastDbArtifact
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::BlastDbArtifact
- Defined in:
- lib/rafflesia/sequences/blast_db_artifact.rb
Constant Summary collapse
- HASH_ATTRS =
{ content_type: :content_type, file_name: :file_name, object: :object, path: :path, role: :role, sha256: :sha_256, size_bytes: :size_bytes }.freeze
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#object ⇒ Object
Returns the value of attribute object.
-
#path ⇒ Object
Returns the value of attribute path.
-
#role ⇒ Object
Returns the value of attribute role.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
Instance Method Summary collapse
-
#initialize(json) ⇒ BlastDbArtifact
constructor
A new instance of BlastDbArtifact.
Constructor Details
#initialize(json) ⇒ BlastDbArtifact
Returns a new instance of BlastDbArtifact.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/sequences/blast_db_artifact.rb', line 27 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] @size_bytes = hash[:size_bytes] end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
18 19 20 |
# File 'lib/rafflesia/sequences/blast_db_artifact.rb', line 18 def content_type @content_type end |
#file_name ⇒ Object
Returns the value of attribute file_name.
18 19 20 |
# File 'lib/rafflesia/sequences/blast_db_artifact.rb', line 18 def file_name @file_name end |
#object ⇒ Object
Returns the value of attribute object.
18 19 20 |
# File 'lib/rafflesia/sequences/blast_db_artifact.rb', line 18 def object @object end |
#path ⇒ Object
Returns the value of attribute path.
18 19 20 |
# File 'lib/rafflesia/sequences/blast_db_artifact.rb', line 18 def path @path end |
#role ⇒ Object
Returns the value of attribute role.
18 19 20 |
# File 'lib/rafflesia/sequences/blast_db_artifact.rb', line 18 def role @role end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
18 19 20 |
# File 'lib/rafflesia/sequences/blast_db_artifact.rb', line 18 def sha_256 @sha_256 end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
18 19 20 |
# File 'lib/rafflesia/sequences/blast_db_artifact.rb', line 18 def size_bytes @size_bytes end |