Class: EventDb::EventCursor

Inherits:
Object
  • Object
show all
Defined in:
lib/eventdb/calendar.rb

Defined Under Namespace

Classes: State

Instance Method Summary collapse

Constructor Details

#initialize(events) ⇒ EventCursor

Returns a new instance of EventCursor.



6
7
8
# File 'lib/eventdb/calendar.rb', line 6

def initialize( events )
  @events = events
end

Instance Method Details

#eachObject



10
11
12
13
14
15
16
# File 'lib/eventdb/calendar.rb', line 10

def each
  state = State.new
  @events.each do |event|
     state.next( event )
     yield( event, state )
  end
end