Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/time_iterator/core_ext.rb
Instance Method Summary collapse
-
#up_to(time) ⇒ TimeIterator
(also: #down_to)
Create new time iterator from ‘self` till specified `time`.
Instance Method Details
#up_to(time) ⇒ TimeIterator Also known as: down_to
Create new time iterator from ‘self` till specified `time`. Syntax sugar for (where `self` is `start`):
start = Time.new 1970, 1, 1
stop = Time.new 1970, 2, 1
TimeIterator.new start, stop
13 14 15 |
# File 'lib/time_iterator/core_ext.rb', line 13 def up_to time TimeIterator.new self, time end |