Sha256: fcc009ddb24f64f96c750ef2f6f2ec35f781e422535ce8c33f16afc44c52289d

Contents?: true

Size: 1.13 KB

Versions: 2

Compression:

Stored size: 1.13 KB

Contents

module SportDb
  
  class Stats
    include SportDb::Models

    def tables
      puts "Stats:"
      puts "  #{League.count} leagues  /  #{Season.count} seasons"
      puts "  #{Event.count} events (league+season recs)  /  #{Round.count} rounds  /  #{Group.count} groups"
      puts "  #{Team.count} teams"
      puts "  #{Game.count} games"
      puts "  #{Badge.count} badges"

      puts "  #{Track.count} tracks / #{Race.count} races (track+event recs) / #{Run.count} runs"
      puts "  #{Record.count} records (race|run+person recs)"
      puts "  #{Person.count} persons / #{Roster.count} rosters (person+team+event recs)"
      puts "  #{Goal.count} goals (person+game recs)"

      puts "  #{Ground.count}  grounds|stadiums"

      puts "  #{Country.count} countries / #{Region.count} regions / #{City.count} cities"
      
      ## todo: add tags / taggings from worlddb
    end
    
    def props
      puts "Props:"
      Prop.order( 'created_at asc' ).all.each do |prop|
        puts "  #{prop.key} / #{prop.value} || #{prop.created_at}"
      end
    end
  
  end  # class Stats

end  # module SportDb

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sportdb-1.8.3 lib/sportdb/stats.rb
sportdb-1.8.2 lib/sportdb/stats.rb