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