Class: Clock::Substitute
- Inherits:
-
Object
- Object
- Clock::Substitute
- Includes:
- Clock
- Defined in:
- lib/clock/substitute.rb
Defined Under Namespace
Classes: NullTime
Instance Attribute Summary collapse
Instance Method Summary collapse
Methods included from Clock
#canonize, #elapsed_milliseconds, included, 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
Instance Method Details
#iso8601(*args) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/clock/substitute.rb', line 18 def iso8601(*args) if system_time.is_a? OpenStruct return super(*args) end nil end |
#now=(val) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/clock/substitute.rb', line 11 def now=(val) system_time = OpenStruct.new system_time.now = val self.system_time = system_time system_time end |