Sha256: c7391af80f9617529668cefb4b1d9bb411f3ca3355379c7a7b311ca5a505dd99
Contents?: true
Size: 535 Bytes
Versions: 17
Compression:
Stored size: 535 Bytes
Contents
module Hiccup module Inferable class DatesEnumerator def initialize(dates) @dates = dates @last_index = @dates.length - 1 @index = -1 end attr_reader :index def done? @index == @last_index end def next @index += 1 raise OutOfRangeException if @index > @last_index @dates[@index] end def rewind_by(n) @index -= n @index = -1 if @index < -1 end end end end
Version data entries
17 entries across 17 versions & 1 rubygems