module MongoMapper::Plugins::Stats::ClassMethods

Public Instance Methods

stats() click to toggle source
# 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