Sha256: 9f9880eb30dcf604c27bf1b8ba66e0193a3caf5074fffab6455adb9022eb746d
Contents?: true
Size: 538 Bytes
Versions: 28
Compression:
Stored size: 538 Bytes
Contents
module GorgonBunny # 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
28 entries across 28 versions & 1 rubygems