Class: DataValidation::Comparison::RankingTableHsWlComparison

Inherits:
RankingTableHsComparisonBase show all
Defined in:
lib/data_validation/comparison/ranking_table_hs_wl_comparison.rb

Instance Attribute Summary

Attributes inherited from ComparisonBase

#category, #division_id, #logger_name, #season, #web_url

Instance Method Summary collapse

Methods inherited from RankingTableHsComparisonBase

#api_path

Methods inherited from ComparisonBase

#check_item, #compare, #compare_conf_standings, #compare_values, #initialize

Constructor Details

This class inherits a constructor from DataValidation::Comparison::ComparisonBase

Instance Method Details

#determine_request_body_and_logger_nameObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/data_validation/comparison/ranking_table_hs_wl_comparison.rb', line 11

def determine_request_body_and_logger_name
  @category = if web_url.match /bingrl/
                'GIRLS'
              elsif web_url.match /binboy/
                'BOYS'
              elsif web_url.match /binmen/
                'MEN'
              elsif web_url.match /binwom/
                'WOMEN'
              end

  @season = "20#{web_url.match(/update(..)/)[1]}"

  metric = 'wl'

  @logger_name = "log/#{season}/#{category.downcase}/natl#{metric}_#{season}_#{category}.log"

  %Q|{"category":"#{category}","season":#{season}, "type": "#{metric.upcase}", "currPage":1,"pageSize":5000}|
end

#field_arrayObject



7
8
9
# File 'lib/data_validation/comparison/ranking_table_hs_wl_comparison.rb', line 7

def field_array
  ['rank', 'teamName', 'region', 'gameScheduled', 'winLossTotal', 'winLossState', 'winLossDate', 'winLossSite', 'totalWins', 'totalLosses', 'totalTies']
end