Sha256: 92e767e4e279a749403e7afa831c9312970815849b84645ee70df16662711fae

Contents?: true

Size: 367 Bytes

Versions: 1

Compression:

Stored size: 367 Bytes

Contents

require 'time_travel/time_extensions'
require 'time_travel/string_extensions'
require 'time_travel/date_extensions'

Time.send(:include, TimeTravel::TimeExtensions)
String.send(:include, TimeTravel::StringExtensions)
Date.send(:include, TimeTravel::DateExtensions)

def at_time(time)
  Time.now = time
  begin
    yield Time.now
  ensure
    Time.now = nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
time_travel-0.1.0 lib/time_travel.rb