Sha256: 90661706913be04ac5c48ffd10b3e29c7d4da513917984c77e9800c6090b8284
Contents?: true
Size: 562 Bytes
Versions: 2
Compression:
Stored size: 562 Bytes
Contents
# frozen_string_literal: true module FtcEvent class Qualifications attr_reader :event def initialize(event) @event = event end def name 'Qualifications' end def match(match_number) Qualification.new(event, match_number) end def matches event.db.query('SELECT match FROM quals').map { |row| row['match'] } end def each_match return enum_for(:each_match) unless block_given? matches.each do |match_number| yield match(match_number) end nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ftc_event-0.1.1 | lib/ftc_event/qualifications.rb |
ftc_event-0.1.0 | lib/ftc_event/qualifications.rb |