Module: MongoMapper::Plugins::Stats::ClassMethods
- Defined in:
- lib/mongo_mapper/plugins/stats.rb
Instance Method Summary collapse
Instance Method Details
#stats ⇒ Object
8 9 10 11 12 13 |
# File 'lib/mongo_mapper/plugins/stats.rb', line 8 def stats stats = database.command(:collstats => collection.name).documents[0] Struct.new(*stats.keys.collect { |key| key.underscore.to_sym }).new(*stats.values) rescue nil end |