Module: Mnemosyne::Helper
Instance Method Summary collapse
Instance Method Details
#epoch(n, length) ⇒ Object
3 4 5 |
# File 'lib/mneme/helper.rb', line 3 def epoch(n, length) (Time.now.to_i / length) - n end |
#epoch_name(namespace, n, length) ⇒ Object
7 8 9 |
# File 'lib/mneme/helper.rb', line 7 def epoch_name(namespace, n, length) "mneme-#{namespace}-#{epoch(n, length)}" end |