Class: Sbmt::Outbox::PartitionStrategies::NumberPartitioning
- Inherits:
-
DryInteractor
- Object
- DryInteractor
- Sbmt::Outbox::PartitionStrategies::NumberPartitioning
- Defined in:
- app/interactors/sbmt/outbox/partition_strategies/number_partitioning.rb
Instance Method Summary collapse
Methods inherited from DryInteractor
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/interactors/sbmt/outbox/partition_strategies/number_partitioning.rb', line 10 def call parsed_key = case key when Integer key else key.delete("^0-9").to_i end Success( parsed_key % bucket_size ) end |