Class: Rafflesia::DiamondCatalogShardData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/diamond_catalog_shard_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  command: :command,
  database: :database,
  database_path: :database_path,
  db_key: :db_key,
  db_prefix: :db_prefix,
  shard_id: :shard_id,
  source_path: :source_path
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DiamondCatalogShardData

Returns a new instance of DiamondCatalogShardData.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/sequences/diamond_catalog_shard_data.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @command = (hash[:command] || [])
  @database = hash[:database] ? Rafflesia::DiamondDbArtifact.new(hash[:database]) : nil
  @database_path = hash[:database_path]
  @db_key = hash[:db_key]
  @db_prefix = hash[:db_prefix]
  @shard_id = hash[:shard_id]
  @source_path = hash[:source_path]
end

Instance Attribute Details

#commandObject

Returns the value of attribute command.



18
19
20
# File 'lib/rafflesia/sequences/diamond_catalog_shard_data.rb', line 18

def command
  @command
end

#databaseObject

Returns the value of attribute database.



18
19
20
# File 'lib/rafflesia/sequences/diamond_catalog_shard_data.rb', line 18

def database
  @database
end

#database_pathObject

Returns the value of attribute database_path.



18
19
20
# File 'lib/rafflesia/sequences/diamond_catalog_shard_data.rb', line 18

def database_path
  @database_path
end

#db_keyObject

Returns the value of attribute db_key.



18
19
20
# File 'lib/rafflesia/sequences/diamond_catalog_shard_data.rb', line 18

def db_key
  @db_key
end

#db_prefixObject

Returns the value of attribute db_prefix.



18
19
20
# File 'lib/rafflesia/sequences/diamond_catalog_shard_data.rb', line 18

def db_prefix
  @db_prefix
end

#shard_idObject

Returns the value of attribute shard_id.



18
19
20
# File 'lib/rafflesia/sequences/diamond_catalog_shard_data.rb', line 18

def shard_id
  @shard_id
end

#source_pathObject

Returns the value of attribute source_path.



18
19
20
# File 'lib/rafflesia/sequences/diamond_catalog_shard_data.rb', line 18

def source_path
  @source_path
end