Module: ActiveMerchant::Utils

Included in:
Billing::Gateway
Defined in:
lib/active_merchant/common/utils.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.generate_unique_idObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/active_merchant/common/utils.rb', line 5

def generate_unique_id
  md5 = Digest::MD5.new
  now = Time.now
  md5 << now.to_s
  md5 << String(now.usec)
  md5 << String(rand(0))
  md5 << String($$)
  md5 << self.class.name
  md5.hexdigest
end

Instance Method Details

#deprecated(message) ⇒ Object



18
19
20
# File 'lib/active_merchant/common/utils.rb', line 18

def deprecated(message)
  warn(Kernel.caller[1] + message)
end