class Chrono::Iterator

Attributes

now[RW]
source[R]

Public Class Methods

new(source, options = {}) click to toggle source
# File lib/chrono/iterator.rb, line 7
def initialize(source, options = {})
  @source = source
  @now = options[:now] || Time.now
end

Public Instance Methods

next() click to toggle source
# File lib/chrono/iterator.rb, line 12
def next
  self.now = NextTime.new(now: now, source: source).to_time
end