class DataValidation::Comparison::ComparisonFactory
Public Class Methods
get_comparison(url)
click to toggle source
# File lib/data_validation/comparison/comparison_factory.rb, line 23 def self.get_comparison(url) if url.match /update\d\d\/bin(boy|grl)\/rating\d+.php/ # division Computer Rating page for boys/girls return DivRankingPrComparison.new url elsif url.match /update\d\d\/bin\S+\/rating\d+.php/ # division Computer Rating page for men and women return RankingTableMwPrComparison.new url elsif url.match /update\d\d\/bin\S+\/rating[a-z]+.php/ # Regional Ratings return StateRankingComparison.new url elsif url.match /update\d\d\/bin\S+\/sos\d+.php/ # division Strength of Schedule page for boys/girls return RankingTableMwSosComparison.new url elsif url.match /update\d\d\/bin\S+\/rpi\d+.php/ # division RPI Rankings page for boys/girls return RankingTableMwRpiComparison.new url elsif url.match /update\d\d\/bin\S+\/wl\d+.php/ # division win-loss factor page for boys/girls return DivRankingWlComparison.new url elsif url.match /update\d\d\/bin\S+\/qwf\d+.php/ # division Quality Win Factor page for boys/girls return RankingTableMwQwComparison.new url elsif url.match /update\d\d\/bin\S+\/poll\d+.php/ # Poll page for collage division return RankingTableMwPollComparison.new url elsif url.match /update\d\d\/bin\S+\/trend\d+.php/ # Trend page for collage division return RankingTableMwTrendComparison.new url elsif url.match /update\d\d\/bin\S+\/tsi\d+.php/ # Tournament Selection Index page for collage division return RankingTableMwTsiComparison.new url elsif url.match /\.com\/(mll|nll)/ # Pro ranking page return RankingTableProPrComparison.new url elsif url.match /update\d\d\/bin\S+\/natlccr.php/ # National Coaches/Computer Ratings return RankingTableHsCrrComparison.new url elsif url.match /update\d\d\/bin\S+\/natlpoll.php/ # National Poll return RankingTableHsPollComparison.new url elsif url.match /update\d\d\/bin\S+\/natlrating.php/ # National Computer Ratings return RankingTableHsRatingComparison.new url elsif url.match /update\d\d\/bin\S+\/natlsos.php/ # National Strength of Schedule return RankingTableHsSosComparison.new url elsif url.match /update\d\d\/bin\S+\/natlrpi.php/ # National Ratings Percentage Index return RankingTableHsRpiComparison.new url elsif url.match /update\d\d\/bin\S+\/natlqwf.php/ # National Quality Win Factor return RankingTableHsQwfComparison.new url elsif url.match /update\d\d\/bin\S+\/natl-wl.php/ # National Quality Win Factor return RankingTableHsWlComparison.new url end end