Class: Rafflesia::FoldIndexShardManifest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoldIndexShardManifest
- Defined in:
- lib/rafflesia/proteins/fold_index_shard_manifest.rb
Constant Summary collapse
- HASH_ATTRS =
{ artifacts: :artifacts, build_command: :build_command, db_base: :db_base, index_command: :index_command, shard_id: :shard_id, shard_index: :shard_index, source_count: :source_count, sources: :sources }.freeze
Instance Attribute Summary collapse
-
#artifacts ⇒ Object
Returns the value of attribute artifacts.
-
#build_command ⇒ Object
Returns the value of attribute build_command.
-
#db_base ⇒ Object
Returns the value of attribute db_base.
-
#index_command ⇒ Object
Returns the value of attribute index_command.
-
#shard_id ⇒ Object
Returns the value of attribute shard_id.
-
#shard_index ⇒ Object
Returns the value of attribute shard_index.
-
#source_count ⇒ Object
Returns the value of attribute source_count.
-
#sources ⇒ Object
Returns the value of attribute sources.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoldIndexShardManifest
constructor
A new instance of FoldIndexShardManifest.
Constructor Details
#initialize(json) ⇒ FoldIndexShardManifest
Returns a new instance of FoldIndexShardManifest.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::FoldIndexArtifact.new(item) : nil } @build_command = (hash[:build_command] || []) @db_base = hash[:db_base] @index_command = (hash[:index_command] || []) @shard_id = hash[:shard_id] @shard_index = hash[:shard_index] @source_count = hash[:source_count] @sources = (hash[:sources] || []).map { |item| item ? Rafflesia::FoldIndexSource.new(item) : nil } end |
Instance Attribute Details
#artifacts ⇒ Object
Returns the value of attribute artifacts.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 19 def artifacts @artifacts end |
#build_command ⇒ Object
Returns the value of attribute build_command.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 19 def build_command @build_command end |
#db_base ⇒ Object
Returns the value of attribute db_base.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 19 def db_base @db_base end |
#index_command ⇒ Object
Returns the value of attribute index_command.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 19 def index_command @index_command end |
#shard_id ⇒ Object
Returns the value of attribute shard_id.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 19 def shard_id @shard_id end |
#shard_index ⇒ Object
Returns the value of attribute shard_index.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 19 def shard_index @shard_index end |
#source_count ⇒ Object
Returns the value of attribute source_count.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 19 def source_count @source_count end |
#sources ⇒ Object
Returns the value of attribute sources.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 19 def sources @sources end |