class SportDb::Model::MatchCursor

Public Class Methods

new( matches ) click to toggle source
# File lib/sportdb/models/utils.rb, line 7
def initialize( matches )
  @matches = matches
end

Public Instance Methods

each() { |match, state| ... } click to toggle source
# File lib/sportdb/models/utils.rb, line 11
def each
  state = MatchCursorState.new

  @matches.each do |match|
    state.next( match )
    yield( match, state )   # e.g. lets you use state.new_date?  or state.new_week? or state.new_year? etc.
  end
end