Class: Sbmt::Outbox::PartitionStrategies::HashPartitioning

Inherits:
DryInteractor
  • Object
show all
Defined in:
app/interactors/sbmt/outbox/partition_strategies/hash_partitioning.rb

Instance Method Summary collapse

Methods inherited from DryInteractor

call

Instance Method Details

#callObject



12
13
14
15
16
# File 'app/interactors/sbmt/outbox/partition_strategies/hash_partitioning.rb', line 12

def call
  Success(
    Digest::SHA1.hexdigest(key.to_s).to_i(16) % bucket_size
  )
end