Module: Tins::TimeFreezer

Defined in:
lib/tins/xt/time_freezer.rb

Class Method Summary collapse

Class Method Details

.freeze(time) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/tins/xt/time_freezer.rb', line 6

def self.freeze(time)
  Time.dummy(time) do
    DateTime.dummy(time) do
      Date.dummy(time) do
        yield
      end
    end
  end
end