Class: Rafflesia::DatasetConfigRef
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatasetConfigRef
- Defined in:
- lib/rafflesia/foundry/dataset_config_ref.rb
Constant Summary collapse
- HASH_ATTRS =
{ description: :description, id: :id, name: :name, shard_ids: :shard_ids }.freeze
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#shard_ids ⇒ Object
Returns the value of attribute shard_ids.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatasetConfigRef
constructor
A new instance of DatasetConfigRef.
Constructor Details
#initialize(json) ⇒ DatasetConfigRef
Returns a new instance of DatasetConfigRef.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @description = hash[:description] @id = hash[:id] @name = hash[:name] @shard_ids = (hash[:shard_ids] || []) end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
15 16 17 |
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 15 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
15 16 17 |
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 15 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 15 def name @name end |
#shard_ids ⇒ Object
Returns the value of attribute shard_ids.
15 16 17 |
# File 'lib/rafflesia/foundry/dataset_config_ref.rb', line 15 def shard_ids @shard_ids end |