Sha256: f40ca984180f9fba4bee83a3eed226fa3c9aec455ffb104d03d668844d2156e2
Contents?: true
Size: 483 Bytes
Versions: 13
Compression:
Stored size: 483 Bytes
Contents
module Bunny class ConsumerTagGenerator # # API # # @return [String] Generated consumer tag def generate "#{Kernel.rand}-#{Time.now.to_i * 1000}-#{Kernel.rand(999_999_999_999)}" end # generate # Unique string supposed to be used as a consumer tag. # # @return [String] Unique string. # @api public def generate_prefixed(name = "bunny") "#{name}-#{Time.now.to_i * 1000}-#{Kernel.rand(999_999_999_999)}" end end end
Version data entries
13 entries across 13 versions & 1 rubygems