Class: DateTime

Inherits:
Object
  • Object
show all
Defined in:
lib/time_freeze.rb

Class Method Summary collapse

Class Method Details

.nowObject



60
61
62
63
64
65
66
# File 'lib/time_freeze.rb', line 60

def now
  if TimeFreeze.frozen_time
    TimeFreeze.frozen_time.to_datetime
  else
    self.now_unfrozen
  end
end

.now_unfrozenObject



59
# File 'lib/time_freeze.rb', line 59

alias :now_unfrozen :now