Class: Rafflesia::RegistrySnapshotData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::RegistrySnapshotData
- Defined in:
- lib/rafflesia/registry/registry_snapshot_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ compiled_snapshot_sha256: :compiled_snapshot_sha_256, compiler_version: :compiler_version, dataset_count: :dataset_count, dataset_release_count: :dataset_release_count, homology_release_count: :homology_release_count, model_count: :model_count, ontology_count: :ontology_count, schema_version: :schema_version, source_digest: :source_digest, sources: :sources }.freeze
Instance Attribute Summary collapse
-
#compiled_snapshot_sha_256 ⇒ Object
Returns the value of attribute compiled_snapshot_sha_256.
-
#compiler_version ⇒ Object
Returns the value of attribute compiler_version.
-
#dataset_count ⇒ Object
Returns the value of attribute dataset_count.
-
#dataset_release_count ⇒ Object
Returns the value of attribute dataset_release_count.
-
#homology_release_count ⇒ Object
Returns the value of attribute homology_release_count.
-
#model_count ⇒ Object
Returns the value of attribute model_count.
-
#ontology_count ⇒ Object
Returns the value of attribute ontology_count.
-
#schema_version ⇒ Object
Returns the value of attribute schema_version.
-
#source_digest ⇒ Object
Returns the value of attribute source_digest.
-
#sources ⇒ Object
Returns the value of attribute sources.
Instance Method Summary collapse
-
#initialize(json) ⇒ RegistrySnapshotData
constructor
A new instance of RegistrySnapshotData.
Constructor Details
#initialize(json) ⇒ RegistrySnapshotData
Returns a new instance of RegistrySnapshotData.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 33 def initialize(json) super() hash = self.class.normalize(json) @compiled_snapshot_sha_256 = hash[:compiled_snapshot_sha256] @compiler_version = hash[:compiler_version] @dataset_count = hash[:dataset_count] @dataset_release_count = hash[:dataset_release_count] @homology_release_count = hash[:homology_release_count] @model_count = hash[:model_count] @ontology_count = hash[:ontology_count] @schema_version = hash[:schema_version] @source_digest = hash[:source_digest] @sources = (hash[:sources] || []).map { |item| item ? Rafflesia::RegistrySourceRef.new(item) : nil } end |
Instance Attribute Details
#compiled_snapshot_sha_256 ⇒ Object
Returns the value of attribute compiled_snapshot_sha_256.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def compiled_snapshot_sha_256 @compiled_snapshot_sha_256 end |
#compiler_version ⇒ Object
Returns the value of attribute compiler_version.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def compiler_version @compiler_version end |
#dataset_count ⇒ Object
Returns the value of attribute dataset_count.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def dataset_count @dataset_count end |
#dataset_release_count ⇒ Object
Returns the value of attribute dataset_release_count.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def dataset_release_count @dataset_release_count end |
#homology_release_count ⇒ Object
Returns the value of attribute homology_release_count.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def homology_release_count @homology_release_count end |
#model_count ⇒ Object
Returns the value of attribute model_count.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def model_count @model_count end |
#ontology_count ⇒ Object
Returns the value of attribute ontology_count.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def ontology_count @ontology_count end |
#schema_version ⇒ Object
Returns the value of attribute schema_version.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def schema_version @schema_version end |
#source_digest ⇒ Object
Returns the value of attribute source_digest.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def source_digest @source_digest end |
#sources ⇒ Object
Returns the value of attribute sources.
21 22 23 |
# File 'lib/rafflesia/registry/registry_snapshot_data.rb', line 21 def sources @sources end |