Class: Rafflesia::BlastPackSegmentRef
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::BlastPackSegmentRef
- Defined in:
- lib/rafflesia/sequences/blast_pack_segment_ref.rb
Constant Summary collapse
- HASH_ATTRS =
{ block_bytes: :block_bytes, block_count: :block_count, block_size_bytes: :block_size_bytes, content_sha256: :content_sha_256, manifest_object: :manifest_object, manifest_object_id: :manifest_object_id, role: :role, root_object: :root_object, segment_id: :segment_id }.freeze
Instance Attribute Summary collapse
-
#block_bytes ⇒ Object
Returns the value of attribute block_bytes.
-
#block_count ⇒ Object
Returns the value of attribute block_count.
-
#block_size_bytes ⇒ Object
Returns the value of attribute block_size_bytes.
-
#content_sha_256 ⇒ Object
Returns the value of attribute content_sha_256.
-
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
-
#manifest_object_id ⇒ Object
Returns the value of attribute manifest_object_id.
-
#role ⇒ Object
Returns the value of attribute role.
-
#root_object ⇒ Object
Returns the value of attribute root_object.
-
#segment_id ⇒ Object
Returns the value of attribute segment_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ BlastPackSegmentRef
constructor
A new instance of BlastPackSegmentRef.
Constructor Details
#initialize(json) ⇒ BlastPackSegmentRef
Returns a new instance of BlastPackSegmentRef.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 31 def initialize(json) super() hash = self.class.normalize(json) @block_bytes = hash[:block_bytes] @block_count = hash[:block_count] @block_size_bytes = hash[:block_size_bytes] @content_sha_256 = hash[:content_sha256] @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil @manifest_object_id = hash[:manifest_object_id] @role = hash[:role] @root_object = hash[:root_object] ? Rafflesia::ObjectRef.new(hash[:root_object]) : nil @segment_id = hash[:segment_id] end |
Instance Attribute Details
#block_bytes ⇒ Object
Returns the value of attribute block_bytes.
20 21 22 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20 def block_bytes @block_bytes end |
#block_count ⇒ Object
Returns the value of attribute block_count.
20 21 22 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20 def block_count @block_count end |
#block_size_bytes ⇒ Object
Returns the value of attribute block_size_bytes.
20 21 22 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20 def block_size_bytes @block_size_bytes end |
#content_sha_256 ⇒ Object
Returns the value of attribute content_sha_256.
20 21 22 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20 def content_sha_256 @content_sha_256 end |
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
20 21 22 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20 def manifest_object @manifest_object end |
#manifest_object_id ⇒ Object
Returns the value of attribute manifest_object_id.
20 21 22 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20 def manifest_object_id @manifest_object_id end |
#role ⇒ Object
Returns the value of attribute role.
20 21 22 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20 def role @role end |
#root_object ⇒ Object
Returns the value of attribute root_object.
20 21 22 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20 def root_object @root_object end |
#segment_id ⇒ Object
Returns the value of attribute segment_id.
20 21 22 |
# File 'lib/rafflesia/sequences/blast_pack_segment_ref.rb', line 20 def segment_id @segment_id end |