Class: Mutx::Workers::Notificator
- Inherits:
-
Object
- Object
- Mutx::Workers::Notificator
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/mutx/background_jobs/workers/notificator.rb
Instance Method Summary collapse
- #email(mail_to, subject: '', body: '', attachment: nil) ⇒ Object
- #perform(type, destination, args = {}) ⇒ Object
- #telegram(group_id, message: '') ⇒ Object
Instance Method Details
#email(mail_to, subject: '', body: '', attachment: nil) ⇒ Object
16 17 18 |
# File 'lib/mutx/background_jobs/workers/notificator.rb', line 16 def email(mail_to, subject: '', body: '', attachment: nil) # TODO end |
#perform(type, destination, args = {}) ⇒ Object
7 8 9 10 |
# File 'lib/mutx/background_jobs/workers/notificator.rb', line 7 def perform(type, destination, args= {}) simbolized = args.map { |k, v| [k.to_sym, v] }.to_h self.send(type.to_sym, destination, **simbolized) end |
#telegram(group_id, message: '') ⇒ Object
12 13 14 |
# File 'lib/mutx/background_jobs/workers/notificator.rb', line 12 def telegram(group_id, message: '') Support::TelegramSender.(group_id, ) end |