Class: Nfcollector::CategoryPartition
- Defined in:
- lib/nfcollector/category_partition.rb
Instance Attribute Summary
Attributes inherited from Partition
#account_id, #headers, #partition_id, #rows
Class Method Summary collapse
-
.partition_id(category_id) ⇒ Object
Calculates the ID for this partition Think of it as a statistical ‘bin’.
Instance Method Summary collapse
Methods inherited from Partition
#add_row, #file_name, get_partitioner, #initialize, #table_name
Constructor Details
This class inherits a constructor from Nfcollector::Partition
Class Method Details
.partition_id(category_id) ⇒ Object
Calculates the ID for this partition Think of it as a statistical ‘bin’
In this case we just use the category id
9 10 11 |
# File 'lib/nfcollector/category_partition.rb', line 9 def self.partition_id(category_id) category_id end |
Instance Method Details
#keys ⇒ Object
13 14 15 |
# File 'lib/nfcollector/category_partition.rb', line 13 def keys { account_id: account_id, category_id: partition_id } end |