module GroundhogDay::TimeExtensions

Public Instance Methods

now() click to toggle source
Calls superclass method
# File lib/groundhog_day/time_extensions.rb, line 3
def now
  if GroundhogDay.enabled?
    actual_now = super
    Time.new GroundhogDay.date.year, GroundhogDay.date.month, GroundhogDay.date.day, actual_now.hour, actual_now.min, actual_now.sec, actual_now.utc_offset
  else
    super
  end
end