Class: Rafflesia::FoldIndexShardManifest

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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

#artifactsObject

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_commandObject

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_baseObject

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_commandObject

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_idObject

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_indexObject

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_countObject

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

#sourcesObject

Returns the value of attribute sources.



19
20
21
# File 'lib/rafflesia/proteins/fold_index_shard_manifest.rb', line 19

def sources
  @sources
end