class FtcEvent::Qualifications

Attributes

event[R]

Public Class Methods

new(event) click to toggle source
# File lib/ftc_event/qualifications.rb, line 7
def initialize(event)
  @event = event
end

Public Instance Methods

each_match() { |match(match_number)| ... } click to toggle source
# File lib/ftc_event/qualifications.rb, line 23
def each_match
  return enum_for(:each_match) unless block_given?

  matches.each do |match_number|
    yield match(match_number)
  end

  nil
end
match(match_number) click to toggle source
# File lib/ftc_event/qualifications.rb, line 15
def match(match_number)
  Qualification.new(event, match_number)
end
matches() click to toggle source
# File lib/ftc_event/qualifications.rb, line 19
def matches
  event.db.query('SELECT match FROM quals').map { |row| row['match'] }
end
name() click to toggle source
# File lib/ftc_event/qualifications.rb, line 11
def name
  'Qualifications'
end