Sha256: 3ef31669bef321c2e8db8c7eb73810d47365ce619b17b8e874f1033a9d334f5b
Contents?: true
Size: 463 Bytes
Versions: 1
Compression:
Stored size: 463 Bytes
Contents
# coding: utf-8 require "rubygems" require "kagemusha" musha = Kagemusha.new(Time) musha.defs(:now) { self.local(1984, 5, 11) } musha.def(:+) { |other| other } p Time.now #=> now p Time.now + 60 * 60 * 24 #=> now + 24 hours puts "---" musha.swap { p Time.now #=> 1984-05-11 00:00:00 p Time.now + 60 * 60 * 24 #=> 86400 puts "---" } p Time.now #=> now p Time.now + 60 * 60 * 24 #=> now + 24 hours puts "---"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nayutaya-kagemusha-0.1.0 | examples/first.rb |