Class: Clock::Substitute
- Inherits:
-
Object
- Object
- Clock::Substitute
- Includes:
- Clock
- Defined in:
- lib/clock/substitute.rb
Defined Under Namespace
Classes: SubstituteSystemTime
Instance Attribute Summary collapse
Instance Method Summary collapse
Methods included from Clock
#canonize, #elapsed_milliseconds, included, #iso8601, local, #now, #parse, #timestamp, utc
Methods included from Now
Methods included from Canonize
Methods included from ISO8601
Methods included from Parse
Methods included from ElapsedMilliseconds
Methods included from Timestamp
Instance Attribute Details
#system_time ⇒ Object
7 8 9 |
# File 'lib/clock/substitute.rb', line 7 def system_time @system_time ||= Clock.system_time end |
Instance Method Details
#now=(val) ⇒ Object
11 12 13 14 15 |
# File 'lib/clock/substitute.rb', line 11 def now=(val) self.system_time = SubstituteSystemTime.new system_time.now = val system_time end |