Class: Rafflesia::DiamondCatalogShardData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DiamondCatalogShardData
- 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
-
#command ⇒ Object
Returns the value of attribute command.
-
#database ⇒ Object
Returns the value of attribute database.
-
#database_path ⇒ Object
Returns the value of attribute database_path.
-
#db_key ⇒ Object
Returns the value of attribute db_key.
-
#db_prefix ⇒ Object
Returns the value of attribute db_prefix.
-
#shard_id ⇒ Object
Returns the value of attribute shard_id.
-
#source_path ⇒ Object
Returns the value of attribute source_path.
Instance Method Summary collapse
-
#initialize(json) ⇒ DiamondCatalogShardData
constructor
A new instance of DiamondCatalogShardData.
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
#command ⇒ Object
Returns the value of attribute command.
18 19 20 |
# File 'lib/rafflesia/sequences/diamond_catalog_shard_data.rb', line 18 def command @command end |
#database ⇒ Object
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_path ⇒ Object
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_key ⇒ Object
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_prefix ⇒ Object
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_id ⇒ Object
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_path ⇒ Object
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 |