Module: Kameleoon::Utils
- Defined in:
- lib/kameleoon/utils.rb
Overview
Utils is a helper module for project
Constant Summary collapse
- ALPHA_NUMERIC_CHARS =
'ABCDEF0123456789'
Class Method Summary collapse
Class Method Details
.generate_random_string(length) ⇒ Object
12 13 14 |
# File 'lib/kameleoon/utils.rb', line 12 def self.generate_random_string(length) (1..length).map { ALPHA_NUMERIC_CHARS[rand(ALPHA_NUMERIC_CHARS.length)] }.join end |
.in_seconds(days) ⇒ Object
8 9 10 |
# File 'lib/kameleoon/utils.rb', line 8 def self.in_seconds(days) days * 60 * 60 * 24 end |