Class: Rafflesia::SequenceCatalogBuildData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::SequenceCatalogBuildData
- Defined in:
- lib/rafflesia/sequences/sequence_catalog_build_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ catalog_id: :catalog_id, content_sha256: :content_sha_256, dataset_name: :dataset_name, dataset_version: :dataset_version, entries: :entries, fasta_object: :fasta_object, manifest: :manifest, manifest_object: :manifest_object, name: :name, sequence_count: :sequence_count, source_object: :source_object, source_object_id: :source_object_id, source_path: :source_path, version: :version }.freeze
Instance Attribute Summary collapse
-
#catalog_id ⇒ Object
Returns the value of attribute catalog_id.
-
#content_sha_256 ⇒ Object
Returns the value of attribute content_sha_256.
-
#dataset_name ⇒ Object
Returns the value of attribute dataset_name.
-
#dataset_version ⇒ Object
Returns the value of attribute dataset_version.
-
#entries ⇒ Object
Returns the value of attribute entries.
-
#fasta_object ⇒ Object
Returns the value of attribute fasta_object.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
-
#name ⇒ Object
Returns the value of attribute name.
-
#sequence_count ⇒ Object
Returns the value of attribute sequence_count.
-
#source_object ⇒ Object
Returns the value of attribute source_object.
-
#source_object_id ⇒ Object
Returns the value of attribute source_object_id.
-
#source_path ⇒ Object
Returns the value of attribute source_path.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(json) ⇒ SequenceCatalogBuildData
constructor
A new instance of SequenceCatalogBuildData.
Constructor Details
#initialize(json) ⇒ SequenceCatalogBuildData
Returns a new instance of SequenceCatalogBuildData.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 41 def initialize(json) super() hash = self.class.normalize(json) @catalog_id = hash[:catalog_id] @content_sha_256 = hash[:content_sha256] @dataset_name = hash[:dataset_name] @dataset_version = hash[:dataset_version] @entries = (hash[:entries] || []).map { |item| item ? Rafflesia::SequenceCatalogEntry.new(item) : nil } @fasta_object = hash[:fasta_object] ? Rafflesia::ObjectRef.new(hash[:fasta_object]) : nil @manifest = hash[:manifest] ? Rafflesia::SequenceCatalogManifest.new(hash[:manifest]) : nil @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil @name = hash[:name] @sequence_count = hash[:sequence_count] @source_object = hash[:source_object] ? Rafflesia::ObjectRef.new(hash[:source_object]) : nil @source_object_id = hash[:source_object_id] @source_path = hash[:source_path] @version = hash[:version] end |
Instance Attribute Details
#catalog_id ⇒ Object
Returns the value of attribute catalog_id.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def catalog_id @catalog_id end |
#content_sha_256 ⇒ Object
Returns the value of attribute content_sha_256.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def content_sha_256 @content_sha_256 end |
#dataset_name ⇒ Object
Returns the value of attribute dataset_name.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def dataset_name @dataset_name end |
#dataset_version ⇒ Object
Returns the value of attribute dataset_version.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def dataset_version @dataset_version end |
#entries ⇒ Object
Returns the value of attribute entries.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def entries @entries end |
#fasta_object ⇒ Object
Returns the value of attribute fasta_object.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def fasta_object @fasta_object end |
#manifest ⇒ Object
Returns the value of attribute manifest.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def manifest @manifest end |
#manifest_object ⇒ Object
Returns the value of attribute manifest_object.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def manifest_object @manifest_object end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def name @name end |
#sequence_count ⇒ Object
Returns the value of attribute sequence_count.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def sequence_count @sequence_count end |
#source_object ⇒ Object
Returns the value of attribute source_object.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def source_object @source_object end |
#source_object_id ⇒ Object
Returns the value of attribute source_object_id.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def source_object_id @source_object_id end |
#source_path ⇒ Object
Returns the value of attribute source_path.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def source_path @source_path end |
#version ⇒ Object
Returns the value of attribute version.
25 26 27 |
# File 'lib/rafflesia/sequences/sequence_catalog_build_data.rb', line 25 def version @version end |