Class: Rafflesia::DatasetCompaction
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatasetCompaction
- Defined in:
- lib/rafflesia/datasets/dataset_compaction.rb
Constant Summary collapse
- HASH_ATTRS =
{ compacted_artifact_count: :compacted_artifact_count, is_compacted: :is_compacted, method: :method, row_count: :row_count, shard_size: :shard_size, source_artifact_count: :source_artifact_count, tables: :tables }.freeze
Instance Attribute Summary collapse
-
#compacted_artifact_count ⇒ Object
Returns the value of attribute compacted_artifact_count.
-
#is_compacted ⇒ Object
Returns the value of attribute is_compacted.
-
#method ⇒ Object
Returns the value of attribute method.
-
#row_count ⇒ Object
Returns the value of attribute row_count.
-
#shard_size ⇒ Object
Returns the value of attribute shard_size.
-
#source_artifact_count ⇒ Object
Returns the value of attribute source_artifact_count.
-
#tables ⇒ Object
Returns the value of attribute tables.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatasetCompaction
constructor
A new instance of DatasetCompaction.
Constructor Details
#initialize(json) ⇒ DatasetCompaction
Returns a new instance of DatasetCompaction.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compaction.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @compacted_artifact_count = hash[:compacted_artifact_count] @is_compacted = hash[:is_compacted] @method = hash[:method] @row_count = hash[:row_count] @shard_size = hash[:shard_size] @source_artifact_count = hash[:source_artifact_count] @tables = (hash[:tables] || []).map { |item| item ? Rafflesia::DatasetTableCompaction.new(item) : nil } end |
Instance Attribute Details
#compacted_artifact_count ⇒ Object
Returns the value of attribute compacted_artifact_count.
18 19 20 |
# File 'lib/rafflesia/datasets/dataset_compaction.rb', line 18 def compacted_artifact_count @compacted_artifact_count end |
#is_compacted ⇒ Object
Returns the value of attribute is_compacted.
18 19 20 |
# File 'lib/rafflesia/datasets/dataset_compaction.rb', line 18 def is_compacted @is_compacted end |
#method ⇒ Object
Returns the value of attribute method.
18 19 20 |
# File 'lib/rafflesia/datasets/dataset_compaction.rb', line 18 def method @method end |
#row_count ⇒ Object
Returns the value of attribute row_count.
18 19 20 |
# File 'lib/rafflesia/datasets/dataset_compaction.rb', line 18 def row_count @row_count end |
#shard_size ⇒ Object
Returns the value of attribute shard_size.
18 19 20 |
# File 'lib/rafflesia/datasets/dataset_compaction.rb', line 18 def shard_size @shard_size end |
#source_artifact_count ⇒ Object
Returns the value of attribute source_artifact_count.
18 19 20 |
# File 'lib/rafflesia/datasets/dataset_compaction.rb', line 18 def source_artifact_count @source_artifact_count end |
#tables ⇒ Object
Returns the value of attribute tables.
18 19 20 |
# File 'lib/rafflesia/datasets/dataset_compaction.rb', line 18 def tables @tables end |