Sha256: c92be98cc370f468dd6d0935bc2f57fce554b91be8491406322716edba93e78c

Contents?: true

Size: 260 Bytes

Versions: 4

Compression:

Stored size: 260 Bytes

Contents

module KnifeContainer

  module Helpers
    #
    # Generates a short, but random UID for instances.
    #
    # @return [String]
    #
    def random_uid
      require 'securerandom' unless defined?(SecureRandom)
      SecureRandom.hex(3)
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
knife-container-0.2.4 lib/knife-container/helpers.rb
knife-container-0.2.2 lib/knife-container/helpers.rb
knife-container-0.2.1 lib/knife-container/helpers.rb
knife-container-0.2.0 lib/knife-container/helpers.rb