Class: SportDb::Stats
- Inherits:
-
Object
show all
- Includes:
- Models
- Defined in:
- lib/sportdb/stats.rb
Constant Summary
Constants included
from Models
Models::City, Models::Continent, Models::Country, Models::Prop, Models::Region
Instance Method Summary
collapse
Instance Method Details
#props ⇒ Object
25
26
27
28
29
30
|
# File 'lib/sportdb/stats.rb', line 25
def props
puts "Props:"
Prop.order( 'created_at asc' ).all.each do |prop|
puts " #{prop.key} / #{prop.value} || #{prop.created_at}"
end
end
|
#tables ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/sportdb/stats.rb', line 7
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 " #{Country.count} countries / #{Region.count} regions / #{City.count} cities"
end
|