Module: Spectre::Helpers

Defined in:
lib/spectre/helpers.rb

Class Method Summary collapse

Class Method Details

.nowObject



131
132
133
# File 'lib/spectre/helpers.rb', line 131

def now
  Time.now
end

.uuid(length = nil) ⇒ Object



125
126
127
128
129
# File 'lib/spectre/helpers.rb', line 125

def uuid length = nil
  return SecureRandom.hex(length / 2) if length

  SecureRandom.uuid
end