# encoding: utf-8 require 'telegramsender' module Mutx module Workers class Notificator include Sidekiq::Worker def perform(type, destination, args= {}) simbolized = args.map { |k, v| [k.to_sym, v] }.to_h self.send(type.to_sym, destination, **simbolized) end def telegram(group_id, message: '') TelegramSender.send_message(group_id, message) end def email(mail_to, subject: '', body: '', attachment: nil) # TODO end end end end