Module: ActiveMerchant::Utils

Defined in:
lib/active_utils/common/utils.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.generate_unique_idObject



5
6
7
# File 'lib/active_utils/common/utils.rb', line 5

def generate_unique_id
  SecureRandom.hex(16)
end

Instance Method Details

#deprecated(message) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/active_utils/common/utils.rb', line 11

def deprecated(message)
  warning = Kernel.caller[1] + message
  if respond_to?(:logger) && logger.present?
    logger.warn(warning)
  else
    warn(warning)
  end
end