Sha256: ee0bf320b8fb1479c96d4f9f5c9eeff2b6d1d40db1a2c5a59347506c8d3412ed
Contents?: true
Size: 532 Bytes
Versions: 125
Compression:
Stored size: 532 Bytes
Contents
module Bunny # Used to generate consumer tags in the client 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
125 entries across 125 versions & 2 rubygems