Sha256: 44b9b33c1c6ca2e339dd53153b6e927ba0888e769351986442d513a6c2bbbe4a

Contents?: true

Size: 767 Bytes

Versions: 9

Compression:

Stored size: 767 Bytes

Contents

module SportDB
  
  class Stats
    include SportDB::Models

    def tables
      puts "Stats:"
      puts "  #{Event.count} events  /  #{Round.count} rounds  /  #{Group.count} groups"
      puts "  #{League.count} leagues  /  #{Season.count} seasons"
      puts "  #{Country.count} countries / #{Region.count} regions / #{City.count} cities"
      puts "  #{Team.count} teams"
      puts "  #{Game.count} games"
      puts "  #{Badge.count} badges"
      
      ## 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

9 entries across 9 versions & 1 rubygems

Version Path
sportdb-1.5.0 lib/sportdb/stats.rb
sportdb-1.4.2 lib/sportdb/stats.rb
sportdb-1.4.1 lib/sportdb/stats.rb
sportdb-1.4.0 lib/sportdb/stats.rb
sportdb-1.3.0 lib/sportdb/stats.rb
sportdb-1.2.0 lib/sportdb/stats.rb
sportdb-1.1.0 lib/sportdb/stats.rb
sportdb-1.0.1 lib/sportdb/stats.rb
sportdb-1.0.0 lib/sportdb/stats.rb