Sha256: 8d71c8ca4a2f9a1ec976e8f81d0438b3aedbbadbb8fbfced9f31626d31356087

Contents?: true

Size: 1 KB

Versions: 6

Compression:

Stored size: 1 KB

Contents

module SportDb
  
  class Stats
    include SportDb::Models

    def tables
      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 "  #{Roster.count} rosters (person+team+event recs)"
      puts "  #{Goal.count} goals (person+game recs)"

      puts "  #{Ground.count}  grounds|stadiums"
    end
    
    ## fix/chek:
    #  move to Prop gem / reuse code from Prop gem
    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

6 entries across 6 versions & 1 rubygems

Version Path
sportdb-1.8.28 lib/sportdb/stats.rb
sportdb-1.8.27 lib/sportdb/stats.rb
sportdb-1.8.26 lib/sportdb/stats.rb
sportdb-1.8.25 lib/sportdb/stats.rb
sportdb-1.8.24 lib/sportdb/stats.rb
sportdb-1.8.23 lib/sportdb/stats.rb