Class: Rafflesia::DiamondDbDescribeData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DiamondDbDescribeData
- Defined in:
- lib/rafflesia/sequences/diamond_db_describe_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifact_count: :artifact_count, artifacts: :artifacts, manifest: :manifest, manifest_path: :manifest_path, ref: :ref, registry_record: :registry_record, total_size_bytes: :total_size_bytes }.freeze
Instance Attribute Summary collapse
-
#artifact_count ⇒ Object
Returns the value of attribute artifact_count.
-
#artifacts ⇒ Object
Returns the value of attribute artifacts.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#registry_record ⇒ Object
Returns the value of attribute registry_record.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
Instance Method Summary collapse
-
#initialize(json) ⇒ DiamondDbDescribeData
constructor
A new instance of DiamondDbDescribeData.
Constructor Details
#initialize(json) ⇒ DiamondDbDescribeData
Returns a new instance of DiamondDbDescribeData.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/sequences/diamond_db_describe_data.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @artifact_count = hash[:artifact_count] @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::DiamondDbArtifactState.new(item) : nil } @manifest = hash[:manifest] ? Rafflesia::DiamondDbManifest.new(hash[:manifest]) : nil @manifest_path = hash[:manifest_path] @ref = hash[:ref] @registry_record = hash[:registry_record] ? Rafflesia::DiamondDbRegistryRecord.new(hash[:registry_record]) : nil @total_size_bytes = hash[:total_size_bytes] end |
Instance Attribute Details
#artifact_count ⇒ Object
Returns the value of attribute artifact_count.
18 19 20 |
# File 'lib/rafflesia/sequences/diamond_db_describe_data.rb', line 18 def artifact_count @artifact_count end |
#artifacts ⇒ Object
Returns the value of attribute artifacts.
18 19 20 |
# File 'lib/rafflesia/sequences/diamond_db_describe_data.rb', line 18 def artifacts @artifacts end |
#manifest ⇒ Object
Returns the value of attribute manifest.
18 19 20 |
# File 'lib/rafflesia/sequences/diamond_db_describe_data.rb', line 18 def manifest @manifest end |
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
18 19 20 |
# File 'lib/rafflesia/sequences/diamond_db_describe_data.rb', line 18 def manifest_path @manifest_path end |
#ref ⇒ Object
Returns the value of attribute ref.
18 19 20 |
# File 'lib/rafflesia/sequences/diamond_db_describe_data.rb', line 18 def ref @ref end |
#registry_record ⇒ Object
Returns the value of attribute registry_record.
18 19 20 |
# File 'lib/rafflesia/sequences/diamond_db_describe_data.rb', line 18 def registry_record @registry_record end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
18 19 20 |
# File 'lib/rafflesia/sequences/diamond_db_describe_data.rb', line 18 def total_size_bytes @total_size_bytes end |