fluke/devops-service/db/mongo/connectors/statictic.rb

15 lines
328 B
Ruby
Raw Normal View History

2015-02-12 13:01:05 +03:00
module Connectors
class Statistic < Base
def initialize(db)
self.collection = db.collection('statistic')
end
def statistic(user, path, method, body, response_code)
collection.insert(user: user, path: path, method: method, body: body, response_code: response_code, date: Time.now)
end
end
end