Class: Mutx::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/mutx/lib/notification.rb

Class Method Summary collapse

Class Method Details

.send(type, destination, options = {}) ⇒ Object



13
14
15
# File 'lib/mutx/lib/notification.rb', line 13

def self.send(type, destination, options={})
  Mutx::Workers::Notificator.perform_async(type, destination, options)
end

.send_email(destination, subject: nil, body: nil, attachment: nil) ⇒ Object



5
6
7
# File 'lib/mutx/lib/notification.rb', line 5

def self.send_email(destination, subject: nil, body: nil, attachment: nil)
  self.send(:email, destination, subject: subject, body: body, attachment: attachment)
end

.send_telegram(destination, message: '') ⇒ Object



9
10
11
# File 'lib/mutx/lib/notification.rb', line 9

def self.send_telegram(destination, message: '')
  self.send(:telegram, destination, message: message)
end