Class: Rafflesia::DatasetSplitRef
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatasetSplitRef
- Defined in:
- lib/rafflesia/foundry/dataset_split_ref.rb
Constant Summary collapse
- HASH_ATTRS =
{ config_id: :config_id, id: :id, name: :name, partition: :partition, record_count: :record_count, shard_ids: :shard_ids }.freeze
Instance Attribute Summary collapse
-
#config_id ⇒ Object
Returns the value of attribute config_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#partition ⇒ Object
Returns the value of attribute partition.
-
#record_count ⇒ Object
Returns the value of attribute record_count.
-
#shard_ids ⇒ Object
Returns the value of attribute shard_ids.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatasetSplitRef
constructor
A new instance of DatasetSplitRef.
Constructor Details
#initialize(json) ⇒ DatasetSplitRef
Returns a new instance of DatasetSplitRef.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @config_id = hash[:config_id] @id = hash[:id] @name = hash[:name] @partition = hash[:partition] @record_count = hash[:record_count] @shard_ids = (hash[:shard_ids] || []) end |
Instance Attribute Details
#config_id ⇒ Object
Returns the value of attribute config_id.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17 def config_id @config_id end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17 def name @name end |
#partition ⇒ Object
Returns the value of attribute partition.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17 def partition @partition end |
#record_count ⇒ Object
Returns the value of attribute record_count.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17 def record_count @record_count end |
#shard_ids ⇒ Object
Returns the value of attribute shard_ids.
17 18 19 |
# File 'lib/rafflesia/foundry/dataset_split_ref.rb', line 17 def shard_ids @shard_ids end |