Class: BeerDb::Stats
- Inherits:
-
Object
show all
- Includes:
- Models
- Defined in:
- lib/beerdb/stats.rb
Constant Summary
Constants included
from Models
Models::City, Models::Continent, Models::Country, Models::Prop, Models::Region, Models::Tag, Models::Tagging
Instance Method Summary
collapse
Instance Method Details
#props ⇒ Object
15
16
17
18
19
20
|
# File 'lib/beerdb/stats.rb', line 15
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
8
9
10
11
12
13
|
# File 'lib/beerdb/stats.rb', line 8
def tables
puts "Stats:"
puts " #{'%5d' % Beer.count} beers"
puts " #{'%5d' % Brand.count} brands"
puts " #{'%5d' % Brewery.count} breweries"
end
|