module GroundhogDay::DateTimeExtensions
Public Instance Methods
now()
click to toggle source
Calls superclass method
# File lib/groundhog_day/datetime_extensions.rb, line 3 def now if GroundhogDay.enabled? actual_now = super DateTime.new GroundhogDay.date.year, GroundhogDay.date.month, GroundhogDay.date.day, actual_now.hour, actual_now.min, actual_now.sec, actual_now.offset, actual_now.sec_fraction else super end end